8. Extremes Metrics

This notebook shows users how to run the PMP Extremes metrics driver. This driver can produce annual and seasonal block extremes and return values for temperature or precipitation data.

This notebook should be run in an environment with python, jupyterlab, pcmdi metrics package, and cdat installed. It is expected that you have downloaded the sample data as demonstrated in the download notebook.

The following cell reads in the choices you made during the download data step:

[1]:
from user_choices import demo_data_directory, demo_output_directory

Create low resolution datasets

This next cell creates very low resolution versions of the input datasets to speed up the demo.

This step is for the purposes of this demo only. Do not follow this step when working with your own data.

[2]:
import os
import xcdat as xc
[3]:
# Set up sample data for demo
os.makedirs(os.path.join(demo_output_directory, "extremes_tmp"), exist_ok=True)

def make_lower_resolution_model_data_for_demo(inpath: str, outpath: str, overwrite: bool=False):
    if not os.path.isfile(outpath) or overwrite:
        ds = xc.open_dataset(inpath)
        out_grid = xc.create_uniform_grid(-90, 90, 10., 0.5, 360, 10.)
        output_data = ds.regridder.horizontal("pr", out_grid, tool="regrid2")
        output_data.to_netcdf(outpath, "w")

# Make low resolution model data
inpath = os.path.join(demo_data_directory, "CMIP5_demo_timeseries/historical/atmos/day/pr/pr_day_GISS-E2-H_historical_r6i1p1_20000101-20051231.nc")
outpath = os.path.join(demo_output_directory, "extremes_tmp/pr_day_GISS-E2-H_historical_r6i1p1_20000101-20051231.nc")
make_lower_resolution_model_data_for_demo(inpath, outpath)

# Make low resolution obs data
inpath = os.path.join(demo_data_directory, "obs4MIPs_PCMDI_daily/NASA-JPL/GPCP-1-3/day/pr/gn/latest/pr_day_GPCP-1-3_PCMDI_gn_19961002-20170101.nc")
outpath = os.path.join(demo_output_directory, "extremes_tmp/pr_day_GPCP-1-3_PCMDI_gn_19961002-20170101.nc")
make_lower_resolution_model_data_for_demo(inpath, outpath)

Basic Use

The PMP Extremes driver is controlled via a parameter file. The parameter file for this demo is shown here:

[4]:
with open("basic_extremes_param.py") as f:
    print(f.read())
# Settings for extremes driver

# These settings are required
vars = ['pr'] # Choices are 'pr','tasmax', 'tasmin'
test_data_set = ['GISS-E2-H']
realization = ['r6i1p1']
test_data_path = 'demo_output/extremes_tmp/'
filename_template = '%(variable)_day_%(model)_historical_%(realization)_20000101-20051231.nc'
metrics_output_path = 'demo_output/%(case_id)'

# Note: You can use the following placeholders in file templates:
# %(variable) to substitute variable name from "vars" (except in sftlf filenames)
# %(model) to substitute model name from "test_data_set"
# %(realization) to substitute realization from "realization"

# Optional settings
# See the README for more information about these settings
case_id = 'extremes_ex1'
#sftlf_filename_template = 'demo_data/CMIP5_demo_data/cmip5.historical.%(model).sftlf.nc'

ModUnitsAdjust = (True,'multiply',86400.,'mm/day') # Convert model units from kg/m2/s to mm/day
ObsUnitsAdjust = (True,'multiply',86400.,'mm/day') # Convert obs units
dec_mode='JFD'
annual_strict = True
drop_incomplete_djf = True
regrid=False
plots=False
generate_sftlf = True
return_period = 2

How to run

To run the extremes driver, use the following command in the terminal. This will generate a metrics file based on the models, observations, and other criteria in basic_param.py

extremes_driver.py -p basic_extremes_param.py

This driver takes daily data on a regular lat/lon grid. The input variables can be precipitation (pr), maximum daily temperature (tasmax), or minimum daily temperature (tasmin).

In the next cell, bash cell magic is used to run the driver as a subprocess (this may take several minutes):

[5]:
%%bash
extremes_driver.py  -p basic_extremes_param.py
INFO::2023-12-23 09:52::pcmdi_metrics:: Results saved to a json file: /Users/lee1043/Documents/Research/git/pcmdi_metrics_20230620_pcmdi/pcmdi_metrics/doc/jupyter/Demo/demo_output/extremes_ex1/GISS-E2-H_block_extremes_metrics.json
2023-12-23 09:52:54,152 [INFO]: base.py(write:251) >> Results saved to a json file: /Users/lee1043/Documents/Research/git/pcmdi_metrics_20230620_pcmdi/pcmdi_metrics/doc/jupyter/Demo/demo_output/extremes_ex1/GISS-E2-H_block_extremes_metrics.json
2023-12-23 09:52:54,152 [INFO]: base.py(write:251) >> Results saved to a json file: /Users/lee1043/Documents/Research/git/pcmdi_metrics_20230620_pcmdi/pcmdi_metrics/doc/jupyter/Demo/demo_output/extremes_ex1/GISS-E2-H_block_extremes_metrics.json
INFO::2023-12-23 09:53::pcmdi_metrics:: Results saved to a json file: /Users/lee1043/Documents/Research/git/pcmdi_metrics_20230620_pcmdi/pcmdi_metrics/doc/jupyter/Demo/demo_output/extremes_ex1/block_extremes_metrics.json
2023-12-23 09:53:09,441 [INFO]: base.py(write:251) >> Results saved to a json file: /Users/lee1043/Documents/Research/git/pcmdi_metrics_20230620_pcmdi/pcmdi_metrics/doc/jupyter/Demo/demo_output/extremes_ex1/block_extremes_metrics.json
2023-12-23 09:53:09,441 [INFO]: base.py(write:251) >> Results saved to a json file: /Users/lee1043/Documents/Research/git/pcmdi_metrics_20230620_pcmdi/pcmdi_metrics/doc/jupyter/Demo/demo_output/extremes_ex1/block_extremes_metrics.json
  warnings.warn(str(msg))
/home/ordonez4/miniconda3/envs/pmp_climex_2/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/home/ordonez4/miniconda3/envs/pmp_climex_2/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1584: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/home/ordonez4/miniconda3/envs/pmp_climex_2/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/home/ordonez4/miniconda3/envs/pmp_climex_2/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:423: RuntimeWarning: overflow encountered in power
  result = np.sum(np.log(scale) + y**(-1 / shape) + np.log(y)*(1/shape + 1))
