openairclim.read_netcdf
Methods for reading netCDF input
- openairclim.read_netcdf.check_spec_attributes(config, inv_dict)[source]
 Check emission attributes in inventories for given species in config TODO Expand list of possible emission units
- openairclim.read_netcdf.get_evolution_type(config)[source]
 Get evolution type
- Parameters:
 config (dict) – Configuration dictionary from config
- Raises:
 ValueError – if type attribute in evolution file is invalid
- Returns:
 evolution_tpye: norm or scaling or False
- Return type:
 
- openairclim.read_netcdf.get_results(config: dict, ac='TOTAL') tuple[dict, dict, dict, dict][source]
 Get the simulation results from the output netCDF file.
- openairclim.read_netcdf.open_inventories(config, base=False)[source]
 Open inventories from config, check attribute sections and time constraints
- Parameters:
 - Raises:
 IndexError – if no inv_year is within time_range, for evolution_type = “norm” or “scaling” or False
IndexError – if time_range is not within evolution_time, for evolution_type = “norm” or “scaling”
IndexError – if no inv_year is within evolution_time, for evolution_tpye = “norm” or “scaling”
IndexError – if time_range first and last year are not in inv_years, for evolution_type = “scaling”
- Returns:
 Dictionary of xarray Datasets, keys are years of input inventories
- Return type:
 
- openairclim.read_netcdf.open_netcdf(netcdf)[source]
 Converts netCDF file or list of netCDF files to dictionary of xarray Datasets
- openairclim.read_netcdf.open_netcdf_from_config(config, section, species, resp_type)[source]
 Open netcdf files and convert to xarray Datasets for given section in config and given species
- Parameters:
 - Returns:
 - Dictionary of xarray Datasets, one Dataset for each species,
 keys are species names
- Return type: