6. ENSO
This notebook provides an overview of running the ENSO Metrics package through the PMP. More information can be found in the `README <>`__. Example parameter files are located in the `PMP sample setups <>`__.
Reference: Planton, Y., E. Guilyardi, A. T. Wittenberg, J. Lee, P. J. Gleckler, T. Bayr, S. McGregor, M. J. McPhaden, S. Power, R. Roehrig, A. Voldoire, 2020: Evaluating El Niño in climate models with the CLIVAR 2020 ENSO metrics package. Bulletin of the American Meteorological Society. doi: 10.1175/BAMS-D-19-0337.1
Description for individual metrics can be found at https://github.com/CLIVAR-PRP/ENSO_metrics/wiki.
Download demo data
The ENSO metrics demo requires downloading a large sample data set (size 10.8 GB). The ENSO metric requires a different set of sample data than the rest of the PMP metrics. This section of the notebook will download that data to your chosen location and generate a basic parameter file.
[1]:
# Lets get the file containing the data needed for this demo
import requests
r = requests.get("https://pcmdiweb.llnl.gov/pss/pmpdata/pmp_enso_tutorial_files.v20210823.txt")
with open("enso_data_files.txt","wb") as f:
f.write(r.content)
If you want to change the location where the demo data and output are stored, you can do so here:
[2]:
# This is where you will be downloading the sample_data
demo_data_directory = "demo_data"
# this line is where your output will be stored
demo_output_directory = "demo_output"
Then download the data. The total sample data size is 10.8 GB. This will take several minutes.
[3]:
# Let's download the files
from pcmdi_metrics.io.base import download_sample_data_files
try:
download_sample_data_files("enso_data_files.txt", demo_data_directory)
print("All files downloaded")
except:
print("Download failed")
Downloading: 'obs4MIPs_PCMDI_monthly/ECMWF/ERA-20C/mon/psl/gn/v20210727/psl_mon_ERA-20C_PCMDI_gn_190001-201012.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/obs4MIPs_PCMDI_monthly/ECMWF/ERA-20C/mon/psl/gn/v20210727/psl_mon_ERA-20C_PCMDI_gn_190001-201012.nc
Downloading: 'obs4MIPs_PCMDI_monthly/ECMWF/ERA-20C/mon/ts/gn/v20210727/ts_mon_ERA-20C_PCMDI_gn_190001-201012.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/obs4MIPs_PCMDI_monthly/ECMWF/ERA-20C/mon/ts/gn/v20210727/ts_mon_ERA-20C_PCMDI_gn_190001-201012.nc
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
Downloading: 'obs4MIPs_PCMDI_monthly/NOAA-ESRL-PSD/20CR/mon/ts/gn/v20210727/ts_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/ts/gn/v20210727/ts_mon_20CR_PCMDI_gn_187101-201212.nc
Downloading: 'obs4MIPs_PCMDI_monthly/NOAA-NCEI/CMAP-V1902/mon/pr/gn/v20210727/pr_mon_CMAP-V1902_PCMDI_gn_197901-201901.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/obs4MIPs_PCMDI_monthly/NOAA-NCEI/CMAP-V1902/mon/pr/gn/v20210727/pr_mon_CMAP-V1902_PCMDI_gn_197901-201901.nc
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
Downloading: 'obs4MIPs_PCMDI_monthly/ESSO/TropFlux-1-0/mon/hfls/gn/v20210727/hfls_mon_TropFlux-1-0_PCMDI_gn_197901-201707.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/obs4MIPs_PCMDI_monthly/ESSO/TropFlux-1-0/mon/hfls/gn/v20210727/hfls_mon_TropFlux-1-0_PCMDI_gn_197901-201707.nc
Downloading: 'obs4MIPs_PCMDI_monthly/ESSO/TropFlux-1-0/mon/hfns/gn/v20210727/hfns_mon_TropFlux-1-0_PCMDI_gn_197901-201707.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/obs4MIPs_PCMDI_monthly/ESSO/TropFlux-1-0/mon/hfns/gn/v20210727/hfns_mon_TropFlux-1-0_PCMDI_gn_197901-201707.nc
Downloading: 'obs4MIPs_PCMDI_monthly/ESSO/TropFlux-1-0/mon/hfss/gn/v20210727/hfss_mon_TropFlux-1-0_PCMDI_gn_197901-201707.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/obs4MIPs_PCMDI_monthly/ESSO/TropFlux-1-0/mon/hfss/gn/v20210727/hfss_mon_TropFlux-1-0_PCMDI_gn_197901-201707.nc
Downloading: 'obs4MIPs_PCMDI_monthly/ESSO/TropFlux-1-0/mon/tas/gn/v20210727/tas_mon_TropFlux-1-0_PCMDI_gn_197901-201707.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/obs4MIPs_PCMDI_monthly/ESSO/TropFlux-1-0/mon/tas/gn/v20210727/tas_mon_TropFlux-1-0_PCMDI_gn_197901-201707.nc
Downloading: 'obs4MIPs_PCMDI_monthly/ESSO/TropFlux-1-0/mon/tauu/gn/v20210727/tauu_mon_TropFlux-1-0_PCMDI_gn_197901-201707.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/obs4MIPs_PCMDI_monthly/ESSO/TropFlux-1-0/mon/tauu/gn/v20210727/tauu_mon_TropFlux-1-0_PCMDI_gn_197901-201707.nc
Downloading: 'obs4MIPs_PCMDI_monthly/ESSO/TropFlux-1-0/mon/tauv/gn/v20210727/tauv_mon_TropFlux-1-0_PCMDI_gn_197901-201707.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/obs4MIPs_PCMDI_monthly/ESSO/TropFlux-1-0/mon/tauv/gn/v20210727/tauv_mon_TropFlux-1-0_PCMDI_gn_197901-201707.nc
Downloading: 'obs4MIPs_PCMDI_monthly/ESSO/TropFlux-1-0/mon/ts/gn/v20210727/ts_mon_TropFlux-1-0_PCMDI_gn_197901-201707.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/obs4MIPs_PCMDI_monthly/ESSO/TropFlux-1-0/mon/ts/gn/v20210727/ts_mon_TropFlux-1-0_PCMDI_gn_197901-201707.nc
Downloading: 'obs4MIPs_PCMDI_monthly/ECMWF/ERA-INT/mon/hfls/gn/v20210727/hfls_mon_ERA-INT_PCMDI_gn_197901-201903.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/obs4MIPs_PCMDI_monthly/ECMWF/ERA-INT/mon/hfls/gn/v20210727/hfls_mon_ERA-INT_PCMDI_gn_197901-201903.nc
Downloading: 'obs4MIPs_PCMDI_monthly/ECMWF/ERA-INT/mon/hfss/gn/v20210727/hfss_mon_ERA-INT_PCMDI_gn_197901-201903.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/obs4MIPs_PCMDI_monthly/ECMWF/ERA-INT/mon/hfss/gn/v20210727/hfss_mon_ERA-INT_PCMDI_gn_197901-201903.nc
Downloading: 'obs4MIPs_PCMDI_monthly/ECMWF/ERA-INT/mon/hur/gn/v20210727/hur_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/hur/gn/v20210727/hur_mon_ERA-INT_PCMDI_gn_198901-201001.nc
Downloading: 'obs4MIPs_PCMDI_monthly/ECMWF/ERA-INT/mon/hus/gn/v20210727/hus_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/hus/gn/v20210727/hus_mon_ERA-INT_PCMDI_gn_198901-201001.nc
Downloading: 'obs4MIPs_PCMDI_monthly/ECMWF/ERA-INT/mon/pr/gn/v20210727/pr_mon_ERA-INT_PCMDI_gn_197901-201903.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/obs4MIPs_PCMDI_monthly/ECMWF/ERA-INT/mon/pr/gn/v20210727/pr_mon_ERA-INT_PCMDI_gn_197901-201903.nc
Downloading: 'obs4MIPs_PCMDI_monthly/ECMWF/ERA-INT/mon/psl/gn/v20210727/psl_mon_ERA-INT_PCMDI_gn_197901-201903.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/obs4MIPs_PCMDI_monthly/ECMWF/ERA-INT/mon/psl/gn/v20210727/psl_mon_ERA-INT_PCMDI_gn_197901-201903.nc
Downloading: 'obs4MIPs_PCMDI_monthly/ECMWF/ERA-INT/mon/rlds/gn/v20210727/rlds_mon_ERA-INT_PCMDI_gn_197901-201903.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/obs4MIPs_PCMDI_monthly/ECMWF/ERA-INT/mon/rlds/gn/v20210727/rlds_mon_ERA-INT_PCMDI_gn_197901-201903.nc
Downloading: 'obs4MIPs_PCMDI_monthly/ECMWF/ERA-INT/mon/rlus/gn/v20210727/rlus_mon_ERA-INT_PCMDI_gn_197901-201903.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/obs4MIPs_PCMDI_monthly/ECMWF/ERA-INT/mon/rlus/gn/v20210727/rlus_mon_ERA-INT_PCMDI_gn_197901-201903.nc
Downloading: 'obs4MIPs_PCMDI_monthly/ECMWF/ERA-INT/mon/rsds/gn/v20210727/rsds_mon_ERA-INT_PCMDI_gn_197901-201903.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/obs4MIPs_PCMDI_monthly/ECMWF/ERA-INT/mon/rsds/gn/v20210727/rsds_mon_ERA-INT_PCMDI_gn_197901-201903.nc
Downloading: 'obs4MIPs_PCMDI_monthly/ECMWF/ERA-INT/mon/rsus/gn/v20210727/rsus_mon_ERA-INT_PCMDI_gn_197901-201903.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/obs4MIPs_PCMDI_monthly/ECMWF/ERA-INT/mon/rsus/gn/v20210727/rsus_mon_ERA-INT_PCMDI_gn_197901-201903.nc
Downloading: 'obs4MIPs_PCMDI_monthly/ECMWF/ERA-INT/mon/sfcWind/gn/v20210727/sfcWind_mon_ERA-INT_PCMDI_gn_197901-201903.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/obs4MIPs_PCMDI_monthly/ECMWF/ERA-INT/mon/sfcWind/gn/v20210727/sfcWind_mon_ERA-INT_PCMDI_gn_197901-201903.nc
Downloading: 'obs4MIPs_PCMDI_monthly/ECMWF/ERA-INT/mon/ta/gn/v20210727/ta_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/ta/gn/v20210727/ta_mon_ERA-INT_PCMDI_gn_198901-201001.nc
Downloading: 'obs4MIPs_PCMDI_monthly/ECMWF/ERA-INT/mon/tauu/gn/v20210727/tauu_mon_ERA-INT_PCMDI_gn_197901-201903.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/obs4MIPs_PCMDI_monthly/ECMWF/ERA-INT/mon/tauu/gn/v20210727/tauu_mon_ERA-INT_PCMDI_gn_197901-201903.nc
Downloading: 'obs4MIPs_PCMDI_monthly/ECMWF/ERA-INT/mon/tauv/gn/v20210727/tauv_mon_ERA-INT_PCMDI_gn_197901-201903.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/obs4MIPs_PCMDI_monthly/ECMWF/ERA-INT/mon/tauv/gn/v20210727/tauv_mon_ERA-INT_PCMDI_gn_197901-201903.nc
Downloading: 'obs4MIPs_PCMDI_monthly/ECMWF/ERA-INT/mon/ts/gn/v20210727/ts_mon_ERA-INT_PCMDI_gn_197901-201903.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/obs4MIPs_PCMDI_monthly/ECMWF/ERA-INT/mon/ts/gn/v20210727/ts_mon_ERA-INT_PCMDI_gn_197901-201903.nc
Downloading: 'obs4MIPs_PCMDI_monthly/ECMWF/ERA-INT/mon/ua/gn/v20210727/ua_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/ua/gn/v20210727/ua_mon_ERA-INT_PCMDI_gn_198901-201001.nc
Downloading: 'obs4MIPs_PCMDI_monthly/ECMWF/ERA-INT/mon/uas/gn/v20210727/uas_mon_ERA-INT_PCMDI_gn_197901-201903.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/obs4MIPs_PCMDI_monthly/ECMWF/ERA-INT/mon/uas/gn/v20210727/uas_mon_ERA-INT_PCMDI_gn_197901-201903.nc
Downloading: 'obs4MIPs_PCMDI_monthly/ECMWF/ERA-INT/mon/va/gn/v20210727/va_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/va/gn/v20210727/va_mon_ERA-INT_PCMDI_gn_198901-201001.nc
Downloading: 'obs4MIPs_PCMDI_monthly/ECMWF/ERA-INT/mon/vas/gn/v20210727/vas_mon_ERA-INT_PCMDI_gn_197901-201903.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/obs4MIPs_PCMDI_monthly/ECMWF/ERA-INT/mon/vas/gn/v20210727/vas_mon_ERA-INT_PCMDI_gn_197901-201903.nc
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
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
Downloading: 'obs4MIPs_PCMDI_monthly/NASA-GSFC/TRMM-3B43v-7/mon/pr/gn/v20210727/pr_mon_TRMM-3B43v-7_PCMDI_gn_199801-201712.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/obs4MIPs_PCMDI_monthly/NASA-GSFC/TRMM-3B43v-7/mon/pr/gn/v20210727/pr_mon_TRMM-3B43v-7_PCMDI_gn_199801-201712.nc
Downloading: 'obs4MIPs_PCMDI_monthly/CNES/AVISO-1-0/mon/zos/gn/v20210727/zos_mon_AVISO-1-0_PCMDI_gn_199301-201912.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/obs4MIPs_PCMDI_monthly/CNES/AVISO-1-0/mon/zos/gn/v20210727/zos_mon_AVISO-1-0_PCMDI_gn_199301-201912.nc
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
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
Downloading: 'CMIP5_demo_data/hfls_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/CMIP5_demo_data/hfls_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc
Downloading: 'CMIP5_demo_data/hfss_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/CMIP5_demo_data/hfss_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc
Downloading: 'CMIP5_demo_data/pr_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/CMIP5_demo_data/pr_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc
Downloading: 'CMIP5_demo_data/rlds_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/CMIP5_demo_data/rlds_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc
Downloading: 'CMIP5_demo_data/rlus_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/CMIP5_demo_data/rlus_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc
Downloading: 'CMIP5_demo_data/rlut_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/CMIP5_demo_data/rlut_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc
Downloading: 'CMIP5_demo_data/rsds_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/CMIP5_demo_data/rsds_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc
Downloading: 'CMIP5_demo_data/rsdt_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/CMIP5_demo_data/rsdt_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc
Downloading: 'CMIP5_demo_data/rsus_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/CMIP5_demo_data/rsus_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc
Downloading: 'CMIP5_demo_data/rsut_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/CMIP5_demo_data/rsut_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc
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
Downloading: 'CMIP5_demo_data/tauu_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/CMIP5_demo_data/tauu_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc
Downloading: 'CMIP5_demo_data/zos_Omon_ACCESS1-0_historical_r1i1p1_185001-200512.nc' from 'https://pcmdiweb.llnl.gov/pss/pmpdata/' in: demo_data/CMIP5_demo_data/zos_Omon_ACCESS1-0_historical_r1i1p1_185001-200512.nc
All files downloaded
After downloading the data, we generate the parameter file for this demo.
[4]:
from download_sample_data import generate_parameter_files
filenames=["basic_enso_param.py.in"]
generate_parameter_files(demo_data_directory, demo_output_directory, filenames=filenames)
Preparing parameter file: basic_enso_param.py
Saving User Choices
Usage
The ENSO driver can be run from the command line as enso_driver.py
. In this notebook, we will use bash cell magic (cells beginning with %%bash
) to run the ENSO driver as a subprocess.
For help, type:
enso_driver.py --help
[5]:
%%bash
enso_driver.py --help
usage: enso_driver.py [-h] [--parameters PARAMETERS]
[--diags OTHER_PARAMETERS [OTHER_PARAMETERS ...]]
[--mip MIP] [--exp EXP] [--modpath MODPATH]
[--modpath_lf MODPATH_LF]
[--modnames MODNAMES [MODNAMES ...]] [-r REALIZATION]
[--reference_data_path REFERENCE_DATA_PATH]
[--reference_data_lf_path REFERENCE_DATA_LF_PATH]
[--metricsCollection METRICSCOLLECTION]
[--json_name JSON_NAME] [--netcdf_name NETCDF_NAME]
[--results_dir RESULTS_DIR] [--case_id CASE_ID]
[--obs_catalogue OBS_CATALOGUE]
[--obs_cmor_path OBS_CMOR_PATH] [-d [DEBUG]]
[--obs_cmor [OBS_CMOR]] [--nc_out [NC_OUT]]
options:
-h, --help show this help message and exit
--parameters PARAMETERS, -p PARAMETERS
--diags OTHER_PARAMETERS [OTHER_PARAMETERS ...]
Path to other user-defined parameter file. (default:
None)
--mip MIP A WCRP MIP project such as CMIP3 and CMIP5 (default:
cmip5)
--exp EXP An experiment such as AMIP, historical or pi-contorl
(default: historical)
--modpath MODPATH, --mp MODPATH
Explicit path to model data (default: None)
--modpath_lf MODPATH_LF
Directory path to model land fraction field (default:
None)
--modnames MODNAMES [MODNAMES ...]
List of models (default: None)
-r REALIZATION, --realization REALIZATION
Consider all accessible realizations as idividual -
r1i1p1: default, consider only 'r1i1p1' member Or,
specify realization, e.g, r3i1p1' - *: consider all
available realizations (default: r1i1p1)
--reference_data_path REFERENCE_DATA_PATH, --rdp REFERENCE_DATA_PATH
The path/filename of reference (obs) data. (default:
None)
--reference_data_lf_path REFERENCE_DATA_LF_PATH
Data path to land fraction of reference dataset
(default: None)
--metricsCollection METRICSCOLLECTION
Metrics Collection e.g. ENSO_perf, ENSO_tel, or
ENSO_proc (default: ENSO_perf)
--json_name JSON_NAME
File name for output JSON (default: None)
--netcdf_name NETCDF_NAME
File name for output NetCDF (default: None)
--results_dir RESULTS_DIR, --rd RESULTS_DIR
The name of the folder where all runs will be stored.
(default: None)
--case_id CASE_ID version as date, e.g., v20191116 (yyyy-mm-dd)
(default: v20240702)
--obs_catalogue OBS_CATALOGUE
obs_catalogue JSON file for CMORized observation,
default is None (default: None)
--obs_cmor_path OBS_CMOR_PATH
Directory path for CMORized observation dataset,
default is None (default: None)
-d [DEBUG], --debug [DEBUG]
Option for debug: True / False (defualt) (default:
False)
--obs_cmor [OBS_CMOR]
Use CMORized reference database?: True / False
(defualt) (default: False)
--nc_out [NC_OUT] Option for generate netCDF file output: True (default)
/ False (default: True)
Basic example
Parameters for the ENSO Metrics can be set on the command line or using a parameter file. This first example will use a parameter file, which is shown below.
[6]:
with open("basic_enso_param.py") as f:
print(f.read())
import os
#
# OPTIONS ARE SET BY USER IN THIS FILE AS INDICATED BELOW BY:
#
#
# MODELS
modnames = ['ACCESS1-0']
mip = 'cmip5' # cmip5, cmip6
exp = 'historical' # historical, piControl
realization = 'r1i1p1'
modpath = 'demo_data/CMIP5_demo_data/%(variable)_Amon_%(model)_historical_%(realization)_185001-200512.nc'
modpath_lf = 'demo_data/CMIP5_demo_data/sftlf_fx_%(model)_amip_r0i0p0.nc'
# OBSERVATIONS
obs_cmor = True
obs_cmor_path = "demo_data/obs4MIPs_PCMDI_monthly"
obs_catalogue = "demo_data/obs4MIPs_PCMDI-CEM2021_monthly_bySource_catalogue_v20210805_demo.json"
# METRICS COLLECTION
metricsCollection = 'ENSO_perf' # ENSO_perf, ENSO_tel, ENSO_proc
# OUTPUT
case_id = 'basicTestEnso'
results_dir = os.path.join('demo_output',case_id, metricsCollection)
json_name = '%(mip)_%(exp)_%(metricsCollection)_%(case_id)_%(model)_%(realization)'
netcdf_name = json_name
nc_out = False
The next cell runs the ENSO driver using the basic parameter file. This may take several minutes.
[7]:
%%bash
enso_driver.py -p basic_enso_param.py
mip: cmip5
exp: historical
models: ['ACCESS1-0']
realization: r1i1p1
mc_name: ENSO_perf
outdir: demo_output/basicTestEnso/ENSO_perf
netcdf_path: demo_output/basicTestEnso/ENSO_perf
debug: False
obs_cmor: True
obs_cmor_path: demo_data/obs4MIPs_PCMDI_monthly
egg_pth: /home/ordonez4/miniconda3/envs/pmp_test/share/pmp
output directory for graphics:demo_output/basicTestEnso/ENSO_perf
output directory for diagnostic_results:demo_output/basicTestEnso/ENSO_perf
output directory for metrics_results:demo_output/basicTestEnso/ENSO_perf
list_variables: ['pr', 'sst', 'taux']
list_obs: ['AVISO-1-0', 'ERA-INT', 'GPCP-2-3', 'HadISST-1-1']
PMPdriver: dict_obs readin end
Process start: Tue Jul 2 14:34:34 2024
models: ['ACCESS1-0']
----- model: ACCESS1-0 ---------------------
PMPdriver: var loop start for model ACCESS1-0
realization: r1i1p1
--- run: r1i1p1 ---
--- var: pr ---
var_in_file: pr
var, areacell_in_file, realm: pr areacella atmos
path: demo_data/CMIP5_demo_data/pr_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc
file_list: ['demo_data/CMIP5_demo_data/pr_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc']
path: demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc
file_list: ['demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc']
path: demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc
file_list: ['demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc']
PMPdriver: var loop end
--- var: sst ---
var_in_file: ts
var, areacell_in_file, realm: sst areacella atmos
path: demo_data/CMIP5_demo_data/ts_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc
file_list: ['demo_data/CMIP5_demo_data/ts_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc']
path: demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc
file_list: ['demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc']
path: demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc
file_list: ['demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc']
PMPdriver: var loop end
--- var: taux ---
var_in_file: tauu
var, areacell_in_file, realm: taux areacella atmos
path: demo_data/CMIP5_demo_data/tauu_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc
file_list: ['demo_data/CMIP5_demo_data/tauu_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc']
path: demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc
file_list: ['demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc']
path: demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc
file_list: ['demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc']
PMPdriver: var loop end
dictDatasets:
{
"model": {
"ACCESS1-0_r1i1p1": {
"pr": {
"areaname": "areacella",
"landmaskname": "sftlf",
"path + filename": "demo_data/CMIP5_demo_data/pr_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc",
"path + filename_area": "demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc",
"path + filename_landmask": "demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc",
"varname": "pr"
},
"sst": {
"areaname": "areacella",
"landmaskname": "sftlf",
"path + filename": "demo_data/CMIP5_demo_data/ts_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc",
"path + filename_area": "demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc",
"path + filename_landmask": "demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc",
"varname": "ts"
},
"taux": {
"areaname": "areacella",
"landmaskname": "sftlf",
"path + filename": "demo_data/CMIP5_demo_data/tauu_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc",
"path + filename_area": "demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc",
"path + filename_landmask": "demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc",
"varname": "tauu"
}
}
},
"observations": {
"ERA-Interim": {
"pr": {
"areaname": "areacella",
"landmaskname": "sftlf",
"path + filename": "demo_data/obs4MIPs_PCMDI_monthly/ECMWF/ERA-INT/mon/pr/gn/v20210727/pr_mon_ERA-INT_PCMDI_gn_197901-201903.nc",
"path + filename_area": null,
"path + filename_landmask": null,
"varname": "pr"
},
"sst": {
"areaname": "areacella",
"landmaskname": "sftlf",
"path + filename": "demo_data/obs4MIPs_PCMDI_monthly/ECMWF/ERA-INT/mon/ts/gn/v20210727/ts_mon_ERA-INT_PCMDI_gn_197901-201903.nc",
"path + filename_area": null,
"path + filename_landmask": null,
"varname": "ts"
},
"taux": {
"areaname": "areacella",
"landmaskname": "sftlf",
"path + filename": "demo_data/obs4MIPs_PCMDI_monthly/ECMWF/ERA-INT/mon/tauu/gn/v20210727/tauu_mon_ERA-INT_PCMDI_gn_197901-201903.nc",
"path + filename_area": null,
"path + filename_landmask": null,
"varname": "tauu"
}
},
"GPCPv2.3": {
"pr": {
"areaname": "areacella",
"landmaskname": "sftlf",
"path + filename": "demo_data/obs4MIPs_PCMDI_monthly/NOAA-NCEI/GPCP-2-3/mon/pr/gn/v20210727/pr_mon_GPCP-2-3_PCMDI_gn_197901-201907.nc",
"path + filename_area": null,
"path + filename_landmask": null,
"varname": "pr"
}
},
"HadISST": {
"sst": {
"areaname": "areacella",
"landmaskname": "sftlf",
"path + filename": "demo_data/obs4MIPs_PCMDI_monthly/MOHC/HadISST-1-1/mon/ts/gn/v20210727/ts_mon_HadISST-1-1_PCMDI_gn_187001-201907.nc",
"path + filename_area": null,
"path + filename_landmask": null,
"varname": "ts"
}
}
}
}
### Compute the metric collection ###
ComputeCollection: metric = BiasPrLatRmse
ComputeMetric: oneVarRMSmetric, BiasPrLatRmse = ACCESS1-0_r1i1p1 and ERA-Interim
NOTE: Estimated landmask applied
EnsoUvcdatToolsLib AverageZonal
EnsoUvcdatToolsLib AverageZonal
ComputeMetric: oneVarRMSmetric, BiasPrLatRmse = ACCESS1-0_r1i1p1 and GPCPv2.3
NOTE: Estimated landmask applied
EnsoUvcdatToolsLib AverageZonal
EnsoUvcdatToolsLib AverageZonal
ComputeCollection: metric = BiasPrLonRmse
ComputeMetric: oneVarRMSmetric, BiasPrLonRmse = ACCESS1-0_r1i1p1 and ERA-Interim
NOTE: Estimated landmask applied
EnsoUvcdatToolsLib AverageMeridional
EnsoUvcdatToolsLib AverageMeridional
ComputeMetric: oneVarRMSmetric, BiasPrLonRmse = ACCESS1-0_r1i1p1 and GPCPv2.3
NOTE: Estimated landmask applied
EnsoUvcdatToolsLib AverageMeridional
EnsoUvcdatToolsLib AverageMeridional
ComputeCollection: metric = BiasSstLonRmse
ComputeMetric: oneVarRMSmetric, BiasSstLonRmse = ACCESS1-0_r1i1p1 and ERA-Interim
NOTE: Estimated landmask applied
EnsoUvcdatToolsLib AverageMeridional
EnsoUvcdatToolsLib AverageMeridional
ComputeMetric: oneVarRMSmetric, BiasSstLonRmse = ACCESS1-0_r1i1p1 and HadISST
NOTE: Estimated landmask applied
EnsoUvcdatToolsLib AverageMeridional
EnsoUvcdatToolsLib AverageMeridional
ComputeCollection: metric = BiasTauxLonRmse
/home/ordonez4/miniconda3/envs/pmp_test/lib/python3.10/site-packages/cdms2/MV2.py:318: Warning: arguments order for compress function has changed
it is now: MV2.copmress(array,condition), if your code seems to not react or act wrong to a call to compress, please check this
warnings.warn(
INFO::2024-07-02 14:42::pcmdi_metrics:: Results saved to a json file: /home/ordonez4/git/pcmdi_metrics/doc/jupyter/Demo/demo_output/basicTestEnso/ENSO_perf/cmip5_historical_ENSO_perf_basicTestEnso_ACCESS1-0_r1i1p1.json
2024-07-02 14:42:16,724 [INFO]: base.py(write:443) >> Results saved to a json file: /home/ordonez4/git/pcmdi_metrics/doc/jupyter/Demo/demo_output/basicTestEnso/ENSO_perf/cmip5_historical_ENSO_perf_basicTestEnso_ACCESS1-0_r1i1p1.json
2024-07-02 14:42:16,724 [INFO]: base.py(write:443) >> Results saved to a json file: /home/ordonez4/git/pcmdi_metrics/doc/jupyter/Demo/demo_output/basicTestEnso/ENSO_perf/cmip5_historical_ENSO_perf_basicTestEnso_ACCESS1-0_r1i1p1.json
INFO::2024-07-02 14:42::pcmdi_metrics:: Results saved to a json file: /home/ordonez4/git/pcmdi_metrics/doc/jupyter/Demo/demo_output/basicTestEnso/ENSO_perf/cmip5_historical_ENSO_perf_basicTestEnso_ACCESS1-0_r1i1p1_diveDown.json
2024-07-02 14:42:29,862 [INFO]: base.py(write:443) >> Results saved to a json file: /home/ordonez4/git/pcmdi_metrics/doc/jupyter/Demo/demo_output/basicTestEnso/ENSO_perf/cmip5_historical_ENSO_perf_basicTestEnso_ACCESS1-0_r1i1p1_diveDown.json
2024-07-02 14:42:29,862 [INFO]: base.py(write:443) >> Results saved to a json file: /home/ordonez4/git/pcmdi_metrics/doc/jupyter/Demo/demo_output/basicTestEnso/ENSO_perf/cmip5_historical_ENSO_perf_basicTestEnso_ACCESS1-0_r1i1p1_diveDown.json
ComputeMetric: oneVarRMSmetric, BiasTauxLonRmse = ACCESS1-0_r1i1p1 and ERA-Interim
EnsoUvcdatToolsLib AverageHorizontal
NOTE: Estimated landmask applied
EnsoUvcdatToolsLib AverageHorizontal
NOTE: Estimated landmask applied
EnsoUvcdatToolsLib AverageMeridional
EnsoUvcdatToolsLib AverageMeridional
ComputeCollection: metric = EnsoAmpl
ComputeMetric: oneVarmetric = ACCESS1-0_r1i1p1
ComputeMetric: oneVarmetric = ERA-Interim
NOTE: Estimated landmask applied
ComputeMetric: oneVarmetric = HadISST
NOTE: Estimated landmask applied
ComputeCollection: metric = EnsoDuration
ComputeMetric: oneVarmetric = ACCESS1-0_r1i1p1
ComputeMetric: oneVarmetric = ERA-Interim
NOTE: Estimated landmask applied
ComputeMetric: oneVarmetric = HadISST
NOTE: Estimated landmask applied
ComputeCollection: metric = EnsoSeasonality
ComputeMetric: oneVarmetric = ACCESS1-0_r1i1p1
ComputeMetric: oneVarmetric = ERA-Interim
NOTE: Estimated landmask applied
ComputeMetric: oneVarmetric = HadISST
NOTE: Estimated landmask applied
ComputeCollection: metric = EnsoSstDiversity_2
ComputeMetric: oneVarmetric = ACCESS1-0_r1i1p1
EnsoUvcdatToolsLib AverageMeridional
ComputeMetric: oneVarmetric = ERA-Interim
NOTE: Estimated landmask applied
NOTE: Estimated landmask applied
EnsoUvcdatToolsLib AverageMeridional
ComputeMetric: oneVarmetric = HadISST
NOTE: Estimated landmask applied
NOTE: Estimated landmask applied
EnsoUvcdatToolsLib AverageMeridional
ComputeCollection: metric = EnsoSstLonRmse
ComputeMetric: oneVarRMSmetric, EnsoSstLonRmse = ACCESS1-0_r1i1p1 and ERA-Interim
NOTE: Estimated landmask applied
NOTE: Estimated landmask applied
EnsoUvcdatToolsLib AverageMeridional
EnsoUvcdatToolsLib AverageMeridional
ComputeMetric: oneVarRMSmetric, EnsoSstLonRmse = ACCESS1-0_r1i1p1 and HadISST
NOTE: Estimated landmask applied
NOTE: Estimated landmask applied
EnsoUvcdatToolsLib AverageMeridional
EnsoUvcdatToolsLib AverageMeridional
ComputeCollection: metric = EnsoSstSkew
ComputeMetric: oneVarmetric = ACCESS1-0_r1i1p1
ComputeMetric: oneVarmetric = ERA-Interim
NOTE: Estimated landmask applied
ComputeMetric: oneVarmetric = HadISST
NOTE: Estimated landmask applied
ComputeCollection: metric = EnsoSstTsRmse
ComputeMetric: oneVarRMSmetric, EnsoSstTsRmse = ACCESS1-0_r1i1p1 and ERA-Interim
NOTE: Estimated landmask applied
ComputeMetric: oneVarRMSmetric, EnsoSstTsRmse = ACCESS1-0_r1i1p1 and HadISST
NOTE: Estimated landmask applied
ComputeCollection: metric = SeasonalPrLatRmse
ComputeMetric: oneVarRMSmetric, SeasonalPrLatRmse = ACCESS1-0_r1i1p1 and ERA-Interim
NOTE: Estimated landmask applied
EnsoUvcdatToolsLib AverageZonal
EnsoUvcdatToolsLib AverageZonal
ComputeMetric: oneVarRMSmetric, SeasonalPrLatRmse = ACCESS1-0_r1i1p1 and GPCPv2.3
NOTE: Estimated landmask applied
EnsoUvcdatToolsLib AverageZonal
EnsoUvcdatToolsLib AverageZonal
ComputeCollection: metric = SeasonalPrLonRmse
ComputeMetric: oneVarRMSmetric, SeasonalPrLonRmse = ACCESS1-0_r1i1p1 and ERA-Interim
NOTE: Estimated landmask applied
EnsoUvcdatToolsLib AverageMeridional
EnsoUvcdatToolsLib AverageMeridional
ComputeMetric: oneVarRMSmetric, SeasonalPrLonRmse = ACCESS1-0_r1i1p1 and GPCPv2.3
NOTE: Estimated landmask applied
EnsoUvcdatToolsLib AverageMeridional
EnsoUvcdatToolsLib AverageMeridional
ComputeCollection: metric = SeasonalSstLonRmse
ComputeMetric: oneVarRMSmetric, SeasonalSstLonRmse = ACCESS1-0_r1i1p1 and ERA-Interim
NOTE: Estimated landmask applied
EnsoUvcdatToolsLib AverageMeridional
EnsoUvcdatToolsLib AverageMeridional
ComputeMetric: oneVarRMSmetric, SeasonalSstLonRmse = ACCESS1-0_r1i1p1 and HadISST
NOTE: Estimated landmask applied
EnsoUvcdatToolsLib AverageMeridional
EnsoUvcdatToolsLib AverageMeridional
ComputeCollection: metric = SeasonalTauxLonRmse
ComputeMetric: oneVarRMSmetric, SeasonalTauxLonRmse = ACCESS1-0_r1i1p1 and ERA-Interim
EnsoUvcdatToolsLib AverageHorizontal
NOTE: Estimated landmask applied
EnsoUvcdatToolsLib AverageHorizontal
NOTE: Estimated landmask applied
EnsoUvcdatToolsLib AverageMeridional
EnsoUvcdatToolsLib AverageMeridional
PMPdriver: model loop end
Process end: Tue Jul 2 14:42:29 2024
diveDown metrics are not available in all cases.
The results section of cmip5_historical_ENSO_perf_basicTestEnso_ACCESS1-0_r1i1p1.json is shown below.
[8]:
import json
metrics_file=demo_output_directory+"/basicTestEnso/ENSO_perf/cmip5_historical_ENSO_perf_basicTestEnso_ACCESS1-0_r1i1p1.json"
with open(metrics_file) as f:
results = json.load(f)["RESULTS"]["model"]["ACCESS1-0"]["r1i1p1"]["value"]
print(json.dumps(results, indent = 2))
{
"BiasPrLatRmse": {
"diagnostic": {
"ACCESS1-0_r1i1p1": {
"value": null,
"value_error": null
},
"ERA-Interim": {
"value": null,
"value_error": null
},
"GPCPv2.3": {
"value": null,
"value_error": null
}
},
"metric": {
"ERA-Interim": {
"value": 1.1075304623846065,
"value_error": null
},
"GPCPv2.3": {
"value": 1.9301242972172135,
"value_error": null
}
}
},
"BiasPrLonRmse": {
"diagnostic": {
"ACCESS1-0_r1i1p1": {
"value": null,
"value_error": null
},
"ERA-Interim": {
"value": null,
"value_error": null
},
"GPCPv2.3": {
"value": null,
"value_error": null
}
},
"metric": {
"ERA-Interim": {
"value": 0.6464917771721344,
"value_error": null
},
"GPCPv2.3": {
"value": 1.4165839641155156,
"value_error": null
}
}
},
"BiasSstLonRmse": {
"diagnostic": {
"ACCESS1-0_r1i1p1": {
"value": null,
"value_error": null
},
"ERA-Interim": {
"value": null,
"value_error": null
},
"HadISST": {
"value": null,
"value_error": null
}
},
"metric": {
"ERA-Interim": {
"value": 0.6404287493308193,
"value_error": null
},
"HadISST": {
"value": 0.49054786718298193,
"value_error": null
}
}
},
"BiasTauxLonRmse": {
"diagnostic": {
"ACCESS1-0_r1i1p1": {
"value": null,
"value_error": null
},
"ERA-Interim": {
"value": null,
"value_error": null
}
},
"metric": {
"ERA-Interim": {
"value": 5.8373124987935965,
"value_error": null
}
}
},
"EnsoAmpl": {
"diagnostic": {
"ACCESS1-0_r1i1p1": {
"value": 0.6630260736952586,
"value_error": 0.0530845705527287
},
"ERA-Interim": {
"value": 0.9001341048707652,
"value_error": 0.1423236985494241
},
"HadISST": {
"value": 0.7688706055408969,
"value_error": 0.06298833428079066
}
},
"metric": {
"ERA-Interim": {
"value": 26.341411784363938,
"value_error": 17.543852271121864
},
"HadISST": {
"value": 13.766234667168376,
"value_error": 13.968772137924121
}
}
},
"EnsoDuration": {
"diagnostic": {
"ACCESS1-0_r1i1p1": {
"value": 12.0,
"value_error": null
},
"ERA-Interim": {
"value": 13.0,
"value_error": null
},
"HadISST": {
"value": 13.0,
"value_error": null
}
},
"metric": {
"ERA-Interim": {
"value": 7.6923076923076925,
"value_error": null
},
"HadISST": {
"value": 7.6923076923076925,
"value_error": null
}
}
},
"EnsoSeasonality": {
"diagnostic": {
"ACCESS1-0_r1i1p1": {
"value": 1.6580607964897247,
"value_error": 0.26592975514284783
},
"ERA-Interim": {
"value": 2.052960042006758,
"value_error": 0.6533381852649718
},
"HadISST": {
"value": 1.666626760243124,
"value_error": 0.27353125995822913
}
},
"metric": {
"ERA-Interim": {
"value": 19.235603101705838,
"value_error": 38.65610552276642
},
"HadISST": {
"value": 0.5139701316298112,
"value_error": 32.284081772797805
}
}
},
"EnsoSstDiversity_2": {
"diagnostic": {
"ACCESS1-0_r1i1p1": {
"value": 10.0,
"value_error": null
},
"ERA-Interim": {
"value": 32.0,
"value_error": null
},
"HadISST": {
"value": 49.0,
"value_error": null
}
},
"metric": {
"ERA-Interim": {
"value": 68.75,
"value_error": null
},
"HadISST": {
"value": 79.59183673469387,
"value_error": null
}
}
},
"EnsoSstLonRmse": {
"diagnostic": {
"ACCESS1-0_r1i1p1": {
"value": null,
"value_error": null
},
"ERA-Interim": {
"value": null,
"value_error": null
},
"HadISST": {
"value": null,
"value_error": null
}
},
"metric": {
"ERA-Interim": {
"value": 0.16401033023030476,
"value_error": null
},
"HadISST": {
"value": 0.14620423327573992,
"value_error": null
}
}
},
"EnsoSstSkew": {
"diagnostic": {
"ACCESS1-0_r1i1p1": {
"value": -0.3339196537261687,
"value_error": -0.02673496883520269
},
"ERA-Interim": {
"value": 0.40501535626049495,
"value_error": 0.06403855065638503
},
"HadISST": {
"value": 0.40320728014992363,
"value_error": 0.033032027448448076
}
},
"metric": {
"ERA-Interim": {
"value": 182.4461711302128,
"value_error": -19.63686084226418
},
"HadISST": {
"value": 182.81587911855365,
"value_error": -13.415118084476173
}
}
},
"EnsoSstTsRmse": {
"diagnostic": {
"ACCESS1-0_r1i1p1": {
"value": null,
"value_error": null
},
"ERA-Interim": {
"value": null,
"value_error": null
},
"HadISST": {
"value": null,
"value_error": null
}
},
"metric": {
"ERA-Interim": {
"value": 0.10604060446246283,
"value_error": null
},
"HadISST": {
"value": 0.07377326537861505,
"value_error": null
}
}
},
"SeasonalPrLatRmse": {
"diagnostic": {
"ACCESS1-0_r1i1p1": {
"value": null,
"value_error": null
},
"ERA-Interim": {
"value": null,
"value_error": null
},
"GPCPv2.3": {
"value": null,
"value_error": null
}
},
"metric": {
"ERA-Interim": {
"value": 1.1594264845137487,
"value_error": null
},
"GPCPv2.3": {
"value": 1.5589152451460864,
"value_error": null
}
}
},
"SeasonalPrLonRmse": {
"diagnostic": {
"ACCESS1-0_r1i1p1": {
"value": null,
"value_error": null
},
"ERA-Interim": {
"value": null,
"value_error": null
},
"GPCPv2.3": {
"value": null,
"value_error": null
}
},
"metric": {
"ERA-Interim": {
"value": 1.2638515328921658,
"value_error": null
},
"GPCPv2.3": {
"value": 1.4219913613495798,
"value_error": null
}
}
},
"SeasonalSstLonRmse": {
"diagnostic": {
"ACCESS1-0_r1i1p1": {
"value": null,
"value_error": null
},
"ERA-Interim": {
"value": null,
"value_error": null
},
"HadISST": {
"value": null,
"value_error": null
}
},
"metric": {
"ERA-Interim": {
"value": 0.28801464882030564,
"value_error": null
},
"HadISST": {
"value": 0.3080045183114524,
"value_error": null
}
}
},
"SeasonalTauxLonRmse": {
"diagnostic": {
"ACCESS1-0_r1i1p1": {
"value": null,
"value_error": null
},
"ERA-Interim": {
"value": null,
"value_error": null
}
},
"metric": {
"ERA-Interim": {
"value": 4.234563898790571,
"value_error": null
}
}
}
}
ENSO Metrics Collections
They can be selected using the --metricsCollection
flag. The first example used the “ENSO_perf” collection.
The next example runs the teleconnection collection. To save individual metrics in netCDF format, it uses the --nc_out
flag.
[9]:
%%bash -s "$demo_output_directory"
enso_driver.py -p basic_enso_param.py \
--metricsCollection ENSO_tel \
--results_dir $1/basicTestEnso/ENSO_tel \
--nc_out True
/home/ordonez4/miniconda3/envs/pmp_test/lib/python3.10/site-packages/cdms2/MV2.py:318: Warning: arguments order for compress function has changed
it is now: MV2.copmress(array,condition), if your code seems to not react or act wrong to a call to compress, please check this
warnings.warn(
mip: cmip5
exp: historical
models: ['ACCESS1-0']
realization: r1i1p1
mc_name: ENSO_tel
outdir: demo_output/basicTestEnso/ENSO_tel
netcdf_path: demo_output/basicTestEnso/ENSO_tel
debug: False
obs_cmor: True
obs_cmor_path: demo_data/obs4MIPs_PCMDI_monthly
egg_pth: /home/ordonez4/miniconda3/envs/pmp_test/share/pmp
output directory for graphics:demo_output/basicTestEnso/ENSO_tel
output directory for diagnostic_results:demo_output/basicTestEnso/ENSO_tel
output directory for metrics_results:demo_output/basicTestEnso/ENSO_tel
list_variables: ['pr', 'sst']
list_obs: ['AVISO-1-0', 'ERA-INT', 'GPCP-2-3', 'HadISST-1-1']
PMPdriver: dict_obs readin end
Process start: Tue Jul 2 14:42:40 2024
models: ['ACCESS1-0']
----- model: ACCESS1-0 ---------------------
PMPdriver: var loop start for model ACCESS1-0
realization: r1i1p1
--- run: r1i1p1 ---
--- var: pr ---
var_in_file: pr
var, areacell_in_file, realm: pr areacella atmos
path: demo_data/CMIP5_demo_data/pr_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc
file_list: ['demo_data/CMIP5_demo_data/pr_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc']
path: demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc
file_list: ['demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc']
path: demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc
file_list: ['demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc']
PMPdriver: var loop end
--- var: sst ---
var_in_file: ts
var, areacell_in_file, realm: sst areacella atmos
path: demo_data/CMIP5_demo_data/ts_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc
file_list: ['demo_data/CMIP5_demo_data/ts_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc']
path: demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc
file_list: ['demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc']
path: demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc
file_list: ['demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc']
PMPdriver: var loop end
dictDatasets:
{
"model": {
"ACCESS1-0_r1i1p1": {
"pr": {
"areaname": "areacella",
"landmaskname": "sftlf",
"path + filename": "demo_data/CMIP5_demo_data/pr_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc",
"path + filename_area": "demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc",
"path + filename_landmask": "demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc",
"varname": "pr"
},
"sst": {
"areaname": "areacella",
"landmaskname": "sftlf",
"path + filename": "demo_data/CMIP5_demo_data/ts_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc",
"path + filename_area": "demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc",
"path + filename_landmask": "demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc",
"varname": "ts"
}
}
},
"observations": {
"ERA-Interim": {
"pr": {
"areaname": "areacella",
"landmaskname": "sftlf",
"path + filename": "demo_data/obs4MIPs_PCMDI_monthly/ECMWF/ERA-INT/mon/pr/gn/v20210727/pr_mon_ERA-INT_PCMDI_gn_197901-201903.nc",
"path + filename_area": null,
"path + filename_landmask": null,
"varname": "pr"
},
"sst": {
"areaname": "areacella",
"landmaskname": "sftlf",
"path + filename": "demo_data/obs4MIPs_PCMDI_monthly/ECMWF/ERA-INT/mon/ts/gn/v20210727/ts_mon_ERA-INT_PCMDI_gn_197901-201903.nc",
"path + filename_area": null,
"path + filename_landmask": null,
"varname": "ts"
}
},
"GPCPv2.3": {
"pr": {
"areaname": "areacella",
"landmaskname": "sftlf",
"path + filename": "demo_data/obs4MIPs_PCMDI_monthly/NOAA-NCEI/GPCP-2-3/mon/pr/gn/v20210727/pr_mon_GPCP-2-3_PCMDI_gn_197901-201907.nc",
"path + filename_area": null,
"path + filename_landmask": null,
"varname": "pr"
}
},
"HadISST": {
"sst": {
"areaname": "areacella",
"landmaskname": "sftlf",
"path + filename": "demo_data/obs4MIPs_PCMDI_monthly/MOHC/HadISST-1-1/mon/ts/gn/v20210727/ts_mon_HadISST-1-1_PCMDI_gn_187001-201907.nc",
"path + filename_area": null,
"path + filename_landmask": null,
"varname": "ts"
}
}
}
}
### Compute the metric collection ###
ComputeCollection: metric = EnsoAmpl
ComputeMetric: oneVarmetric = ACCESS1-0_r1i1p1
EnsoUvcdatToolsLib AverageMeridional
ComputeMetric: oneVarmetric = ERA-Interim
NOTE: Estimated landmask applied
NOTE: Estimated landmask applied
NOTE: Estimated landmask applied
EnsoUvcdatToolsLib AverageMeridional
ComputeMetric: oneVarmetric = HadISST
NOTE: Estimated landmask applied
%%%%% ----- %%%%%
ERROR File /home/ordonez4/miniconda3/envs/pmp_test/lib/python3.10/site-packages/EnsoMetrics/EnsoUvcdatToolsLib.py, line 1208, in CheckUnits: units
the file says that temperature (ts) is in K but it seems unlikely ([-1e+30, 304.7203])
%%%%% ----- %%%%%
NOTE: Estimated landmask applied
NOTE: Estimated landmask applied
ComputeCollection: metric = EnsoPrMapDjf
ComputeMetric: twoVarRMSmetric, EnsoPrMapDjf = ACCESS1-0_r1i1p1 and ERA-Interim_ERA-Interim
NOTE: Estimated landmask applied
NOTE: Estimated landmask applied
NOTE: Estimated landmask applied
ComputeMetric: twoVarRMSmetric, EnsoPrMapDjf = ACCESS1-0_r1i1p1 and ERA-Interim_GPCPv2.3
NOTE: Estimated landmask applied
NOTE: Estimated landmask applied
NOTE: Estimated landmask applied
ComputeMetric: twoVarRMSmetric, EnsoPrMapDjf = ACCESS1-0_r1i1p1 and HadISST_ERA-Interim
NOTE: Estimated landmask applied
NOTE: Estimated landmask applied
NOTE: Estimated landmask applied
ComputeMetric: twoVarRMSmetric, EnsoPrMapDjf = ACCESS1-0_r1i1p1 and HadISST_GPCPv2.3
NOTE: Estimated landmask applied
NOTE: Estimated landmask applied
NOTE: Estimated landmask applied
ComputeCollection: metric = EnsoPrMapJja
ComputeMetric: twoVarRMSmetric, EnsoPrMapJja = ACCESS1-0_r1i1p1 and ERA-Interim_ERA-Interim
NOTE: Estimated landmask applied
NOTE: Estimated landmask applied
NOTE: Estimated landmask applied
ComputeMetric: twoVarRMSmetric, EnsoPrMapJja = ACCESS1-0_r1i1p1 and ERA-Interim_GPCPv2.3
NOTE: Estimated landmask applied
NOTE: Estimated landmask applied
NOTE: Estimated landmask applied
ComputeMetric: twoVarRMSmetric, EnsoPrMapJja = ACCESS1-0_r1i1p1 and HadISST_ERA-Interim
NOTE: Estimated landmask applied
NOTE: Estimated landmask applied
NOTE: Estimated landmask applied
INFO::2024-07-02 14:58::pcmdi_metrics:: Results saved to a json file: /home/ordonez4/git/pcmdi_metrics/doc/jupyter/Demo/demo_output/basicTestEnso/ENSO_tel/cmip5_historical_ENSO_tel_basicTestEnso_ACCESS1-0_r1i1p1.json
2024-07-02 14:58:27,009 [INFO]: base.py(write:443) >> Results saved to a json file: /home/ordonez4/git/pcmdi_metrics/doc/jupyter/Demo/demo_output/basicTestEnso/ENSO_tel/cmip5_historical_ENSO_tel_basicTestEnso_ACCESS1-0_r1i1p1.json
2024-07-02 14:58:27,009 [INFO]: base.py(write:443) >> Results saved to a json file: /home/ordonez4/git/pcmdi_metrics/doc/jupyter/Demo/demo_output/basicTestEnso/ENSO_tel/cmip5_historical_ENSO_tel_basicTestEnso_ACCESS1-0_r1i1p1.json
INFO::2024-07-02 14:58::pcmdi_metrics:: Results saved to a json file: /home/ordonez4/git/pcmdi_metrics/doc/jupyter/Demo/demo_output/basicTestEnso/ENSO_tel/cmip5_historical_ENSO_tel_basicTestEnso_ACCESS1-0_r1i1p1_diveDown.json
2024-07-02 14:58:39,971 [INFO]: base.py(write:443) >> Results saved to a json file: /home/ordonez4/git/pcmdi_metrics/doc/jupyter/Demo/demo_output/basicTestEnso/ENSO_tel/cmip5_historical_ENSO_tel_basicTestEnso_ACCESS1-0_r1i1p1_diveDown.json
2024-07-02 14:58:39,971 [INFO]: base.py(write:443) >> Results saved to a json file: /home/ordonez4/git/pcmdi_metrics/doc/jupyter/Demo/demo_output/basicTestEnso/ENSO_tel/cmip5_historical_ENSO_tel_basicTestEnso_ACCESS1-0_r1i1p1_diveDown.json
ComputeMetric: twoVarRMSmetric, EnsoPrMapJja = ACCESS1-0_r1i1p1 and HadISST_GPCPv2.3
NOTE: Estimated landmask applied
NOTE: Estimated landmask applied
NOTE: Estimated landmask applied
ComputeCollection: metric = EnsoSeasonality
ComputeMetric: oneVarmetric = ACCESS1-0_r1i1p1
EnsoUvcdatToolsLib AverageMeridional
EnsoUvcdatToolsLib AverageMeridional
EnsoUvcdatToolsLib AverageMeridional
ComputeMetric: oneVarmetric = ERA-Interim
NOTE: Estimated landmask applied
NOTE: Estimated landmask applied
NOTE: Estimated landmask applied
EnsoUvcdatToolsLib AverageMeridional
EnsoUvcdatToolsLib AverageMeridional
EnsoUvcdatToolsLib AverageMeridional
ComputeMetric: oneVarmetric = HadISST
NOTE: Estimated landmask applied
%%%%% ----- %%%%%
ERROR File /home/ordonez4/miniconda3/envs/pmp_test/lib/python3.10/site-packages/EnsoMetrics/EnsoUvcdatToolsLib.py, line 1208, in CheckUnits: units
the file says that temperature (ts) is in K but it seems unlikely ([-1e+30, 304.7203])
%%%%% ----- %%%%%
NOTE: Estimated landmask applied
NOTE: Estimated landmask applied
ComputeCollection: metric = EnsoSstLonRmse
ComputeMetric: oneVarRMSmetric, EnsoSstLonRmse = ACCESS1-0_r1i1p1 and ERA-Interim
NOTE: Estimated landmask applied
NOTE: Estimated landmask applied
EnsoUvcdatToolsLib AverageMeridional
EnsoUvcdatToolsLib AverageMeridional
NOTE: Estimated landmask applied
ComputeMetric: oneVarRMSmetric, EnsoSstLonRmse = ACCESS1-0_r1i1p1 and HadISST
NOTE: Estimated landmask applied
NOTE: Estimated landmask applied
EnsoUvcdatToolsLib AverageMeridional
EnsoUvcdatToolsLib AverageMeridional
%%%%% ----- %%%%%
ERROR File /home/ordonez4/miniconda3/envs/pmp_test/lib/python3.10/site-packages/EnsoMetrics/EnsoUvcdatToolsLib.py, line 1208, in CheckUnits: units
the file says that temperature (ts) is in K but it seems unlikely ([-1e+30, 304.7203])
%%%%% ----- %%%%%
NOTE: Estimated landmask applied
ComputeCollection: metric = EnsoSstMapDjf
ComputeMetric: oneVarRMSmetric, EnsoSstMapDjf = ACCESS1-0_r1i1p1 and ERA-Interim
NOTE: Estimated landmask applied
NOTE: Estimated landmask applied
NOTE: Estimated landmask applied
ComputeCollection: metric = EnsoSstMapJja
ComputeMetric: oneVarRMSmetric, EnsoSstMapJja = ACCESS1-0_r1i1p1 and ERA-Interim
NOTE: Estimated landmask applied
NOTE: Estimated landmask applied
NOTE: Estimated landmask applied
PMPdriver: model loop end
Process end: Tue Jul 2 14:58:39 2024
All of the results (netCDF and JSON) are located in the output directory, which uses the metrics collection name.
[10]:
!ls {demo_output_directory + "/basicTestEnso/ENSO_tel/*.nc"}
demo_output/basicTestEnso/ENSO_tel/cmip5_historical_ENSO_tel_basicTestEnso_ACCESS1-0_r1i1p1_EnsoAmpl.nc
demo_output/basicTestEnso/ENSO_tel/cmip5_historical_ENSO_tel_basicTestEnso_ACCESS1-0_r1i1p1_EnsoPrMapDjf.nc
demo_output/basicTestEnso/ENSO_tel/cmip5_historical_ENSO_tel_basicTestEnso_ACCESS1-0_r1i1p1_EnsoPrMapJja.nc
demo_output/basicTestEnso/ENSO_tel/cmip5_historical_ENSO_tel_basicTestEnso_ACCESS1-0_r1i1p1_EnsoSeasonality.nc
demo_output/basicTestEnso/ENSO_tel/cmip5_historical_ENSO_tel_basicTestEnso_ACCESS1-0_r1i1p1_EnsoSstLonRmse.nc
demo_output/basicTestEnso/ENSO_tel/cmip5_historical_ENSO_tel_basicTestEnso_ACCESS1-0_r1i1p1_EnsoSstMapDjf.nc
demo_output/basicTestEnso/ENSO_tel/cmip5_historical_ENSO_tel_basicTestEnso_ACCESS1-0_r1i1p1_EnsoSstMapJja.nc
Finally, this example runs the remaining metrics collection ENSO_proc:
[11]:
%%bash -s "$demo_output_directory"
enso_driver.py -p basic_enso_param.py \
--metricsCollection ENSO_proc \
--results_dir $1/basicTestEnso/ENSO_proc
mip: cmip5
exp: historical
models: ['ACCESS1-0']
realization: r1i1p1
mc_name: ENSO_proc
outdir: demo_output/basicTestEnso/ENSO_proc
netcdf_path: demo_output/basicTestEnso/ENSO_proc
debug: False
obs_cmor: True
obs_cmor_path: demo_data/obs4MIPs_PCMDI_monthly
egg_pth: /home/ordonez4/miniconda3/envs/pmp_test/share/pmp
output directory for graphics:demo_output/basicTestEnso/ENSO_proc
output directory for diagnostic_results:demo_output/basicTestEnso/ENSO_proc
output directory for metrics_results:demo_output/basicTestEnso/ENSO_proc
list_variables: ['ssh', 'sst', 'taux', 'thf']
list_obs: ['AVISO-1-0', 'ERA-INT', 'GPCP-2-3', 'HadISST-1-1']
Observation dataset AVISO-1-0 is not given for variable thf
Observation dataset GPCP-2-3 is not given for variable thf
Observation dataset HadISST-1-1 is not given for variable thf
PMPdriver: dict_obs readin end
Process start: Tue Jul 2 14:58:50 2024
models: ['ACCESS1-0']
----- model: ACCESS1-0 ---------------------
PMPdriver: var loop start for model ACCESS1-0
realization: r1i1p1
--- run: r1i1p1 ---
--- var: ssh ---
var_in_file: zos
var, areacell_in_file, realm: ssh areacello ocean
path: demo_data/CMIP5_demo_data/zos_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc
file_list: []
path: demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc
file_list: ['demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc']
path: demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc
file_list: ['demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc']
PMPdriver: var loop end
--- var: sst ---
var_in_file: ts
var, areacell_in_file, realm: sst areacella atmos
path: demo_data/CMIP5_demo_data/ts_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc
file_list: ['demo_data/CMIP5_demo_data/ts_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc']
path: demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc
file_list: ['demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc']
path: demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc
file_list: ['demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc']
PMPdriver: var loop end
--- var: taux ---
var_in_file: tauu
var, areacell_in_file, realm: taux areacella atmos
path: demo_data/CMIP5_demo_data/tauu_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc
file_list: ['demo_data/CMIP5_demo_data/tauu_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc']
path: demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc
file_list: ['demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc']
path: demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc
file_list: ['demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc']
PMPdriver: var loop end
--- var: thf ---
var_in_file: ['hfls', 'hfss', 'rlds', 'rlus', 'rsds', 'rsus']
var, areacell_in_file, realm: thf areacella atmos
path: demo_data/CMIP5_demo_data/hfls_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc
file_list: ['demo_data/CMIP5_demo_data/hfls_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc']
path: demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc
file_list: ['demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc']
path: demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc
file_list: ['demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc']
path: demo_data/CMIP5_demo_data/hfls_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc
file_list: ['demo_data/CMIP5_demo_data/hfls_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc']
path: demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc
file_list: ['demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc']
file_areacell_tmp: demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc
path: demo_data/CMIP5_demo_data/hfss_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc
file_list: ['demo_data/CMIP5_demo_data/hfss_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc']
path: demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc
file_list: ['demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc']
file_areacell_tmp: demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc
path: demo_data/CMIP5_demo_data/rlds_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc
file_list: ['demo_data/CMIP5_demo_data/rlds_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc']
path: demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc
file_list: ['demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc']
file_areacell_tmp: demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc
path: demo_data/CMIP5_demo_data/rlus_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc
file_list: ['demo_data/CMIP5_demo_data/rlus_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc']
path: demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc
file_list: ['demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc']
file_areacell_tmp: demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc
path: demo_data/CMIP5_demo_data/rsds_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc
file_list: ['demo_data/CMIP5_demo_data/rsds_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc']
path: demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc
file_list: ['demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc']
file_areacell_tmp: demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc
path: demo_data/CMIP5_demo_data/rsus_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc
file_list: ['demo_data/CMIP5_demo_data/rsus_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc']
path: demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc
file_list: ['demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc']
file_areacell_tmp: demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc
PMPdriver: var loop end
dictDatasets:
{
"model": {
"ACCESS1-0_r1i1p1": {
"ssh": {
"areaname": "areacello",
"landmaskname": "sftlf",
"path + filename": null,
"path + filename_area": "demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc",
"path + filename_landmask": null,
"varname": "zos"
},
"sst": {
"areaname": "areacella",
"landmaskname": "sftlf",
"path + filename": "demo_data/CMIP5_demo_data/ts_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc",
"path + filename_area": "demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc",
"path + filename_landmask": "demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc",
"varname": "ts"
},
"taux": {
"areaname": "areacella",
"landmaskname": "sftlf",
"path + filename": "demo_data/CMIP5_demo_data/tauu_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc",
"path + filename_area": "demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc",
"path + filename_landmask": "demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc",
"varname": "tauu"
},
"thf": {
"areaname": [
"areacella",
"areacella",
"areacella",
"areacella",
"areacella",
"areacella"
],
"landmaskname": [
"sftlf",
"sftlf",
"sftlf",
"sftlf",
"sftlf",
"sftlf"
],
"path + filename": [
"demo_data/CMIP5_demo_data/hfls_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc",
"demo_data/CMIP5_demo_data/hfss_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc",
"demo_data/CMIP5_demo_data/rlds_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc",
"demo_data/CMIP5_demo_data/rlus_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc",
"demo_data/CMIP5_demo_data/rsds_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc",
"demo_data/CMIP5_demo_data/rsus_Amon_ACCESS1-0_historical_r1i1p1_185001-200512.nc"
],
"path + filename_area": [
"demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc",
"demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc",
"demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc",
"demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc",
"demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc",
"demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc"
],
"path + filename_landmask": [
"demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc",
"demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc",
"demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc",
"demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc",
"demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc",
"demo_data/CMIP5_demo_data/sftlf_fx_ACCESS1-0_amip_r0i0p0.nc"
],
"varname": [
"hfls",
"hfss",
"rlds",
"rlus",
"rsds",
"rsus"
]
}
}
},
"observations": {
"AVISO": {
"ssh": {
"areaname": "areacella",
"landmaskname": "sftlf",
"path + filename": "demo_data/obs4MIPs_PCMDI_monthly/CNES/AVISO-1-0/mon/zos/gn/v20210727/zos_mon_AVISO-1-0_PCMDI_gn_199301-201912.nc",
"path + filename_area": null,
"path + filename_landmask": null,
"varname": "zos"
}
},
"ERA-Interim": {
"sst": {
"areaname": "areacella",
"landmaskname": "sftlf",
"path + filename": "demo_data/obs4MIPs_PCMDI_monthly/ECMWF/ERA-INT/mon/ts/gn/v20210727/ts_mon_ERA-INT_PCMDI_gn_197901-201903.nc",
"path + filename_area": null,
"path + filename_landmask": null,
"varname": "ts"
},
"taux": {
"areaname": "areacella",
"landmaskname": "sftlf",
"path + filename": "demo_data/obs4MIPs_PCMDI_monthly/ECMWF/ERA-INT/mon/tauu/gn/v20210727/tauu_mon_ERA-INT_PCMDI_gn_197901-201903.nc",
"path + filename_area": null,
"path + filename_landmask": null,
"varname": "tauu"
},
"thf": {
"areaname": [
"areacella",
"areacella",
"areacella",
"areacella",
"areacella",
"areacella"
],
"landmaskname": [
"sftlf",
"sftlf",
"sftlf",
"sftlf",
"sftlf",
"sftlf"
],
"path + filename": [
"demo_data/obs4MIPs_PCMDI_monthly/ECMWF/ERA-INT/mon/hfls/gn/v20210727/hfls_mon_ERA-INT_PCMDI_gn_197901-201903.nc",
"demo_data/obs4MIPs_PCMDI_monthly/ECMWF/ERA-INT/mon/hfss/gn/v20210727/hfss_mon_ERA-INT_PCMDI_gn_197901-201903.nc",
"demo_data/obs4MIPs_PCMDI_monthly/ECMWF/ERA-INT/mon/rlds/gn/v20210727/rlds_mon_ERA-INT_PCMDI_gn_197901-201903.nc",
"demo_data/obs4MIPs_PCMDI_monthly/ECMWF/ERA-INT/mon/rlus/gn/v20210727/rlus_mon_ERA-INT_PCMDI_gn_197901-201903.nc",
"demo_data/obs4MIPs_PCMDI_monthly/ECMWF/ERA-INT/mon/rsds/gn/v20210727/rsds_mon_ERA-INT_PCMDI_gn_197901-201903.nc",
"demo_data/obs4MIPs_PCMDI_monthly/ECMWF/ERA-INT/mon/rsus/gn/v20210727/rsus_mon_ERA-INT_PCMDI_gn_197901-201903.nc"
],
"path + filename_area": [
null,
null,
null,
null,
null,
null
],
"path + filename_landmask": null,
"varname": [
"hfls",
"hfss",
"rlds",
"rlus",
"rsds",
"rsus"
]
}
},
"HadISST": {
"sst": {
"areaname": "areacella",
"landmaskname": "sftlf",
"path + filename": "demo_data/obs4MIPs_PCMDI_monthly/MOHC/HadISST-1-1/mon/ts/gn/v20210727/ts_mon_HadISST-1-1_PCMDI_gn_187001-201907.nc",
"path + filename_area": null,
"path + filename_landmask": null,
"varname": "ts"
}
}
}
}
### Compute the metric collection ###
ComputeCollection: metric = BiasSstLonRmse
ComputeMetric: oneVarRMSmetric, BiasSstLonRmse = ACCESS1-0_r1i1p1 and ERA-Interim
NOTE: Estimated landmask applied
EnsoUvcdatToolsLib AverageMeridional
EnsoUvcdatToolsLib AverageMeridional
ComputeMetric: oneVarRMSmetric, BiasSstLonRmse = ACCESS1-0_r1i1p1 and HadISST
NOTE: Estimated landmask applied
EnsoUvcdatToolsLib AverageMeridional
EnsoUvcdatToolsLib AverageMeridional
ComputeCollection: metric = BiasTauxLonRmse
/home/ordonez4/miniconda3/envs/pmp_test/lib/python3.10/site-packages/cdms2/MV2.py:318: Warning: arguments order for compress function has changed
it is now: MV2.copmress(array,condition), if your code seems to not react or act wrong to a call to compress, please check this
warnings.warn(
ComputeMetric: oneVarRMSmetric, BiasTauxLonRmse = ACCESS1-0_r1i1p1 and ERA-Interim
EnsoUvcdatToolsLib AverageHorizontal
NOTE: Estimated landmask applied
EnsoUvcdatToolsLib AverageHorizontal
NOTE: Estimated landmask applied
EnsoUvcdatToolsLib AverageMeridional
EnsoUvcdatToolsLib AverageMeridional
ComputeCollection: metric = EnsoAmpl
ComputeMetric: oneVarmetric = ACCESS1-0_r1i1p1
ComputeMetric: oneVarmetric = ERA-Interim
NOTE: Estimated landmask applied
ComputeMetric: oneVarmetric = HadISST
NOTE: Estimated landmask applied
ComputeCollection: metric = EnsodSstOce_2
ComputeMetric: twoVarmetric = ACCESS1-0_r1i1p1
EnsoUvcdatToolsLib ReadAndSelectRegion
hfls sign reversed
range old = +1.99 to +243.32
range new = -243.32 to -1.99
EnsoUvcdatToolsLib ReadAndSelectRegion
hfss sign reversed
range old = -3.28 to +31.07
range new = -31.07 to +3.28
ComputeMetric: twoVarmetric = ERA-Interim_ERA-Interim
NOTE: Estimated landmask applied
NOTE: Estimated landmask applied
EnsoUvcdatToolsLib ReadAndSelectRegion
hfls sign reversed
range old = +3.32 to +219.02
range new = -219.02 to -3.32
NOTE: Estimated landmask applied
EnsoUvcdatToolsLib ReadAndSelectRegion
hfss sign reversed
range old = -4.19 to +33.07
range new = -33.07 to +4.19
NOTE: Estimated landmask applied
NOTE: Estimated landmask applied
NOTE: Estimated landmask applied
NOTE: Estimated landmask applied
NOTE: Estimated landmask applied
ComputeMetric: twoVarmetric = HadISST_ERA-Interim
NOTE: Estimated landmask applied
NOTE: Estimated landmask applied
EnsoUvcdatToolsLib ReadAndSelectRegion
hfls sign reversed
range old = +3.32 to +219.02
range new = -219.02 to -3.32
NOTE: Estimated landmask applied
EnsoUvcdatToolsLib ReadAndSelectRegion
hfss sign reversed
range old = -4.19 to +33.07
range new = -33.07 to +4.19
NOTE: Estimated landmask applied
NOTE: Estimated landmask applied
NOTE: Estimated landmask applied
NOTE: Estimated landmask applied
NOTE: Estimated landmask applied
ComputeCollection: metric = EnsoFbSshSst
ComputeCollection: ENSO_proc, metric EnsoFbSshSst not computed
reason(s):
no modeled ssh given
ComputeCollection: metric = EnsoFbSstTaux
ComputeMetric: twoVarmetric = ACCESS1-0_r1i1p1
EnsoUvcdatToolsLib AverageHorizontal
ComputeMetric: twoVarmetric = ERA-Interim_ERA-Interim
NOTE: Estimated landmask applied
EnsoUvcdatToolsLib AverageHorizontal
NOTE: Estimated landmask applied
ComputeMetric: twoVarmetric = HadISST_ERA-Interim
NOTE: Estimated landmask applied
EnsoUvcdatToolsLib AverageHorizontal
NOTE: Estimated landmask applied
ComputeCollection: metric = EnsoFbSstThf
ComputeMetric: twoVarmetric = ACCESS1-0_r1i1p1
EnsoUvcdatToolsLib ReadAndSelectRegion
hfls sign reversed
range old = +1.99 to +243.32
range new = -243.32 to -1.99
EnsoUvcdatToolsLib ReadAndSelectRegion
hfss sign reversed
range old = -3.28 to +31.07
range new = -31.07 to +3.28
ComputeMetric: twoVarmetric = ERA-Interim_ERA-Interim
NOTE: Estimated landmask applied
EnsoUvcdatToolsLib ReadAndSelectRegion
hfls sign reversed
range old = +3.32 to +219.02
range new = -219.02 to -3.32
NOTE: Estimated landmask applied
EnsoUvcdatToolsLib ReadAndSelectRegion
hfss sign reversed
range old = -4.19 to +33.07
range new = -33.07 to +4.19
NOTE: Estimated landmask applied
NOTE: Estimated landmask applied
NOTE: Estimated landmask applied
NOTE: Estimated landmask applied
NOTE: Estimated landmask applied
ComputeMetric: twoVarmetric = HadISST_ERA-Interim
NOTE: Estimated landmask applied
EnsoUvcdatToolsLib ReadAndSelectRegion
hfls sign reversed
range old = +3.32 to +219.02
range new = -219.02 to -3.32
NOTE: Estimated landmask applied
EnsoUvcdatToolsLib ReadAndSelectRegion
hfss sign reversed
range old = -4.19 to +33.07
range new = -33.07 to +4.19
NOTE: Estimated landmask applied
NOTE: Estimated landmask applied
NOTE: Estimated landmask applied
NOTE: Estimated landmask applied
NOTE: Estimated landmask applied
ComputeCollection: metric = EnsoFbTauxSsh
ComputeCollection: ENSO_proc, metric EnsoFbTauxSsh not computed
reason(s):
no modeled ssh given
ComputeCollection: metric = EnsoSeasonality
ComputeMetric: oneVarmetric = ACCESS1-0_r1i1p1
ComputeMetric: oneVarmetric = ERA-Interim
NOTE: Estimated landmask applied
ComputeMetric: oneVarmetric = HadISST
NOTE: Estimated landmask applied
ComputeCollection: metric = EnsoSstLonRmse
ComputeMetric: oneVarRMSmetric, EnsoSstLonRmse = ACCESS1-0_r1i1p1 and ERA-Interim
NOTE: Estimated landmask applied
NOTE: Estimated landmask applied
EnsoUvcdatToolsLib AverageMeridional
EnsoUvcdatToolsLib AverageMeridional
ComputeMetric: oneVarRMSmetric, EnsoSstLonRmse = ACCESS1-0_r1i1p1 and HadISST
NOTE: Estimated landmask applied
NOTE: Estimated landmask applied
EnsoUvcdatToolsLib AverageMeridional
EnsoUvcdatToolsLib AverageMeridional
ComputeCollection: metric = EnsoSstSkew
ComputeMetric: oneVarmetric = ACCESS1-0_r1i1p1
ComputeMetric: oneVarmetric = ERA-Interim
INFO::2024-07-02 15:04::pcmdi_metrics:: Results saved to a json file: /home/ordonez4/git/pcmdi_metrics/doc/jupyter/Demo/demo_output/basicTestEnso/ENSO_proc/cmip5_historical_ENSO_proc_basicTestEnso_ACCESS1-0_r1i1p1.json
2024-07-02 15:04:16,643 [INFO]: base.py(write:443) >> Results saved to a json file: /home/ordonez4/git/pcmdi_metrics/doc/jupyter/Demo/demo_output/basicTestEnso/ENSO_proc/cmip5_historical_ENSO_proc_basicTestEnso_ACCESS1-0_r1i1p1.json
2024-07-02 15:04:16,643 [INFO]: base.py(write:443) >> Results saved to a json file: /home/ordonez4/git/pcmdi_metrics/doc/jupyter/Demo/demo_output/basicTestEnso/ENSO_proc/cmip5_historical_ENSO_proc_basicTestEnso_ACCESS1-0_r1i1p1.json
INFO::2024-07-02 15:04::pcmdi_metrics:: Results saved to a json file: /home/ordonez4/git/pcmdi_metrics/doc/jupyter/Demo/demo_output/basicTestEnso/ENSO_proc/cmip5_historical_ENSO_proc_basicTestEnso_ACCESS1-0_r1i1p1_diveDown.json
2024-07-02 15:04:29,807 [INFO]: base.py(write:443) >> Results saved to a json file: /home/ordonez4/git/pcmdi_metrics/doc/jupyter/Demo/demo_output/basicTestEnso/ENSO_proc/cmip5_historical_ENSO_proc_basicTestEnso_ACCESS1-0_r1i1p1_diveDown.json
2024-07-02 15:04:29,807 [INFO]: base.py(write:443) >> Results saved to a json file: /home/ordonez4/git/pcmdi_metrics/doc/jupyter/Demo/demo_output/basicTestEnso/ENSO_proc/cmip5_historical_ENSO_proc_basicTestEnso_ACCESS1-0_r1i1p1_diveDown.json
NOTE: Estimated landmask applied
ComputeMetric: oneVarmetric = HadISST
NOTE: Estimated landmask applied
PMPdriver: model loop end
Process end: Tue Jul 2 15:04:29 2024