/home/ordonez4/miniconda3/envs/pmp_climex_2/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1584: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/home/ordonez4/miniconda3/envs/pmp_climex_2/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/home/ordonez4/miniconda3/envs/pmp_climex_2/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/home/ordonez4/miniconda3/envs/pmp_climex_2/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/home/ordonez4/miniconda3/envs/pmp_climex_2/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1584: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/home/ordonez4/miniconda3/envs/pmp_climex_2/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/home/ordonez4/miniconda3/envs/pmp_climex_2/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1584: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/home/ordonez4/miniconda3/envs/pmp_climex_2/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/home/ordonez4/miniconda3/envs/pmp_climex_2/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1584: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/home/ordonez4/miniconda3/envs/pmp_climex_2/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/home/ordonez4/miniconda3/envs/pmp_climex_2/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/home/ordonez4/miniconda3/envs/pmp_climex_2/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1584: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/home/ordonez4/miniconda3/envs/pmp_climex_2/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/home/ordonez4/miniconda3/envs/pmp_climex_2/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/home/ordonez4/miniconda3/envs/pmp_climex_2/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1584: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/home/ordonez4/miniconda3/envs/pmp_climex_2/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/home/ordonez4/miniconda3/envs/pmp_climex_2/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/home/ordonez4/miniconda3/envs/pmp_climex_2/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1584: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/home/ordonez4/miniconda3/envs/pmp_climex_2/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/home/ordonez4/miniconda3/envs/pmp_climex_2/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:423: RuntimeWarning: overflow encountered in power
  result = np.sum(np.log(scale) + y**(-1 / shape) + np.log(y)*(1/shape + 1))
/home/ordonez4/miniconda3/envs/pmp_climex_2/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1584: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/home/ordonez4/miniconda3/envs/pmp_climex_2/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/home/ordonez4/miniconda3/envs/pmp_climex_2/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:423: RuntimeWarning: overflow encountered in power
  result = np.sum(np.log(scale) + y**(-1 / shape) + np.log(y)*(1/shape + 1))
/home/ordonez4/miniconda3/envs/pmp_climex_2/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/home/ordonez4/miniconda3/envs/pmp_climex_2/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:423: RuntimeWarning: overflow encountered in power
  result = np.sum(np.log(scale) + y**(-1 / shape) + np.log(y)*(1/shape + 1))
/home/ordonez4/miniconda3/envs/pmp_climex_2/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:423: RuntimeWarning: overflow encountered in power
  result = np.sum(np.log(scale) + y**(-1 / shape) + np.log(y)*(1/shape + 1))
/home/ordonez4/miniconda3/envs/pmp_climex_2/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:423: RuntimeWarning: overflow encountered in power
  result = np.sum(np.log(scale) + y**(-1 / shape) + np.log(y)*(1/shape + 1))
2023-10-19 16:00:57,855 [WARNING]: dataset.py(open_dataset:109) >> "No time coordinates were found in this dataset to decode. If time coordinates were expected to exist, make sure they are detectable by setting the CF 'axis' or 'standard_name' attribute (e.g., ds['time'].attrs['axis'] = 'T' or ds['time'].attrs['standard_name'] = 'time'). Afterwards, try decoding again with `xcdat.decode_time`."
/home/ordonez4/miniconda3/envs/pmp_climex_2/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1879: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/home/ordonez4/miniconda3/envs/pmp_climex_2/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1879: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/home/ordonez4/miniconda3/envs/pmp_climex_2/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1879: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/home/ordonez4/miniconda3/envs/pmp_climex_2/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1879: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/home/ordonez4/miniconda3/envs/pmp_climex_2/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1879: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
2023-10-19 16:00:58,459 [WARNING]: dataset.py(open_dataset:109) >> "No time coordinates were found in this dataset to decode. If time coordinates were expected to exist, make sure they are detectable by setting the CF 'axis' or 'standard_name' attribute (e.g., ds['time'].attrs['axis'] = 'T' or ds['time'].attrs['standard_name'] = 'time'). Afterwards, try decoding again with `xcdat.decode_time`."
/home/ordonez4/miniconda3/envs/pmp_climex_2/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1879: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/home/ordonez4/miniconda3/envs/pmp_climex_2/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1879: RuntimeWarning: Degrees of freedom <= 0 for slice.
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:484: RuntimeWarning: invalid value encountered in sqrt
  se = np.sqrt(np.diag(B))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))

Metrics output path not found.
Creating metrics output directory demo_output/extremes_ex1
No sftlf file found for GISS-E2-H r6i1p1

-----------------------
model, run, variable: GISS-E2-H r6i1p1 pr
test_data (model in this case) full_path:
   demo_output/extremes_tmp/pr_day_GISS-E2-H_historical_r6i1p1_20000101-20051231.nc
Generating land sea mask.
Generating precipitation block extrema.
Writing results to netCDF.
Generating metrics.
Generating return values.
demo_output/extremes_ex1/netcdf/GISS-E2-H_r6i1p1_land_Rx5day_2000-2005.nc
Return value for single realization
Stationary case
demo_output/extremes_ex1/netcdf/GISS-E2-H_r6i1p1_land_Rx1day_2000-2005.nc
Return value for single realization
Stationary case
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:484: RuntimeWarning: invalid value encountered in sqrt
  se = np.sqrt(np.diag(B))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
2023-12-23 09:58:00,844 [WARNING]: dataset.py(open_dataset:128) >> "No time coordinates were found in this dataset to decode. If time coordinates were expected to exist, make sure they are detectable by setting the CF 'axis' or 'standard_name' attribute (e.g., ds['time'].attrs['axis'] = 'T' or ds['time'].attrs['standard_name'] = 'time'). Afterwards, try decoding again with `xcdat.decode_time`."
2023-12-23 09:58:00,844 [WARNING]: dataset.py(open_dataset:128) >> "No time coordinates were found in this dataset to decode. If time coordinates were expected to exist, make sure they are detectable by setting the CF 'axis' or 'standard_name' attribute (e.g., ds['time'].attrs['axis'] = 'T' or ds['time'].attrs['standard_name'] = 'time'). Afterwards, try decoding again with `xcdat.decode_time`."
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
2023-12-23 09:58:02,050 [WARNING]: dataset.py(open_dataset:128) >> "No time coordinates were found in this dataset to decode. If time coordinates were expected to exist, make sure they are detectable by setting the CF 'axis' or 'standard_name' attribute (e.g., ds['time'].attrs['axis'] = 'T' or ds['time'].attrs['standard_name'] = 'time'). Afterwards, try decoding again with `xcdat.decode_time`."
2023-12-23 09:58:02,050 [WARNING]: dataset.py(open_dataset:128) >> "No time coordinates were found in this dataset to decode. If time coordinates were expected to exist, make sure they are detectable by setting the CF 'axis' or 'standard_name' attribute (e.g., ds['time'].attrs['axis'] = 'T' or ds['time'].attrs['standard_name'] = 'time'). Afterwards, try decoding again with `xcdat.decode_time`."
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
INFO::2023-12-23 09:58::pcmdi_metrics:: Results saved to a json file: /Users/lee1043/Documents/Research/git/pcmdi_metrics_20230620_pcmdi/pcmdi_metrics/doc/jupyter/Demo/demo_output/extremes_ex1/return_value_metrics.json
2023-12-23 09:58:19,524 [INFO]: base.py(write:251) >> Results saved to a json file: /Users/lee1043/Documents/Research/git/pcmdi_metrics_20230620_pcmdi/pcmdi_metrics/doc/jupyter/Demo/demo_output/extremes_ex1/return_value_metrics.json
2023-12-23 09:58:19,524 [INFO]: base.py(write:251) >> Results saved to a json file: /Users/lee1043/Documents/Research/git/pcmdi_metrics_20230620_pcmdi/pcmdi_metrics/doc/jupyter/Demo/demo_output/extremes_ex1/return_value_metrics.json

