spaemis.input_data
Searching and loading of a local input4MIPs data archive
InputEmissionsDatabase
- class InputEmissionsDatabase(paths=None)[source]
Bases:
objectDatabase of Input4MIPs emissions data
- load(variable_id, source_id)[source]
Load the input4MIPs data according to the variable and source name
- Parameters:
- Returns:
xarray.core.dataset.Dataset– All of the available data for the given variable and source identifiers
initialize_database
- initialize_database(options=None)[source]
Initialise the global database of input emissions
Uses the SPAEMIS_INPUT_PATHS environment to provide a set of paths to search for input emissions. This environment can contain a comma-separated list of paths if multiple paths are used.
- Returns:
InputEmissionsDatabase – Emissions database initialised with a list of input directories
load_timeseries
- load_timeseries(options, root_dir=None)[source]
Load a set of input timeseries from disk
Optionally, some additional filtering can be performed on these input timeseries
- Parameters:
options (list[InputTimeseries]) – List of timeseries to load
root_dir (str | None) –
Root directory used for relative timeseries file paths
Defaults to the current directory if no path is provided
- Returns:
dict[str, scmdata.ScmRun] – Collection of loaded data
The keys are determined from the name of each
InputTimeseries