spaemis.scaling.base
Base class for scaling emissions
BaseScaler
- class BaseScaler[source]
Bases:
objectScaling calculator
Used to modify a dataset using a scaling method
- classmethod create_from_config(method)[source]
Create a new scaler from configuration
- Parameters:
method (
typing.Union[spaemis.config.ExcludeScaleMethod,spaemis.config.ProxyMethod,spaemis.config.RelativeChangeMethod,spaemis.config.ConstantScaleMethod,spaemis.config.TimeseriesMethod,spaemis.config.PointSourceMethod]) – Configuration to create the scaler- Returns:
spaemis.scaling.base.BaseScaler– New scaler instance configured according to the configuration
load_source
- load_source(source_id, variable_id, sector, inventory, weighted_temporal_mean=False)[source]
Load and preprocess the appropriate input4MIPs data
- Parameters:
source_id (
str) – Source of the dataset to loadvariable_id (
str) – Variable identifier of the dataset to loadsector (
str) – Sector to load. Must be inSECTOR_MAPinventory (
spaemis.inventory.EmissionsInventory) –weighted_temporal_mean (
bool) – IF True, temporally weight the annual mean to capture the varying number of days in each month
- Returns:
xarray.core.dataarray.DataArray– Annual mean values over the same domain as the inventory data