Running the mean climate driver produces an output json file in the demo output directory. The metrics are stored in the “RESULTS” object of the json. Since only one model was provided as input, the only metrics generated are the overall mean and spatial standard deviation of the time mean.

[6]:
import os
import json
output_path = os.path.join(demo_output_directory, "extremes_ex1/GISS-E2-H_block_extremes_metrics.json")
with open(output_path) as f:
    metric = json.load(f)["RESULTS"]
print(json.dumps(metric, indent=2))
{
  "GISS-E2-H": {
    "r6i1p1": {
      "Rx1day": {
        "land": {
          "mean": {
            "ANN": 13.893658659590225,
            "DJF": 9.31502969871792,
            "JJA": 9.874547701271384,
            "MAM": 9.673421213370716,
            "SON": 10.26557454847975
          },
          "std_xy": {
            "ANN": 5.945030862687258,
            "DJF": 6.146237023726763,
            "JJA": 5.5616445472124205,
            "MAM": 5.691253427868338,
            "SON": 4.706666979280209
          }
        }
      },
      "Rx5day": {
        "land": {
          "mean": {
            "ANN": 8.671242963046646,
            "DJF": 5.676891390638716,
            "JJA": 6.3377633184316595,
            "MAM": 5.979513632245038,
            "SON": 6.398284822480362
          },
          "std_xy": {
            "ANN": 4.360349983232101,
            "DJF": 4.075258006799149,
            "JJA": 4.252590359970838,
            "MAM": 3.9340937638845,
            "SON": 3.5241812625764277
          }
        }
      }
    }
  }
}

There is a also a JSON file containing metrics for the return values in the output directory. All of the model results are found in this file.

[7]:
output_path = os.path.join(demo_output_directory, "extremes_ex1/return_value_metrics.json")
with open(output_path) as f:
    metric = json.load(f)["RESULTS"]
print(json.dumps(metric, indent=2))
{
  "GISS-E2-H": {
    "r6i1p1": {
      "Rx1day": {
        "land": {
          "mean": {
            "ANN": 13.624745420109296,
            "DJF": 9.135198382216965,
            "JJA": 9.69544213448287,
            "MAM": 9.494820971523852,
            "SON": 10.085447982915195
          },
          "std_xy": {
            "ANN": 5.84905794939727,
            "DJF": 6.013623428632656,
            "JJA": 5.727349593864466,
            "MAM": 5.823259373316453,
            "SON": 4.879802456134834
          }
        }
      },
      "Rx5day": {
        "land": {
          "mean": {
            "ANN": 8.612002894301867,
            "DJF": 5.639755083301711,
            "JJA": 6.327901109603924,
            "MAM": 5.881137864856613,
            "SON": 6.4227782133202105
          },
          "std_xy": {
            "ANN": 4.350524537048482,
            "DJF": 4.133374175749511,
            "JJA": 4.293717108920656,
            "MAM": 3.970563425657647,
            "SON": 3.6943723619808524
          }
        }
      }
    }
  }
}

In addition, the Extremes Driver saves netcdf files containing the block extremes, the return values, and the standard error for the return values. The standard error can be used to calculate confidence intervals. These files can be found in a “netcdf” subfolder of the output directory, as demonstrated here:

[8]:
!ls {demo_output_directory + "/extremes_ex1/netcdf/*.nc"}
demo_output/extremes_ex1/netcdf/GISS-E2-H_r6i1p1_land_Rx1day_2000-2005.nc
demo_output/extremes_ex1/netcdf/GISS-E2-H_r6i1p1_land_Rx1day_2000-2005_return_value.nc
demo_output/extremes_ex1/netcdf/GISS-E2-H_r6i1p1_land_Rx1day_2000-2005_standard_error.nc
demo_output/extremes_ex1/netcdf/GISS-E2-H_r6i1p1_land_Rx5day_2000-2005.nc
demo_output/extremes_ex1/netcdf/GISS-E2-H_r6i1p1_land_Rx5day_2000-2005_return_value.nc
demo_output/extremes_ex1/netcdf/GISS-E2-H_r6i1p1_land_Rx5day_2000-2005_standard_error.nc

Customizing parameters in the extremes driver

It is possible to override the parameter file from the command line. Use pmp_extremes_driver.py --help to see all the flag options.

A reference data set (e.g. observations or a control run) can be provided to generate additional metrics. Each test data set will be compared to this reference.

These are the parameters that control the reference data settings:

–reference_data_path: The file path for the reference data set.
–reference_data_set: A short name for the reference data set.
–reference_sftlf_template: The file path for the reference land/sea mask (optional if –generate_sftlf = True).
–ObsUnitsAdjust: Tuple that controls obs units conversion (in this example, to mm/day).

An example of using reference data is shown next:

[9]:
%%bash -s "$demo_output_directory"
extremes_driver.py  -p basic_extremes_param.py \
--case_id extremes_ex2 \
--reference_data_path $1/extremes_tmp/pr_day_GPCP-1-3_PCMDI_gn_19961002-20170101.nc  \
--reference_data_set GPCP-1-3 \
--generate_sftlf \
--regrid True
No reference sftlf file template provided.

-----------------------
model, run, variable: Reference GPCP-1-3 pr
test_data (model in this case) full_path:
   demo_output/extremes_tmp/pr_day_GPCP-1-3_PCMDI_gn_19961002-20170101.nc
Generating land sea mask.
Generating precipitation block extrema.
Writing results to netCDF.
No sftlf file found for GISS-E2-H r6i1p1

-----------------------
model, run, variable: GISS-E2-H r6i1p1 pr
test_data (model in this case) full_path:
   demo_output/extremes_tmp/pr_day_GISS-E2-H_historical_r6i1p1_20000101-20051231.nc
