docs: def _initialize_output(self, time_len, id_len):
          """Creates netCDF file with CF dimensions and variables, but no data.
  
          Arguments
          ---------
          time_len: int
              Length of time dimension (number of time steps).
          id_len: int
              Length of Id dimension (number of time series).
  
          """
          log('Initializing new file %s' % self.cf_compliant_file, 'INFO')
  
          self.cf_nc = Dataset(self.cf_compliant_file, 'w',
                               format='NETCDF3_CLASSIC')
  
          # Create global attributes
          log('    globals', 'DEBUG', self.print_debug)
          self.cf_nc.featureType = 'timeSeries'
          self.cf_nc.Metadata_Conventions = 'Unidata Dataset Discovery v1.0'
          self.cf_nc.Conventions = 'CF-1.6'
          self.cf_nc.cdm_data_type = 'Station'
          self.cf_nc.nodc_template_version = (
              'NODC_NetCDF_TimeSeries_Orthogonal_Template_v1.1')
          self.cf_nc.standard_name_vocabulary = \
              ('NetCDF Climate and Forecast (CF) '
               'Metadata Convention Standard Name '
               'Table v28')
          self.cf_nc.title = 'RAPID Result'
          self.cf_nc.summary =\
              ("Results of RAPID river routing simulation. Each river "
               "reach (i.e., feature) is represented by a point "
               "feature at its midpoint, and is identified by the "
               "reach's unique NHDPlus COMID identifier.")
          self.cf_nc.time_coverage_resolution = 'point'
          self.cf_nc.geospatial_lat_min = 0.0
          self.cf_nc.geospatial_lat_max = 0.0
          self.cf_nc.geospatial_lat_units = 'degrees_north'
          self.cf_nc.geospatial_lat_resolution = 'midpoint of stream feature'
          self.cf_nc.geospatial_lon_min = 0.0
          self.cf_nc.geospatial_lon_max = 0.0
          self.cf_nc.geospatial_lon_units = 'degrees_east'
          self.cf_nc.geospatial_lon_resolution = 'midpoint of stream feature'
          self.cf_nc.geospatial_vertical_min = 0.0
          self.cf_nc.geospatial_vertical_max = 0.0
          self.cf_nc.geospatial_vertical_units = 'm'
          self.cf_nc.geospatial_vertical_resolution = \
              'midpoint of stream feature'
          self.cf_nc.geospatial_vertical_positive = 'up'
          self.cf_nc.project = self.project_name
          self.cf_nc.processing_level = 'Raw simulation result'
          self.cf_nc.keywords_vocabulary = \
              ('NASA/Global Change Master Directory '
               '(GCMD) Earth Science Keywords. Version '
               '8.0.0.0.0')
          self.cf_nc.keywords = 'DISCHARGE/FLOW'
          self.cf_nc.comment = \
              'Result time step(s) (seconds): ' + str(self.time_step_array)
  
          timestamp = datetime.utcnow().isoformat() + 'Z'
          self.cf_nc.date_created = timestamp
          self.cf_nc.history = \
              (timestamp + '; added time, lat, lon, z, crs variables; '
               'added metadata to conform to NODC_NetCDF_TimeSeries_'
               'Orthogonal_Template_v1.1')
  
          # Create dimensions
          log('    dimming', 'DEBUG', self.print_debug)
          self.cf_nc.createDimension('time', time_len)
          self.cf_nc.createDimension(self.output_id_dim_name, id_len)
  
          # Create variables
          log('    time_series_var', 'DEBUG', self.print_debug)
          time_series_var = \
              self.cf_nc.createVariable(self.output_id_dim_name, 'i4',
                                        (self.output_id_dim_name,))
          time_series_var.long_name = (
              'Unique NHDPlus COMID identifier for each river reach feature')
          time_series_var.cf_role = 'timeseries_id'
  
          log('    time_var', 'DEBUG', self.print_debug)
          time_var = self.cf_nc.createVariable('time', 'i4', ('time',))
          time_var.long_name = 'time'
          time_var.standard_name = 'time'
          time_var.units = 'seconds since 1970-01-01 00:00:00 0:00'
          time_var.axis = 'T'
  
          # only add if user adds
          if self.comid_lat_lon_z_file and \
                  os.path.exists(self.comid_lat_lon_z_file):
              log('    lat_var', 'DEBUG', self.print_debug)
              lat_var = self.cf_nc.createVariable('lat', 'f8',
                                                  (self.output_id_dim_name,),
                                                  fill_value=-9999.0)
  
              log('    lon_var', 'DEBUG', self.print_debug)
              lon_var = self.cf_nc.createVariable('lon', 'f8',
                                                  (self.output_id_dim_name,),
                                                  fill_value=-9999.0)
  
              add_latlon_metadata(lat_var, lon_var)
  
              log('    z_var', 'DEBUG', self.print_debug)
              z_var = self.cf_nc.createVariable('z', 'f8',
                                                (self.output_id_dim_name,),
                                                fill_value=-9999.0)
              z_var.long_name = ('Elevation referenced to the North American '
                                 'Vertical Datum of 1988 (NAVD88)')
              z_var.standard_name = 'surface_altitude'
              z_var.units = 'm'
              z_var.axis = 'Z'
              z_var.positive = 'up'
  
              log('    crs_var', 'DEBUG', self.print_debug)
              crs_var = self.cf_nc.createVariable('crs', 'i4')
              crs_var.grid_mapping_name = 'latitude_longitude'
              crs_var.epsg_code = 'EPSG:4326'  # WGS 84
              crs_var.semi_major_axis = 6378137.0
              crs_var.inverse_flattening = 298.257223563