Skip to content

Commit

Permalink
Merge pull request #708 from PCMDI/663_ao_monsoon_cmec_onlyflag
Browse files Browse the repository at this point in the history
Add cmec flag to Monsoon (Wang)
  • Loading branch information
gleckler1 authored Mar 15, 2021
2 parents 97267e8 + 2b1a127 commit 18cdf9e
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion pcmdi_metrics/monsoon_wang/monsoon_wang_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,17 @@ def create_monsoon_wang_parser():
default=2.5 / 86400.,
type=float,
help="Threshold for a hit when computing skill score")

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


Expand All @@ -71,6 +81,9 @@ def monsoon_wang_runner(args):
thr = args.threshold
sig_digits = '.3f'

# Get flag for CMEC output
cmec = args.cmec

#########################################
# PMP monthly default PR obs
cdms2.axis.longitude_aliases.append("longitude_prclim_mpd")
Expand Down Expand Up @@ -226,3 +239,6 @@ def monsoon_wang_runner(args):
separators=(
',',
': '))
if cmec:
print("Writing cmec file")
OUT.write_cmec(indent=4, separators=(',', ': '))

0 comments on commit 18cdf9e

Please sign in to comment.