Generating land sea mask.
Generating precipitation block extrema.
Writing results to netCDF.
Generating metrics.
INFO::2023-12-23 09:59::pcmdi_metrics:: Results saved to a json file: /Users/lee1043/Documents/Research/git/pcmdi_metrics_20230620_pcmdi/pcmdi_metrics/doc/jupyter/Demo/demo_output/extremes_ex2/GISS-E2-H_block_extremes_metrics.json
2023-12-23 09:59:11,868 [INFO]: base.py(write:251) >> Results saved to a json file: /Users/lee1043/Documents/Research/git/pcmdi_metrics_20230620_pcmdi/pcmdi_metrics/doc/jupyter/Demo/demo_output/extremes_ex2/GISS-E2-H_block_extremes_metrics.json
2023-12-23 09:59:11,868 [INFO]: base.py(write:251) >> Results saved to a json file: /Users/lee1043/Documents/Research/git/pcmdi_metrics_20230620_pcmdi/pcmdi_metrics/doc/jupyter/Demo/demo_output/extremes_ex2/GISS-E2-H_block_extremes_metrics.json
INFO::2023-12-23 09:59::pcmdi_metrics:: Results saved to a json file: /Users/lee1043/Documents/Research/git/pcmdi_metrics_20230620_pcmdi/pcmdi_metrics/doc/jupyter/Demo/demo_output/extremes_ex2/block_extremes_metrics.json
2023-12-23 09:59:26,902 [INFO]: base.py(write:251) >> Results saved to a json file: /Users/lee1043/Documents/Research/git/pcmdi_metrics_20230620_pcmdi/pcmdi_metrics/doc/jupyter/Demo/demo_output/extremes_ex2/block_extremes_metrics.json
2023-12-23 09:59:26,902 [INFO]: base.py(write:251) >> Results saved to a json file: /Users/lee1043/Documents/Research/git/pcmdi_metrics_20230620_pcmdi/pcmdi_metrics/doc/jupyter/Demo/demo_output/extremes_ex2/block_extremes_metrics.json
Generating return values.
demo_output/extremes_ex2/netcdf/Reference_GPCP-1-3_land_Rx5day_1996-2017.nc
Return value for single realization
Stationary case
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
demo_output/extremes_ex2/netcdf/Reference_GPCP-1-3_land_Rx1day_1996-2017.nc
Return value for single realization
Stationary case
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:484: RuntimeWarning: invalid value encountered in sqrt
  se = np.sqrt(np.diag(B))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
demo_output/extremes_ex2/netcdf/GISS-E2-H_r6i1p1_land_Rx5day_2000-2005.nc
Return value for single realization
Stationary case
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:484: RuntimeWarning: invalid value encountered in sqrt
  se = np.sqrt(np.diag(B))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
demo_output/extremes_ex2/netcdf/GISS-E2-H_r6i1p1_land_Rx1day_2000-2005.nc
Return value for single realization
Stationary case
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:484: RuntimeWarning: invalid value encountered in sqrt
  se = np.sqrt(np.diag(B))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
2023-12-23 10:08:14,726 [WARNING]: dataset.py(open_dataset:128) >> "No time coordinates were found in this dataset to decode. If time coordinates were expected to exist, make sure they are detectable by setting the CF 'axis' or 'standard_name' attribute (e.g., ds['time'].attrs['axis'] = 'T' or ds['time'].attrs['standard_name'] = 'time'). Afterwards, try decoding again with `xcdat.decode_time`."
2023-12-23 10:08:14,726 [WARNING]: dataset.py(open_dataset:128) >> "No time coordinates were found in this dataset to decode. If time coordinates were expected to exist, make sure they are detectable by setting the CF 'axis' or 'standard_name' attribute (e.g., ds['time'].attrs['axis'] = 'T' or ds['time'].attrs['standard_name'] = 'time'). Afterwards, try decoding again with `xcdat.decode_time`."
2023-12-23 10:08:14,973 [WARNING]: dataset.py(open_dataset:128) >> "No time coordinates were found in this dataset to decode. If time coordinates were expected to exist, make sure they are detectable by setting the CF 'axis' or 'standard_name' attribute (e.g., ds['time'].attrs['axis'] = 'T' or ds['time'].attrs['standard_name'] = 'time'). Afterwards, try decoding again with `xcdat.decode_time`."
2023-12-23 10:08:14,973 [WARNING]: dataset.py(open_dataset:128) >> "No time coordinates were found in this dataset to decode. If time coordinates were expected to exist, make sure they are detectable by setting the CF 'axis' or 'standard_name' attribute (e.g., ds['time'].attrs['axis'] = 'T' or ds['time'].attrs['standard_name'] = 'time'). Afterwards, try decoding again with `xcdat.decode_time`."
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
2023-12-23 10:08:22,427 [WARNING]: dataset.py(open_dataset:128) >> "No time coordinates were found in this dataset to decode. If time coordinates were expected to exist, make sure they are detectable by setting the CF 'axis' or 'standard_name' attribute (e.g., ds['time'].attrs['axis'] = 'T' or ds['time'].attrs['standard_name'] = 'time'). Afterwards, try decoding again with `xcdat.decode_time`."
2023-12-23 10:08:22,427 [WARNING]: dataset.py(open_dataset:128) >> "No time coordinates were found in this dataset to decode. If time coordinates were expected to exist, make sure they are detectable by setting the CF 'axis' or 'standard_name' attribute (e.g., ds['time'].attrs['axis'] = 'T' or ds['time'].attrs['standard_name'] = 'time'). Afterwards, try decoding again with `xcdat.decode_time`."
2023-12-23 10:08:22,575 [WARNING]: dataset.py(open_dataset:128) >> "No time coordinates were found in this dataset to decode. If time coordinates were expected to exist, make sure they are detectable by setting the CF 'axis' or 'standard_name' attribute (e.g., ds['time'].attrs['axis'] = 'T' or ds['time'].attrs['standard_name'] = 'time'). Afterwards, try decoding again with `xcdat.decode_time`."
2023-12-23 10:08:22,575 [WARNING]: dataset.py(open_dataset:128) >> "No time coordinates were found in this dataset to decode. If time coordinates were expected to exist, make sure they are detectable by setting the CF 'axis' or 'standard_name' attribute (e.g., ds['time'].attrs['axis'] = 'T' or ds['time'].attrs['standard_name'] = 'time'). Afterwards, try decoding again with `xcdat.decode_time`."
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
2023-12-23 10:08:29,821 [WARNING]: dataset.py(open_dataset:128) >> "No time coordinates were found in this dataset to decode. If time coordinates were expected to exist, make sure they are detectable by setting the CF 'axis' or 'standard_name' attribute (e.g., ds['time'].attrs['axis'] = 'T' or ds['time'].attrs['standard_name'] = 'time'). Afterwards, try decoding again with `xcdat.decode_time`."
2023-12-23 10:08:29,821 [WARNING]: dataset.py(open_dataset:128) >> "No time coordinates were found in this dataset to decode. If time coordinates were expected to exist, make sure they are detectable by setting the CF 'axis' or 'standard_name' attribute (e.g., ds['time'].attrs['axis'] = 'T' or ds['time'].attrs['standard_name'] = 'time'). Afterwards, try decoding again with `xcdat.decode_time`."
2023-12-23 10:08:29,980 [WARNING]: dataset.py(open_dataset:128) >> "No time coordinates were found in this dataset to decode. If time coordinates were expected to exist, make sure they are detectable by setting the CF 'axis' or 'standard_name' attribute (e.g., ds['time'].attrs['axis'] = 'T' or ds['time'].attrs['standard_name'] = 'time'). Afterwards, try decoding again with `xcdat.decode_time`."
2023-12-23 10:08:29,980 [WARNING]: dataset.py(open_dataset:128) >> "No time coordinates were found in this dataset to decode. If time coordinates were expected to exist, make sure they are detectable by setting the CF 'axis' or 'standard_name' attribute (e.g., ds['time'].attrs['axis'] = 'T' or ds['time'].attrs['standard_name'] = 'time'). Afterwards, try decoding again with `xcdat.decode_time`."
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
2023-12-23 10:08:36,321 [WARNING]: dataset.py(open_dataset:128) >> "No time coordinates were found in this dataset to decode. If time coordinates were expected to exist, make sure they are detectable by setting the CF 'axis' or 'standard_name' attribute (e.g., ds['time'].attrs['axis'] = 'T' or ds['time'].attrs['standard_name'] = 'time'). Afterwards, try decoding again with `xcdat.decode_time`."
2023-12-23 10:08:36,321 [WARNING]: dataset.py(open_dataset:128) >> "No time coordinates were found in this dataset to decode. If time coordinates were expected to exist, make sure they are detectable by setting the CF 'axis' or 'standard_name' attribute (e.g., ds['time'].attrs['axis'] = 'T' or ds['time'].attrs['standard_name'] = 'time'). Afterwards, try decoding again with `xcdat.decode_time`."
2023-12-23 10:08:36,452 [WARNING]: dataset.py(open_dataset:128) >> "No time coordinates were found in this dataset to decode. If time coordinates were expected to exist, make sure they are detectable by setting the CF 'axis' or 'standard_name' attribute (e.g., ds['time'].attrs['axis'] = 'T' or ds['time'].attrs['standard_name'] = 'time'). Afterwards, try decoding again with `xcdat.decode_time`."
2023-12-23 10:08:36,452 [WARNING]: dataset.py(open_dataset:128) >> "No time coordinates were found in this dataset to decode. If time coordinates were expected to exist, make sure they are detectable by setting the CF 'axis' or 'standard_name' attribute (e.g., ds['time'].attrs['axis'] = 'T' or ds['time'].attrs['standard_name'] = 'time'). Afterwards, try decoding again with `xcdat.decode_time`."
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
INFO::2023-12-23 10:08::pcmdi_metrics:: Results saved to a json file: /Users/lee1043/Documents/Research/git/pcmdi_metrics_20230620_pcmdi/pcmdi_metrics/doc/jupyter/Demo/demo_output/extremes_ex2/return_value_metrics.json
2023-12-23 10:08:58,977 [INFO]: base.py(write:251) >> Results saved to a json file: /Users/lee1043/Documents/Research/git/pcmdi_metrics_20230620_pcmdi/pcmdi_metrics/doc/jupyter/Demo/demo_output/extremes_ex2/return_value_metrics.json
2023-12-23 10:08:58,977 [INFO]: base.py(write:251) >> Results saved to a json file: /Users/lee1043/Documents/Research/git/pcmdi_metrics_20230620_pcmdi/pcmdi_metrics/doc/jupyter/Demo/demo_output/extremes_ex2/return_value_metrics.json

In this case, the results JSON contains more statistics.

[10]:
import os
import json
output_path = os.path.join(demo_output_directory, "extremes_ex2/GISS-E2-H_block_extremes_metrics.json")
with open(output_path) as f:
    metric = json.load(f)["RESULTS"]
print(json.dumps(metric, indent=2))
{
  "GISS-E2-H": {
    "r6i1p1": {
      "Rx1day": {
        "land": {
          "bias_xy": {
            "ANN": -2.9638201041287924,
            "DJF": -2.495281430585827,
            "JJA": -0.2946765460481996,
            "MAM": -1.5971789954641609,
            "SON": -1.6977973313872894
          },
          "cor_xy": {
            "ANN": 0.6837044814847419,
            "DJF": 0.9684347121108853,
            "JJA": 0.8459034898918713,
            "MAM": 0.8129768025803042,
            "SON": 0.8747028133107926
          },
          "mae_xy": {
            "ANN": 4.685738060858886,
            "DJF": 4.098482865854706,
            "JJA": 3.189920892588137,
            "MAM": 3.519019913781204,
            "SON": 3.067846179868978
          },
          "mean": {
            "ANN": 13.893658659590225,
            "DJF": 9.31502969871792,
            "JJA": 9.874547701271384,
            "MAM": 9.673421213370716,
            "SON": 10.26557454847975
          },
          "pct_dif": {
            "ANN": -66.8082970235577,
            "DJF": -80.28406965543556,
            "JJA": -11.011054941202895,
            "MAM": -53.84901064903107,
            "SON": -53.926648100473614
          },
          "rms_xy": {
            "ANN": 6.158825385201947,
            "DJF": 5.5348495442351435,
            "JJA": 4.457176775824264,
            "MAM": 4.843059889942635,
            "SON": 4.2149516325799965
          },
          "rmsc_xy": {
            "ANN": 13.543723552492386,
            "DJF": 10.006858144663193,
            "JJA": 8.713505649340128,
            "MAM": 9.479984080166622,
            "SON": 9.622265181792287
          },
          "std-obs_xy": {
            "ANN": 8.460047158200908,
            "DJF": 6.663753740526669,
            "JJA": 5.556742814616796,
            "MAM": 6.022988998851917,
            "SON": 6.280888402234044
          },
          "std_xy": {
            "ANN": 5.945030862687258,
            "DJF": 6.146237023726763,
            "JJA": 5.5616445472124205,
            "MAM": 5.691253427868338,
            "SON": 4.706666979280209
          }
        }
      },
      "Rx5day": {
        "land": {
          "bias_xy": {
            "ANN": -0.33917185914832654,
            "DJF": -0.38991880664836837,
            "JJA": 0.7233060324395061,
            "MAM": 0.016367233863598916,
            "SON": -0.05164734025943446
          },
          "cor_xy": {
            "ANN": 0.7975986941318791,
            "DJF": 1.0614730586402408,
            "JJA": 0.9415359797200796,
            "MAM": 0.9483063370862885,
            "SON": 0.9365535144620619
          },
          "mae_xy": {
            "ANN": 2.246793312811029,
            "DJF": 1.944207191163086,
            "JJA": 2.1452026697714044,
            "MAM": 1.8653627522017895,
            "SON": 1.6125921503923708
          },
          "mean": {
            "ANN": 8.671242963046646,
            "DJF": 5.676891390638716,
            "JJA": 6.3377633184316595,
            "MAM": 5.979513632245038,
            "SON": 6.398284822480362
          },
          "pct_dif": {
            "ANN": -14.303628094408946,
            "DJF": -24.422209800808893,
            "JJA": 48.953696182196545,
            "MAM": 1.042968037591726,
            "SON": -3.042734069238085
          },
          "rms_xy": {
            "ANN": 3.1524699315330738,
            "DJF": 2.8539928314777017,
            "JJA": 2.9890377112319646,
            "MAM": 2.5737013801878934,
            "SON": 2.233005422299144
          },
          "rmsc_xy": {
            "ANN": 7.341785199420232,
            "DJF": 5.289257452710296,
            "JJA": 5.052260285355741,
            "MAM": 5.092112589680367,
            "SON": 5.250734845752278
          },
          "std-obs_xy": {
            "ANN": 4.678522874655352,
            "DJF": 3.621532272277169,
            "JJA": 3.2163523875175306,
            "MAM": 3.33323565469098,
            "SON": 3.488610711147975
          },
          "std_xy": {
            "ANN": 4.360349983232101,
            "DJF": 4.075258006799149,
            "JJA": 4.252590359970838,
            "MAM": 3.9340937638845,
            "SON": 3.5241812625764277
          }
        }
      }
    }
  }
}

