src.prepare_data#
Module Contents#
Classes#
Class containing the dataset-specific code for opening each available dataset |
Functions#
Generate files containing CAFE grids |
|
|
Prepare a dataset according to a provided config file |
|
Spin up a dask cluster and process and save raw data according to a provided config file |
Attributes#
- src.prepare_data.PROJECT_DIR#
- src.prepare_data.DATA_DIR#
- class src.prepare_data._open#
Class containing the dataset-specific code for opening each available dataset
- static JRA55(variables, realm, preprocess)#
Open JRA55 variables from specified realm
- static HadISST(variables, realm, preprocess)#
Open HadISST variables from specified realm
- static EN422(variables, _, preprocess)#
Open EN.4.2.2 variables
- static GPCP(variables, _, preprocess)#
Open GPCP v2.3 variables
- static AGCD(variables, _, preprocess)#
Open AGCD variables
- static CAFEf6(variables, realm, preprocess)#
Open CAFE-f6 variables from specified realm applying preprocess prior to concanenating forecasts
- static CAFEf5(variables, realm, preprocess)#
Open CAFE-f5 variables from specified realm, including appending first 10 members of CAFE-f6 for 2020 forecast
- static CAFE60v1(variables, realm, preprocess)#
Open CAFE60v1 variables from specified realm
- static CAFE_hist(variables, realm, preprocess)#
Open CAFE historical run variables from specified realm
- static _cmip6_dcppA_hindcast(model, variant_id, grid, variables, realm, years, members, version)#
Open CMIP6 dcppA-hindcast variables from specified monthly realm
- static CanESM5(variables, realm, preprocess)#
Open CanESM5 dcppA-hindcast variables from specified monthly realm
- static EC_Earth3(variables, realm, preprocess)#
Open EC-Earth3 dcppA-hindcast variables from specified monthly realm
- static HadGEM3(variables, realm, preprocess)#
Open HadGEM3-GC31-MM dcppA-hindcast variables from specified monthly realm
- static _cmip6(model, experiment, variant_id, grid, variables, realm, members, version)#
Open CMIP6 variables from specified realm
Can specify version=’latest’ but this is slower as it has to search each directory for the latest version
- static CanESM5_hist(variables, realm, preprocess)#
Open CanESM5 historical variables from specified realm
- static CanESM5_ctrl(variables, realm, preprocess)#
Open CanESM5 piControl variables from specified realm
- static EC_Earth3_hist(variables, realm, preprocess)#
Open EC-Earth3 historical variables from specified realm
- static EC_Earth3_ctrl(variables, realm, preprocess)#
Open EC-Earth3 piControl variables from specified realm
- src.prepare_data.maybe_generate_CAFE_grid_files()#
Generate files containing CAFE grids
- src.prepare_data.prepare_dataset(config, save_dir, save=True)#
Prepare a dataset according to a provided config file
- Parameters
- configstr
The name of the config file
- save_dirstr
The directory to save to
- saveboolean, optional
If True (default), save the prepared dataset(s) in zarr format to save_dir. If False, return an xarray Dataset containing the prepared data. The latter is useful for debugging
- src.prepare_data.main(config, config_dir, save_dir)#
Spin up a dask cluster and process and save raw data according to a provided config file
- Parameters
- configstr
The name of the config file
- config_dirstr
The directory containing the config file
- save_dirstr
The directory to save to
- src.prepare_data.log_fmt = %(asctime)s - %(name)s - %(levelname)s - %(message)s#