Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/PCMDI/pcmdi_metrics into 40…
Browse files Browse the repository at this point in the history
…5_sic_ao
  • Loading branch information
Ana Ordonez committed Jan 4, 2024
2 parents 724fe34 + 232d3ee commit 502948c
Show file tree
Hide file tree
Showing 26 changed files with 6,141 additions and 36 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ Release Notes and History

| <div style="width:300%">[Versions]</div> | Update summary |
| ------------- | ------------------------------------- |
| [v3.2] | New metric added: **Extremes**
| [v3.1.2] | Technical update
| [v3.1.1] | Technical and documentation update
| [v3.1] | New metric added: **Precipitation Benchmarking -- distribution bimodality**
Expand All @@ -124,6 +125,7 @@ Release Notes and History


[Versions]: https://github.com/PCMDI/pcmdi_metrics/releases
[v3.2]: https://github.com/PCMDI/pcmdi_metrics/releases/tag/v3.2
[v3.1.2]: https://github.com/PCMDI/pcmdi_metrics/releases/tag/v3.1.2
[v3.1.1]: https://github.com/PCMDI/pcmdi_metrics/releases/tag/v3.1.1
[v3.1]: https://github.com/PCMDI/pcmdi_metrics/releases/tag/v3.1
Expand All @@ -144,7 +146,7 @@ Release Notes and History
[v2.1.0]: https://github.com/PCMDI/pcmdi_metrics/releases/tag/v2.1.0
[v2.0]: https://github.com/PCMDI/pcmdi_metrics/releases/tag/v2.0
[v1.2]: https://github.com/PCMDI/pcmdi_metrics/releases/tag/v1.2
[v1.1.2]: https://github.com/PCMDI/pcmdi_metrics/releases/tag/v1.1.2
[v1.1.2]: https://github.com/PCMDI/pcmdi_metrics/releases/tag/1.1.2
[v1.1]: https://github.com/PCMDI/pcmdi_metrics/releases/tag/v1.1
[v1.0]: https://github.com/PCMDI/pcmdi_metrics/releases/tag/v1.0

Expand Down
17 changes: 17 additions & 0 deletions cmec/extremes/pmp_extremes_driver.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

source $CONDA_SOURCE
conda activate $CONDA_ENV_ROOT/_CMEC_pcmdi_metrics

cd $CMEC_WK_DIR

tmp_param=$CMEC_WK_DIR/extremes_param.py

python $CMEC_CODE_DIR/../scripts/pmp_param_generator.py $CMEC_CONFIG_DIR/cmec.json $tmp_param "extremes"

if [[ $? = 0 ]]; then
extremes_driver.py -p $tmp_param

else
echo "Failure in PMP/extremes parameter file generation"
fi
12 changes: 12 additions & 0 deletions cmec/scripts/pmp_param_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,18 @@ def check_for_opt(key, settings):
print("\nGenerating climatologies")
settings = make_climatologies(settings, model_dir, wk_dir)

if pmp_config == "extremes":
settings["test_data_path"] = model_dir
settings["metrics_output_path"] = wk_dir
if "sftlf_filename_template" in settings:
settings["sftlf_filename_template"] = os.path.join(
model_dir, settings["sftlf_filename_template"]
)
if obs_dir is not None and "reference_data_path" in settings:
settings["reference_data_path"] = os.path.join(
obs_dir, settings["reference_data_path"]
)

if pmp_config == "monsoon_wang":
settings["test_data_path"] = os.path.join(model_dir, settings["test_data_path"])
settings["reference_data_path"] = os.path.join(
Expand Down
1 change: 1 addition & 0 deletions conda-env/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ dependencies:
- regionmask=0.9.0
- rasterio=1.3.6
- shapely=2.0.1
- numdifftools
# ==================
# Testing
# ==================
Expand Down
3 changes: 2 additions & 1 deletion contents.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"cmec/mean_climate/pmp_mean_climate.json",
"cmec/diurnal_cycle/pmp_diurnal_cycle.json",
"cmec/monsoon_wang/pmp_monsoon_wang.json",
"cmec/monsoon_sperber/pmp_monsoon_sperber.json"
"cmec/monsoon_sperber/pmp_monsoon_sperber.json",
"cmec/extremes/pmp_extremes.json"
]
}
30 changes: 3 additions & 27 deletions doc/jupyter/Demo/Demo_0_download_data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"In below cell, you are going to download sample input files from PCMDI server. The total size of dataset is about 2 GB, and so please be aware that downloading will take some time to complete. List of downloading files can be found in `data_files.txt` file."
"In below cell, you are going to download sample input files from PCMDI server. The total size of dataset is about 2 GB, and so please be aware that downloading will take some time to complete. List of downloading files can be found in [`data_files.txt`](data_files.txt) file."
]
},
{
Expand All @@ -62,31 +62,6 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Downloading: 'CMIP5_demo_clims/cmip5.historical.ACCESS1-0.r1i1p1.mon.pr.198101-200512.AC.v20200426.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/CMIP5_demo_clims/cmip5.historical.ACCESS1-0.r1i1p1.mon.pr.198101-200512.AC.v20200426.nc\n",
"Downloading: 'CMIP5_demo_clims/cmip5.historical.ACCESS1-0.r1i1p1.mon.rlut.198101-200512.AC.v20200426.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/CMIP5_demo_clims/cmip5.historical.ACCESS1-0.r1i1p1.mon.rlut.198101-200512.AC.v20200426.nc\n",
"Downloading: 'CMIP5_demo_clims/cmip5.historical.ACCESS1-0.r1i1p1.mon.zg.198101-200512.AC.v20200426.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/CMIP5_demo_clims/cmip5.historical.ACCESS1-0.r1i1p1.mon.zg.198101-200512.AC.v20200426.nc\n",
"Downloading: 'CMIP5_demo_clims/cmip5.historical.CanCM4.r1i1p1.mon.pr.198101-200512.AC.v20200426.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/CMIP5_demo_clims/cmip5.historical.CanCM4.r1i1p1.mon.pr.198101-200512.AC.v20200426.nc\n",
"Downloading: 'CMIP5_demo_clims/cmip5.historical.CanCM4.r1i1p1.mon.rlut.198101-200512.AC.v20200426.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/CMIP5_demo_clims/cmip5.historical.CanCM4.r1i1p1.mon.rlut.198101-200512.AC.v20200426.nc\n",
"Downloading: 'CMIP5_demo_clims/cmip5.historical.CanCM4.r1i1p1.mon.zg.198101-200512.AC.v20200426.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/CMIP5_demo_clims/cmip5.historical.CanCM4.r1i1p1.mon.zg.198101-200512.AC.v20200426.nc\n",
"Downloading: 'CMIP5_demo_clims/cmip6.historical.MCM-UA-1-0.r1i1p1f1.mon.zg.198101-200512.AC.v20201119.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/CMIP5_demo_clims/cmip6.historical.MCM-UA-1-0.r1i1p1f1.mon.zg.198101-200512.AC.v20201119.nc\n",
"Downloading: 'CMIP5_demo_data/psl_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/CMIP5_demo_data/psl_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc\n",
"Downloading: 'CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc\n",
"Downloading: 'CMIP5_demo_data/cmip5.amip.ACCESS1-0.sftlf.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/CMIP5_demo_data/cmip5.amip.ACCESS1-0.sftlf.nc\n",
"Downloading: 'CMIP5_demo_data/cmip5.historical.GISS-E2-H.sftlf.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/CMIP5_demo_data/cmip5.historical.GISS-E2-H.sftlf.nc\n",
"Downloading: 'CMIP5_demo_data/ts_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/CMIP5_demo_data/ts_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc\n",
"Downloading: 'CMIP5_demo_timeseries/historical/atmos/day/pr/pr_day_GISS-E2-H_historical_r6i1p1_20000101-20051231.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/CMIP5_demo_timeseries/historical/atmos/day/pr/pr_day_GISS-E2-H_historical_r6i1p1_20000101-20051231.nc\n",
"Downloading: 'obs4MIPs_PCMDI_clims/rlut/CERES-EBAF-4-0/v20210804/rlut_mon_CERES-EBAF-4-0_PCMDI_gn.200301-201812.AC.v20210804.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/obs4MIPs_PCMDI_clims/rlut/CERES-EBAF-4-0/v20210804/rlut_mon_CERES-EBAF-4-0_PCMDI_gn.200301-201812.AC.v20210804.nc\n",
"Downloading: 'obs4MIPs_PCMDI_clims/rlut/CERES-EBAF-4-1/v20210804/rlut_mon_CERES-EBAF-4-1_PCMDI_gn.200301-201812.AC.v20210804.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/obs4MIPs_PCMDI_clims/rlut/CERES-EBAF-4-1/v20210804/rlut_mon_CERES-EBAF-4-1_PCMDI_gn.200301-201812.AC.v20210804.nc\n",
"Downloading: 'obs4MIPs_PCMDI_clims/pr/GPCP-2-3/v20210804/pr_mon_GPCP-2-3_PCMDI_gn.200301-201812.AC.v20210804.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/obs4MIPs_PCMDI_clims/pr/GPCP-2-3/v20210804/pr_mon_GPCP-2-3_PCMDI_gn.200301-201812.AC.v20210804.nc\n",
"Downloading: 'obs4MIPs_PCMDI_clims/zg/ERA-INT/v20210804/zg_mon_ERA-INT_PCMDI_gn.200301-201812.AC.v20210804.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/obs4MIPs_PCMDI_clims/zg/ERA-INT/v20210804/zg_mon_ERA-INT_PCMDI_gn.200301-201812.AC.v20210804.nc\n",
"Downloading: 'obs4MIPs_PCMDI_monthly/ECMWF/ERA-INT/mon/zg/gn/v20210727/zg_mon_ERA-INT_PCMDI_gn_198901-201001.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/obs4MIPs_PCMDI_monthly/ECMWF/ERA-INT/mon/zg/gn/v20210727/zg_mon_ERA-INT_PCMDI_gn_198901-201001.nc\n",
"Downloading: 'obs4MIPs_PCMDI_monthly/NASA-LaRC/CERES-EBAF-4-1/mon/rlut/gn/v20210727/rlut_mon_CERES-EBAF-4-1_PCMDI_gn_200301-201812.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/obs4MIPs_PCMDI_monthly/NASA-LaRC/CERES-EBAF-4-1/mon/rlut/gn/v20210727/rlut_mon_CERES-EBAF-4-1_PCMDI_gn_200301-201812.nc\n",
"Downloading: 'obs4MIPs_PCMDI_monthly/NOAA-NCEI/GPCP-2-3/mon/pr/gn/v20210727/pr_mon_GPCP-2-3_PCMDI_gn_197901-201907.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/obs4MIPs_PCMDI_monthly/NOAA-NCEI/GPCP-2-3/mon/pr/gn/v20210727/pr_mon_GPCP-2-3_PCMDI_gn_197901-201907.nc\n",
"Downloading: 'obs4MIPs_PCMDI_monthly/NOAA-ESRL-PSD/20CR/mon/psl/gn/v20210727/psl_mon_20CR_PCMDI_gn_187101-201212.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/obs4MIPs_PCMDI_monthly/NOAA-ESRL-PSD/20CR/mon/psl/gn/v20210727/psl_mon_20CR_PCMDI_gn_187101-201212.nc\n",
"Downloading: 'obs4MIPs_PCMDI_monthly/MOHC/HadISST-1-1/mon/ts/gn/v20210727/ts_mon_HadISST-1-1_PCMDI_gn_187001-201907.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/obs4MIPs_PCMDI_monthly/MOHC/HadISST-1-1/mon/ts/gn/v20210727/ts_mon_HadISST-1-1_PCMDI_gn_187001-201907.nc\n",
"Downloading: 'obs4MIPs_PCMDI_daily/NASA-JPL/GPCP-1-3/day/pr/gn/latest/pr_day_GPCP-1-3_PCMDI_gn_19961002-20170101.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/obs4MIPs_PCMDI_daily/NASA-JPL/GPCP-1-3/day/pr/gn/latest/pr_day_GPCP-1-3_PCMDI_gn_19961002-20170101.nc\n",
"Downloading: 'misc_demo_data/atm/3hr/pr/pr_3hr_IPSL-CM5A-LR_historical_r1i1p1_5x5_1997-1999.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/misc_demo_data/atm/3hr/pr/pr_3hr_IPSL-CM5A-LR_historical_r1i1p1_5x5_1997-1999.nc\n",
"Downloading: 'misc_demo_data/fx/sftlf.GPCP-IP.1x1.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/misc_demo_data/fx/sftlf.GPCP-IP.1x1.nc\n",
"All files downloaded\n"
]
}
Expand Down Expand Up @@ -128,6 +103,7 @@
"Preparing parameter file: basic_diurnal_fourier.py\n",
"Preparing parameter file: basic_enso_param.py\n",
"Preparing parameter file: basic_annual_cycle_param.py\n",
"Preparing parameter file: basic_extremes_param.py\n",
"Preparing parameter file: basic_diurnal_std_hourly_mean.py\n",
"Preparing parameter file: basic_diurnal_fourierAllGrid.py\n",
"Preparing parameter file: basic_mov_param.py\n",
Expand Down Expand Up @@ -166,7 +142,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.12"
"version": "3.9.7"
},
"selected_variables": [],
"vcdat_file_path": "",
Expand Down
Loading

0 comments on commit 502948c

Please sign in to comment.