Similarly, the return value metrics JSON shows more metrics comparing the model and observed return values.

[11]:
import os
import json
output_path = os.path.join(demo_output_directory, "extremes_ex2/return_value_metrics.json")
with open(output_path) as f:
    metric = json.load(f)["RESULTS"]
print(json.dumps(metric, indent=2))
{
  "GISS-E2-H": {
    "r6i1p1": {
      "Rx1day": {
        "land": {
          "bias_xy": {
            "ANN": -3.772317802925131,
            "DJF": -2.8204298940888224,
            "JJA": -0.7104342862321072,
            "MAM": -2.0548532566379154,
            "SON": -1.9267126342291894
          },
          "cor_xy": {
            "ANN": 0.6953329102062709,
            "DJF": 1.0144557369093798,
            "JJA": 0.8717147420454912,
            "MAM": 0.8570303881672487,
            "SON": 0.8547260892720185
          },
          "mae_xy": {
            "ANN": 5.212922565882905,
            "DJF": 4.239025302742928,
            "JJA": 3.511290894780589,
            "MAM": 3.617308119033,
            "SON": 3.422695495665447
          },
          "mean": {
            "ANN": 13.624745420109296,
            "DJF": 9.135198382216965,
            "JJA": 9.69544213448287,
            "MAM": 9.494820971523852,
            "SON": 10.085447982915195
          },
          "pct_dif": {
            "ANN": -82.39550400308971,
            "DJF": -89.64252661175453,
            "JJA": -25.94277517225058,
            "MAM": -67.60553618236206,
            "SON": -60.94905800323612
          },
          "rms_xy": {
            "ANN": 6.799522859091312,
            "DJF": 5.783533715648842,
            "JJA": 4.849648962808867,
            "MAM": 5.140713726278351,
            "SON": 4.848500076949931
          },
          "rmsc_xy": {
            "ANN": 14.011555296387773,
            "DJF": 10.153746254129677,
            "JJA": 9.044531409187776,
            "MAM": 9.727692917047234,
            "SON": 9.906336169092766
          },
          "std-obs_xy": {
            "ANN": 5.84905794939727,
            "DJF": 6.013623428632656,
            "JJA": 5.727349593864466,
            "MAM": 5.823259373316453,
            "SON": 4.879802456134834
          },
          "std_xy": {
            "ANN": 5.84905794939727,
            "DJF": 6.013623428632656,
            "JJA": 5.727349593864466,
            "MAM": 5.823259373316453,
            "SON": 4.879802456134834
          }
        }
      },
      "Rx5day": {
        "land": {
          "bias_xy": {
            "ANN": -0.6689568518426141,
            "DJF": -0.4649576550476801,
            "JJA": 0.4432814449040144,
            "MAM": -0.28804918489369696,
            "SON": -0.09186559287153301
          },
          "cor_xy": {
            "ANN": 0.7897175107203418,
            "DJF": 1.0432040182169595,
            "JJA": 0.9568041308531043,
            "MAM": 0.9744603276841419,
            "SON": 0.9256014276768241
          },
          "mae_xy": {
            "ANN": 2.43575621494916,
            "DJF": 2.1275398910641865,
            "JJA": 2.24245804570134,
            "MAM": 1.9322676715282434,
            "SON": 1.8028077830317968
          },
          "mean": {
            "ANN": 8.612002894301867,
            "DJF": 5.639755083301711,
            "JJA": 6.327901109603924,
            "MAM": 5.881137864856613,
            "SON": 6.4227782133202105
          },
          "pct_dif": {
            "ANN": -27.389014158119508,
            "DJF": -28.941387809171086,
            "JJA": 28.624132739473623,
            "MAM": -17.742299067561806,
            "SON": -5.358378529994827
          },
          "rms_xy": {
            "ANN": 3.3983206619821558,
            "DJF": 3.1274141776424766,
            "JJA": 3.141553282208936,
            "MAM": 2.630126131170074,
            "SON": 2.522403251893798
          },
          "rmsc_xy": {
            "ANN": 7.607010019233525,
            "DJF": 5.458755205252023,
            "JJA": 5.336073364645669,
            "MAM": 5.243825916009218,
            "SON": 5.4218208680489575
          },
          "std-obs_xy": {
            "ANN": 4.350524537048482,
            "DJF": 4.133374175749511,
            "JJA": 4.293717108920656,
            "MAM": 3.970563425657647,
            "SON": 3.6943723619808524
          },
          "std_xy": {
            "ANN": 4.350524537048482,
            "DJF": 4.133374175749511,
            "JJA": 4.293717108920656,
            "MAM": 3.970563425657647,
            "SON": 3.6943723619808524
          }
        }
      }
    }
  }
}

Along with the JSON file of metrics, this driver can also produce a set of diagnostic plots and save the block extrema data as netcdf files.

To save the netcdf files, use the flag “–nc_out” on the command line or nc_out = True in the parameter file.
To generate plots, use the flag “–plots” on the command line or plots = True in the parameter file.

The diagnostics plots will always display a world map. If a reference data set is included, Taylor Diagrams will be produced for each model. Users can access the same underlying data in the output netcdf files and metrics JSONs to generate their own visualizations.

The next cell demonstrates these flags.

[12]:
%%bash
extremes_driver.py  -p basic_extremes_param.py --case_id "extremes_ex3" --plots
No sftlf file found for GISS-E2-H r6i1p1

-----------------------
model, run, variable: GISS-E2-H r6i1p1 pr
test_data (model in this case) full_path:
   demo_output/extremes_tmp/pr_day_GISS-E2-H_historical_r6i1p1_20000101-20051231.nc
