spaemis.inventory
Loading emissions inventories
EmissionsInventory
Grid
VictoriaGrid
AustraliaGrid
VictoriaEPAInventory
- class VictoriaEPAInventory(data, border_mask, year)[source]
Bases:
EmissionsInventoryVictorian EPA data
CSV files of 1D datapoints. Each grid is slightly different so some post-processing is required to get all the variables and sectors on to the same grid.
AustraliaInventory
- class AustraliaInventory(data, border_mask, year)[source]
Bases:
EmissionsInventoryAustralian data
CSV files of 1D datapoints. Each grid is slightly different so some post-processing is required to get all the variables and sectors on to the same grid.
TestInventory
- class TestInventory(data, border_mask, year)[source]
Bases:
EmissionsInventoryTest inventory using decimated Vic inventory data
- classmethod load_from_directory(data_directory, year, **kwargs)[source]
Load test inventory data
For testing we use a decimated version of the vic inventory generated using
scripts/downsample_inventory.py- Parameters:
data_directory (
str) – Folder containing CSV input filesgrid – Object containing information about the target grid
- Returns:
typing.Self– Loaded data
has_dimensions
write_inventory_csvs
- write_inventory_csvs(ds, output_dir)[source]
Serialize a Dataset to CSV files with the same format as the input inventory data
Each sector is written into a different file. The CSV file contains rows of data for each datapoint on a lat, lon grid. Each variable will be written as a separate column.
The ordering of the datapoints are lat-major (i.e. iterate over latitude and then longitude)
- Parameters:
ds (
xarray.core.dataset.Dataset) –Data to output
This dataset should be similar to the format from
EmissionsInventory.data. in that each data variable contains a sector, lat and lon dimension.output_dir (
str) – Output directory for the
- Return type: