Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Precip distribution #861

Merged
merged 47 commits into from
Oct 15, 2022
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
5a78e56
init dist
Sep 21, 2021
be11d63
version 0
Dec 22, 2021
fbd5d61
version 1
Jan 10, 2022
976d3c0
version 2
Feb 4, 2022
29fc541
frq_amt_peak_version3
Jul 7, 2022
19becbe
unevenness_version1
Jul 7, 2022
dd18832
rename folder
Jul 7, 2022
c4401ed
setup new folder
Jul 7, 2022
829a608
update driver
Jul 8, 2022
eee33bc
Merge remote-tracking branch 'origin/main' into 763_msa_precip_distri…
Jul 8, 2022
c660e07
version0
Jul 12, 2022
781de2f
Create README.md
msahn Jul 18, 2022
890f34d
remove old files
Jul 18, 2022
5b823f4
fix code styling with pre-commit
Jul 18, 2022
2ccbf1a
update setup.py
Jul 19, 2022
6926bc2
Update README.md
msahn Jul 20, 2022
02bb572
Update README.md
msahn Aug 23, 2022
bbb59de
Merge branch 'main' into 763_msa_precip_distribution
lee1043 Oct 13, 2022
14fc6e2
code style fix
lee1043 Oct 13, 2022
aeb72a0
pre-commit check
lee1043 Oct 13, 2022
1ddb148
code format fix
lee1043 Oct 13, 2022
c45d7c5
update pre-commit hooks and add black
lee1043 Oct 13, 2022
bec81c7
remove unused import
lee1043 Oct 13, 2022
6a4f30a
remove unused define
Oct 13, 2022
cc8e0b6
remove unused define
Oct 13, 2022
1d43cab
pre-commit check -- code style
lee1043 Oct 13, 2022
dceca62
merge parallel driver for cmip5 and cmip6 and use parameter files
lee1043 Oct 13, 2022
aee3056
add some doc for parallel use in pcmdi
lee1043 Oct 13, 2022
94d8c0a
clean up
lee1043 Oct 13, 2022
59be65f
exclude md files from pre-commit-hook
lee1043 Oct 13, 2022
3b5aff6
Merge branch 'main' into 763_msa_precip_distribution
lee1043 Oct 13, 2022
33aecbf
enable run for selected models
Oct 13, 2022
9869190
Update README.md
msahn Oct 13, 2022
5522d43
Update README.md
msahn Oct 13, 2022
5b8e6a0
add dependencies
lee1043 Oct 13, 2022
eabb8bf
Merge branch 'main' into 763_msa_precip_distribution
lee1043 Oct 14, 2022
100b988
ready for version update
lee1043 Oct 14, 2022
e0b3406
clean up
lee1043 Oct 14, 2022
4faa389
add cluster3_pdf nc file as part of data that can be used via egg_pth
lee1043 Oct 14, 2022
83b093a
use cluster3_pdf.amt_regrid.360x180_IMERG_ALL.nc via egg_pth
lee1043 Oct 14, 2022
8065ce6
use egg_pth for embedded netcdf data file, lib/cluster3_pdf.amt_regri…
lee1043 Oct 14, 2022
3270eee
add netcdf4 for xarray used in lib/lib_precip_distribution.py -- mayb…
lee1043 Oct 14, 2022
a57b21b
specify newly added dependency versions
lee1043 Oct 14, 2022
24d1faa
update netcdf4 version
lee1043 Oct 14, 2022
7a1eb9d
output directory structure to be more consistent to other metrics
lee1043 Oct 15, 2022
f12360e
Set back to test build test failure
lee1043 Oct 15, 2022
348e216
Set back again because no influence
lee1043 Oct 15, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions pcmdi_metrics/precip_distribution/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Precip distribution metrics
acordonez marked this conversation as resolved.
Show resolved Hide resolved

Reference: Ahn, M.-S., P. A. Ullrich, P. J. Gleckler, J. Lee, A. C. Ordonez, A. G. Pendergrass, and C. Jakob, 2022: Framework for Benchmarking Simulated Precipitation Distributions at Regional Scales. Geoscientific Model Development (in prep)

## 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`

Empty file.
19 changes: 19 additions & 0 deletions pcmdi_metrics/precip_distribution/lib/__init__.py
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
precip_distribution_frq_amt,
precip_distribution_cum,
Regrid,
getDailyCalendarMonth,
CalcBinStructure,
MakeDists,
CalcRainMetrics,
CalcMetricsDomain,
CalcMetricsDomain3Clust,
CalcMetricsDomainAR6,
CalcPscore,
CalcP10P90,
oneyear,
MedDomain,
MedDomain3Clust,
MedDomainAR6,
)
91 changes: 91 additions & 0 deletions pcmdi_metrics/precip_distribution/lib/argparse_functions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
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 not shown.
Loading