Generating land sea mask.
Generating precipitation block extrema.
Writing results to netCDF.
Creating maps
Generating metrics.
INFO::2023-12-23 10:09::pcmdi_metrics:: Results saved to a json file: /Users/lee1043/Documents/Research/git/pcmdi_metrics_20230620_pcmdi/pcmdi_metrics/doc/jupyter/Demo/demo_output/extremes_ex3/GISS-E2-H_block_extremes_metrics.json
2023-12-23 10:09:43,553 [INFO]: base.py(write:251) >> Results saved to a json file: /Users/lee1043/Documents/Research/git/pcmdi_metrics_20230620_pcmdi/pcmdi_metrics/doc/jupyter/Demo/demo_output/extremes_ex3/GISS-E2-H_block_extremes_metrics.json
2023-12-23 10:09:43,553 [INFO]: base.py(write:251) >> Results saved to a json file: /Users/lee1043/Documents/Research/git/pcmdi_metrics_20230620_pcmdi/pcmdi_metrics/doc/jupyter/Demo/demo_output/extremes_ex3/GISS-E2-H_block_extremes_metrics.json
INFO::2023-12-23 10:09::pcmdi_metrics:: Results saved to a json file: /Users/lee1043/Documents/Research/git/pcmdi_metrics_20230620_pcmdi/pcmdi_metrics/doc/jupyter/Demo/demo_output/extremes_ex3/block_extremes_metrics.json
2023-12-23 10:09:59,431 [INFO]: base.py(write:251) >> Results saved to a json file: /Users/lee1043/Documents/Research/git/pcmdi_metrics_20230620_pcmdi/pcmdi_metrics/doc/jupyter/Demo/demo_output/extremes_ex3/block_extremes_metrics.json
2023-12-23 10:09:59,431 [INFO]: base.py(write:251) >> Results saved to a json file: /Users/lee1043/Documents/Research/git/pcmdi_metrics_20230620_pcmdi/pcmdi_metrics/doc/jupyter/Demo/demo_output/extremes_ex3/block_extremes_metrics.json
Generating return values.
demo_output/extremes_ex3/netcdf/GISS-E2-H_r6i1p1_land_Rx5day_2000-2005.nc
Return value for single realization
Stationary case
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:484: RuntimeWarning: invalid value encountered in sqrt
  se = np.sqrt(np.diag(B))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
demo_output/extremes_ex3/netcdf/GISS-E2-H_r6i1p1_land_Rx1day_2000-2005.nc
Return value for single realization
Stationary case
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:484: RuntimeWarning: invalid value encountered in sqrt
  se = np.sqrt(np.diag(B))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
2023-12-23 10:14:29,933 [WARNING]: dataset.py(open_dataset:128) >> "No time coordinates were found in this dataset to decode. If time coordinates were expected to exist, make sure they are detectable by setting the CF 'axis' or 'standard_name' attribute (e.g., ds['time'].attrs['axis'] = 'T' or ds['time'].attrs['standard_name'] = 'time'). Afterwards, try decoding again with `xcdat.decode_time`."
2023-12-23 10:14:29,933 [WARNING]: dataset.py(open_dataset:128) >> "No time coordinates were found in this dataset to decode. If time coordinates were expected to exist, make sure they are detectable by setting the CF 'axis' or 'standard_name' attribute (e.g., ds['time'].attrs['axis'] = 'T' or ds['time'].attrs['standard_name'] = 'time'). Afterwards, try decoding again with `xcdat.decode_time`."
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
2023-12-23 10:14:30,960 [WARNING]: dataset.py(open_dataset:128) >> "No time coordinates were found in this dataset to decode. If time coordinates were expected to exist, make sure they are detectable by setting the CF 'axis' or 'standard_name' attribute (e.g., ds['time'].attrs['axis'] = 'T' or ds['time'].attrs['standard_name'] = 'time'). Afterwards, try decoding again with `xcdat.decode_time`."
2023-12-23 10:14:30,960 [WARNING]: dataset.py(open_dataset:128) >> "No time coordinates were found in this dataset to decode. If time coordinates were expected to exist, make sure they are detectable by setting the CF 'axis' or 'standard_name' attribute (e.g., ds['time'].attrs['axis'] = 'T' or ds['time'].attrs['standard_name'] = 'time'). Afterwards, try decoding again with `xcdat.decode_time`."
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
INFO::2023-12-23 10:14::pcmdi_metrics:: Results saved to a json file: /Users/lee1043/Documents/Research/git/pcmdi_metrics_20230620_pcmdi/pcmdi_metrics/doc/jupyter/Demo/demo_output/extremes_ex3/return_value_metrics.json
2023-12-23 10:14:47,566 [INFO]: base.py(write:251) >> Results saved to a json file: /Users/lee1043/Documents/Research/git/pcmdi_metrics_20230620_pcmdi/pcmdi_metrics/doc/jupyter/Demo/demo_output/extremes_ex3/return_value_metrics.json
2023-12-23 10:14:47,566 [INFO]: base.py(write:251) >> Results saved to a json file: /Users/lee1043/Documents/Research/git/pcmdi_metrics_20230620_pcmdi/pcmdi_metrics/doc/jupyter/Demo/demo_output/extremes_ex3/return_value_metrics.json

The plots and netcdf files can be found in the output directory. The next cell will display the map. The contours are rough on this map because this demo uses data with very low spatial resolution.

[13]:
from IPython.display import Image
from IPython.core.display import HTML
[14]:
from IPython.display import Image
from IPython.core.display import HTML

Image(filename = demo_output_directory + "/extremes_ex3/plots/maps/GISS-E2-H_r6i1p1_land_Rx1day_ANN.png")
[14]:
../_images/examples_Demo_8_extremes_29_0.png

The examples in this notebook produce return values assuming that the data is stationary in time. The Extremes Driver also has an option to produce nonstationary return values for model data only.

To generate nonstationary return values, the user must provide two variables:

–covariate_path: Path to covariate time series netcdf file. The only dimension should be time, in years (with time bounds).
–covariate: Name of covariate variable in file given by –covariate_path.

This static example would run the driver with a covariate file “covariate_file.nc” that contains the variable “mole_fraction_or_carbon_dioxide_in_air”:

extremes_driver.py -p basic_extremes_param.py --covariate_path ./covariate_file.nc --covariate "mole_fraction_of_carbon_dioxide_in_air"

Users can define a custom region over which to calculate the extremes metrics. There are two way to do this.

Coordinate method

The first method is to provide coordinate pairs that define a contiguous region. This region does not have to be rectangular, but it cannot have holes.

The following example provides lon/lat pairs that define the western hemisphere. The region name flag “–region_name” is optional in this case.

[15]:
%%bash
extremes_driver.py  -p basic_extremes_param.py \
--case_id "extremes_ex4" \
--plots \
--region_name "WestHemi" \
--coords [[180,-90],[360,-90],[360,90],[180,90]]
Region settings are:
  Coordinates: [[180.0, -90.0], [360.0, -90.0], [360.0, 90.0], [180.0, 90.0]]
  Region name: WestHemi

Metrics output path not found.
Creating metrics output directory demo_output/extremes_ex4
No sftlf file found for GISS-E2-H r6i1p1

-----------------------
model, run, variable: GISS-E2-H r6i1p1 pr
test_data (model in this case) full_path:
   demo_output/extremes_tmp/pr_day_GISS-E2-H_historical_r6i1p1_20000101-20051231.nc
Generating land sea mask.

