src.configs package
Submodules
src.configs.config module
File for formatting config.py file.
Example
Usage at top of program:
from src.config.configs import format_config
Instantiation somewhere in the progam:
cfg = format_config(cfg)
- src.configs.config.derived_param(cfg)
Calculate dervied paramters using fundamental constants.
- Parameters
cfg (DictConfig) – constants configuration.
- Returns
the config with all the derived param added.
- Return type
DictConfig
- src.configs.config.format_config(cfg)
cfg reformatting.
Currently just evaluates the arithemtic put into the program. This isn’t the best idea in the world, but it works, and it’s broadly your own sorry fault if you put in dangerous code to the command line and it gets evaluated.
- Parameters
cfg (DictConfig) – cfg to reformat.
- Return type
DictConfig
src.configs.load_config module
Load hydra config (util for tests).
- src.configs.load_config.load_config(prefix='../../', test=True)
Tests loading hydra config file.
src.configs.pangeo module
Pangeo.py
Possible preprocessing script for pangeo config script.
# TODO: create auto-archive functionality.
TODO: change Filestructure to be more logical.
File structures inside src/data:
- Initial directory:
DIR=src/data/nc
- Final directory:
DIR=/gws/nopw/j04/ai4er/users/sdat2/CMIP6
- Full ensemble time series:
${DIR}/historical.ssp585/timeseries/${var}/${member}.nc
- Ensemble 60 year mean state:
${DIR}/historical.ssp585/mean/${var}/${member}.nc
- Ensemble 60 year climatology:
${DIR}/historical.ssp585/climatology/${var}/${member}.nc
- Ensemble 60 year linear trend:
${DIR}/historical.ssp585/trend/${var}/${member}.nc
- Ensemble 60 year linear trend:
${DIR}/historical.ssp585/nino3.4/${var}/${member}.nc
- Ensemble 60 year nino3.4:
${DIR}/historical.ssp585.nino3.4/${var}.nc
- Ensemble 60 year nino3.4.climatology:
${DIR}/historical.ssp585.nino3.4.climatology/${var}.nc
- Ensemble 60 year nino3.4.trends:
${DIR}/historical.ssp585.nino3.4.trends/${var}.nc
- MMM 60 year mean:
${DIR}/historical.ssp585.mmm/mean/${var}.nc
- MMM 60 year trend:
${DIR}/historical.ssp585.mmm/trend/${var}.nc
- MMM 60 year climatology:
${DIR}/historical.ssp585.mmm/climatology/${var}.nc