This example demonstrates how to run precipitation PDF (Probability Density Function) diagnostics comparing model output against observational datasets.
The precip_pdf diagnostic set:
- Calculates frequency and amount PDFs of daily precipitation
- Compares model output against observational datasets (GPCP, IMERG)
- Analyzes multiple regions: TROPICS, CONUS, and global
- Supports seasonal subsetting (ANN, DJF, MAM, JJA, SON)
- Generates interactive HTML viewer with detailed plots
ex10.py: Main run script with parameter configurationdiags.cfg: Configuration file specifying regions and reference datasets
reference_data_path: Location of observational daily precipitation datatest_data_path: Location of model daily time series output
test_start_yr,test_end_yr: Years to analyze from model dataref_start_yr,ref_end_yr: Years to analyze from observational data
season_subset: WhenTrue, analyzes all seasons (DJF, MAM, JJA, SON) plus annualsave_netcdf: WhenTrue, saves calculated PDFs to NetCDF for later useregions: List of regions to analyze ("global", "TROPICS", "CONUS")ref_name: Reference dataset(s) - can be single string or list
# Allocate a node (or use batch job)
salloc --nodes 1 --qos interactive --time 01:00:00 --constraint cpu --account=e3sm
# Load E3SM Unified environment
source /global/common/software/e3sm/anaconda_envs/load_latest_e3sm_unified_pm-cpu.sh
# Run the diagnostics
cd examples/ex10-precip-pdf
python ex10.py -d diags.cfg --multiprocessing --num_workers=32
# Adjust permissions to view results
chmod -R 755 <your web directory>e3sm_diags precip_pdf --no_viewer \
--reference_data_path '/global/cfs/cdirs/e3sm/diagnostics/observations/Atm/time-series/' \
--test_data_path '/global/cfs/cdirs/e3sm/chengzhu/tests/zppy_example_v3/v3.LR.amip_0101/post/atm/180x360_aave/ts/daily/10yr' \
--results_dir '/global/cfs/cdirs/e3sm/www/chengzhu/tests/precip_pdf_test_seasons_multi_ref' \
--case_id 'precipitation-pdf' \
--sets 'precip_pdf' \
--variables 'PRECT' \
--regions 'TROPICS' \
--save_netcdf \
--test_name 'E3SMv3.LR.amip_0101' \
--ref_name 'GPCPDAY_3.3' 'IMERG_Daily' \
--season_subset \
--test_start_yr 1995 \
--test_end_yr 2004 \
--ref_start_yr 2001 \
--ref_end_yr 2010The diagnostics generate:
- Plots: PNG files showing frequency and amount PDFs for each region/season
- NetCDF files: Cached global gridded PDFs (if
save_netcdf=True) - HTML Viewer: Interactive viewer at
<results_dir>/viewer/precip_pdf/index.html
- Single "Precipitation PDF" group containing all results
- Each row represents a unique region + reference dataset combination
- Detail pages for each season showing:
- Frequency PDF (df/dlog(P))
- Amount PDF (dA/dlog(P))
- Links to NetCDF data files
- Metadata and command to recreate
- GPCPDAY_3.3: GPCP 1-Degree Daily v3.3 (1996-2023)
- IMERG_Daily: GPM IMERG Daily (2001-2021)
- global: Global mean
- TROPICS: 30°S - 30°N
- CONUS: Continental United States
- Daily precipitation data is required (not monthly climatologies)
- Model variable should be
PRECT(total precipitation rate) - Reference data is automatically subset to match test data time range
- PDFs are calculated on exponentially-spaced bins (0.1 to ~900 mm/day)
- The viewer fix (v3.1.0+) ensures that all regions generate distinct detail HTML pages