-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #861 from PCMDI/763_msa_precip_distribution
763 msa precip distribution
- Loading branch information
Showing
22 changed files
with
2,759 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Precip distribution metrics | ||
|
||
Reference: Ahn, M.-S., P. A. Ullrich, P. J. Gleckler, J. Lee, A. C. Ordonez, and A. G. Pendergrass, 2022: Evaluating Precipitation Distributions at Regional Scales: A Benchmarking Framework and Application to CMIP5 and CMIP6. Geoscientific Model Development (Submitted) | ||
|
||
## Driver code: | ||
- `precip_distribution_driver.py` | ||
|
||
## Parameter codes: | ||
- `param/` | ||
- `precip_distribution_params_IMERG.py` | ||
- `precip_distribution_params_TRMM.py` | ||
- `precip_distribution_params_CMORPH.py` | ||
- `precip_distribution_params_GPCP.py` | ||
- `precip_distribution_params_PERSIANN.py` | ||
- `precip_distribution_params_ERA5.py` | ||
- `precip_distribution_params_cmip5.py` | ||
- `precip_distribution_params_cmip6.py` | ||
|
||
## Run scripts: | ||
- `scripts_pcmdi/` | ||
- `run_obs.bash` | ||
- `run_parallel.wait.bash` | ||
|
||
## Note | ||
- Input data: daily averaged precipitation | ||
- This code should be run for a reference observation initially as some metrics (e.g., Perkins score) need a reference. | ||
- After completing calculation for a reference observation, this code can work for multiple datasets at once. | ||
- This benchmarking framework provides three tiers of area averaged outputs for i) large scale domain (Tropics and Extratropics with separated land and ocean) commonly used in the PMP , ii) large scale domain with clustered precipitation characteristics (Tropics and Extratropics with separated land and ocean, and separated heavy, moderate, and light precipitation regions), and iii) modified IPCC AR6 regions shown in the reference paper. |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from .argparse_functions import AddParserArgument # noqa | ||
from .lib_precip_distribution import ( # noqa | ||
CalcBinStructure, | ||
CalcMetricsDomain, | ||
CalcMetricsDomain3Clust, | ||
CalcMetricsDomainAR6, | ||
CalcP10P90, | ||
CalcPscore, | ||
CalcRainMetrics, | ||
MakeDists, | ||
MedDomain, | ||
MedDomain3Clust, | ||
MedDomainAR6, | ||
Regrid, | ||
getDailyCalendarMonth, | ||
oneyear, | ||
precip_distribution_cum, | ||
precip_distribution_frq_amt, | ||
) |
79 changes: 79 additions & 0 deletions
79
pcmdi_metrics/precip_distribution/lib/argparse_functions.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
def AddParserArgument(P): | ||
P.add_argument( | ||
"--mip", type=str, dest="mip", default=None, help="cmip5, cmip6 or other mip" | ||
) | ||
P.add_argument( | ||
"--exp", type=str, dest="exp", default=None, help="amip, cmip or others" | ||
) | ||
P.add_argument("--mod", type=str, dest="mod", default=None, help="model") | ||
P.add_argument( | ||
"--var", type=str, dest="var", default=None, help="pr or other variable" | ||
) | ||
P.add_argument( | ||
"--frq", type=str, dest="frq", default=None, help="day, 3hr or other frequency" | ||
) | ||
P.add_argument( | ||
"--modpath", type=str, dest="modpath", default=None, help="data directory path" | ||
) | ||
P.add_argument( | ||
"--results_dir", | ||
type=str, | ||
dest="results_dir", | ||
default=None, | ||
help="results directory path", | ||
) | ||
P.add_argument( | ||
"--case_id", type=str, dest="case_id", default=None, help="case_id with date" | ||
) | ||
P.add_argument( | ||
"--prd", | ||
type=int, | ||
dest="prd", | ||
nargs="+", | ||
default=None, | ||
help="start- and end-year for analysis (e.g., 1985 2004)", | ||
) | ||
P.add_argument( | ||
"--fac", | ||
type=str, | ||
dest="fac", | ||
default=None, | ||
help="factor to make unit of [mm/day]", | ||
) | ||
P.add_argument( | ||
"--res", | ||
type=int, | ||
dest="res", | ||
nargs="+", | ||
default=None, | ||
help="list of target horizontal resolution [degree] for interporation (lon, lat)", | ||
) | ||
P.add_argument("--ref", type=str, dest="ref", default=None, help="reference data") | ||
P.add_argument( | ||
"--ref_dir", | ||
type=str, | ||
dest="ref_dir", | ||
default=None, | ||
help="reference directory path", | ||
) | ||
P.add_argument( | ||
"--exp", type=str, dest="exp", default=None, help="e.g., historical or amip" | ||
) | ||
P.add_argument("--ver", type=str, dest="ver", default=None, help="version") | ||
P.add_argument( | ||
"--cmec", | ||
dest="cmec", | ||
default=False, | ||
action="store_true", | ||
help="Use to save CMEC format metrics JSON", | ||
) | ||
P.add_argument( | ||
"--no_cmec", | ||
dest="cmec", | ||
default=False, | ||
action="store_false", | ||
help="Do not save CMEC format metrics JSON", | ||
) | ||
P.set_defaults(cmec=False) | ||
|
||
return P |
Binary file added
BIN
+48 KB
pcmdi_metrics/precip_distribution/lib/cluster3_pdf.amt_regrid.360x180_IMERG_ALL.nc
Binary file not shown.
Oops, something went wrong.