Creating sftlf region mask.
Creating dataset mask.
Generating precipitation block extrema.
Writing results to netCDF.
Creating maps
Generating metrics.
INFO::2023-12-23 10:15::pcmdi_metrics:: Results saved to a json file: /Users/lee1043/Documents/Research/git/pcmdi_metrics_20230620_pcmdi/pcmdi_metrics/doc/jupyter/Demo/demo_output/extremes_ex4/GISS-E2-H_block_extremes_metrics.json
2023-12-23 10:15:25,709 [INFO]: base.py(write:251) >> Results saved to a json file: /Users/lee1043/Documents/Research/git/pcmdi_metrics_20230620_pcmdi/pcmdi_metrics/doc/jupyter/Demo/demo_output/extremes_ex4/GISS-E2-H_block_extremes_metrics.json
2023-12-23 10:15:25,709 [INFO]: base.py(write:251) >> Results saved to a json file: /Users/lee1043/Documents/Research/git/pcmdi_metrics_20230620_pcmdi/pcmdi_metrics/doc/jupyter/Demo/demo_output/extremes_ex4/GISS-E2-H_block_extremes_metrics.json
INFO::2023-12-23 10:15::pcmdi_metrics:: Results saved to a json file: /Users/lee1043/Documents/Research/git/pcmdi_metrics_20230620_pcmdi/pcmdi_metrics/doc/jupyter/Demo/demo_output/extremes_ex4/block_extremes_metrics.json
2023-12-23 10:15:40,415 [INFO]: base.py(write:251) >> Results saved to a json file: /Users/lee1043/Documents/Research/git/pcmdi_metrics_20230620_pcmdi/pcmdi_metrics/doc/jupyter/Demo/demo_output/extremes_ex4/block_extremes_metrics.json
2023-12-23 10:15:40,415 [INFO]: base.py(write:251) >> Results saved to a json file: /Users/lee1043/Documents/Research/git/pcmdi_metrics_20230620_pcmdi/pcmdi_metrics/doc/jupyter/Demo/demo_output/extremes_ex4/block_extremes_metrics.json
Generating return values.
demo_output/extremes_ex4/netcdf/GISS-E2-H_r6i1p1_WestHemi_Rx5day_2000-2005.nc
Return value for single realization
Stationary case
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
demo_output/extremes_ex4/netcdf/GISS-E2-H_r6i1p1_WestHemi_Rx1day_2000-2005.nc
Return value for single realization
Stationary case
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1583: RuntimeWarning: All-NaN slice encountered
  result = np.apply_along_axis(_nanquantile_1d, axis, a, q,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:401: RuntimeWarning: overflow encountered in exp
  result = np.sum(n * np.log(scale) + y + np.exp(-y))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:484: RuntimeWarning: invalid value encountered in sqrt
  se = np.sqrt(np.diag(B))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numdifftools/limits.py:150: UserWarning: All-NaN slice encountered
  warnings.warn(str(msg))
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/pcmdi_metrics/extremes/lib/return_value.py:409: RuntimeWarning: overflow encountered in power
  np.log(scale) + y ** (-1 / shape) + np.log(y) * (1 / shape + 1)
2023-12-23 10:17:07,225 [WARNING]: dataset.py(open_dataset:128) >> "No time coordinates were found in this dataset to decode. If time coordinates were expected to exist, make sure they are detectable by setting the CF 'axis' or 'standard_name' attribute (e.g., ds['time'].attrs['axis'] = 'T' or ds['time'].attrs['standard_name'] = 'time'). Afterwards, try decoding again with `xcdat.decode_time`."
2023-12-23 10:17:07,225 [WARNING]: dataset.py(open_dataset:128) >> "No time coordinates were found in this dataset to decode. If time coordinates were expected to exist, make sure they are detectable by setting the CF 'axis' or 'standard_name' attribute (e.g., ds['time'].attrs['axis'] = 'T' or ds['time'].attrs['standard_name'] = 'time'). Afterwards, try decoding again with `xcdat.decode_time`."
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
2023-12-23 10:17:08,197 [WARNING]: dataset.py(open_dataset:128) >> "No time coordinates were found in this dataset to decode. If time coordinates were expected to exist, make sure they are detectable by setting the CF 'axis' or 'standard_name' attribute (e.g., ds['time'].attrs['axis'] = 'T' or ds['time'].attrs['standard_name'] = 'time'). Afterwards, try decoding again with `xcdat.decode_time`."
2023-12-23 10:17:08,197 [WARNING]: dataset.py(open_dataset:128) >> "No time coordinates were found in this dataset to decode. If time coordinates were expected to exist, make sure they are detectable by setting the CF 'axis' or 'standard_name' attribute (e.g., ds['time'].attrs['axis'] = 'T' or ds['time'].attrs['standard_name'] = 'time'). Afterwards, try decoding again with `xcdat.decode_time`."
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/Users/lee1043/mambaforge/envs/pmp_devel_20231129/lib/python3.10/site-packages/numpy/lib/nanfunctions.py:1878: RuntimeWarning: Degrees of freedom <= 0 for slice.
  var = nanvar(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
INFO::2023-12-23 10:17::pcmdi_metrics:: Results saved to a json file: /Users/lee1043/Documents/Research/git/pcmdi_metrics_20230620_pcmdi/pcmdi_metrics/doc/jupyter/Demo/demo_output/extremes_ex4/return_value_metrics.json
2023-12-23 10:17:26,185 [INFO]: base.py(write:251) >> Results saved to a json file: /Users/lee1043/Documents/Research/git/pcmdi_metrics_20230620_pcmdi/pcmdi_metrics/doc/jupyter/Demo/demo_output/extremes_ex4/return_value_metrics.json
2023-12-23 10:17:26,185 [INFO]: base.py(write:251) >> Results saved to a json file: /Users/lee1043/Documents/Research/git/pcmdi_metrics_20230620_pcmdi/pcmdi_metrics/doc/jupyter/Demo/demo_output/extremes_ex4/return_value_metrics.json

Viewing the automatic plots verifies that the region of interest has been used. Again, the contours will look rough because of the low spatial resolution of the demo data.

[16]:
from IPython.display import Image
from IPython.core.display import HTML

Image(filename = demo_output_directory + "/extremes_ex4/plots/maps/GISS-E2-H_r6i1p1_WestHemi_Rx1day_ANN.png")
[16]:
../_images/examples_Demo_8_extremes_36_0.png

Shapefile method

The second method is to provide a shapefile containing the region of interest. The region of interest must be completely defined by a single, uniquely identifiable feature in the shapefile. For example, if the region of interest is the fifty states of the USA, there must be a single feature in the shapefile that contains all the land areas of all fifty states. The –region_name flag is required in this case.

–shp_path is the path of the shapefile containing your region
–region_name must match the name of your region as recorded under the shapefile attribute “–attribute”

Here is a static example of a command to get metrics for a region called “CANADA” under the “COUNTRY” attribute in a shapefile called “world_countries.shp”:

extremes_driver.py -p basic_extremes_param.py --shp_path world_countries.shp --attribute "COUNTRY" --region_name "CANADA"

Other options

Consult the `README file <>`__ for the extremes metrics to find the full set of user options.

Clean up

Run this cell to delete the low resolution datasets we created at the start of this demo.

[17]:
%%bash -s "$demo_output_directory"
rm -r $1/extremes_tmp