Skip to content

Commit

Permalink
[develop] Add option to plot a list of domains. (#560)
Browse files Browse the repository at this point in the history
Currently the domain to plot is hard-coded to conus in the plotting scripts. This PR adds the capability to choose either conus or regional or both.
  • Loading branch information
danielabdi-noaa authored Jan 26, 2023
1 parent 7ce093b commit 5acf381
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 2 deletions.
2 changes: 2 additions & 0 deletions jobs/JREGIONAL_PLOT_ALLVARS
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ $SCRIPTSdir/exregional_plot_allvars.py \
--inc ${PLOT_FCST_INC:-1} \
--comout ${COMOUT} \
--cartopy-dir ${FIXshp} \
--plot-domains "${PLOT_DOMAINS[@]}" \
--domain ${GRID_NAME} || \
print_err_msg_exit "\
Call to ex-script corresponding to J-job \"${scrfunc_fn}\" failed."
Expand All @@ -89,6 +90,7 @@ if [ ! -z $COMOUT_REF ]; then
--comout-1 ${COMOUT} \
--comout-2 ${COMOUT_REF} \
--cartopy-dir ${FIXshp} \
--plot-domains "${PLOT_DOMAINS[@]}" \
--domain ${GRID_NAME} || \
print_err_msg_exit "\
Call to ex-script corresponding to J-job \"${scrfunc_fn}\" failed."
Expand Down
10 changes: 9 additions & 1 deletion scripts/exregional_plot_allvars.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,14 @@ def setup_logging(debug=False):
help="Name of native domain used in forecast (and in constructing post file names).",
required=True,
)
parser.add_argument(
"--plot-domains",
"-p",
nargs="+",
default=["conus"],
help="Name of domain to plot (either 'conus' or 'regional' or both).",
required=False,
)
parser.add_argument(
"--debug",
action="store_true",
Expand Down Expand Up @@ -414,7 +422,7 @@ def setup_logging(debug=False):
# Specify plotting domains
# User can add domains here, just need to specify lat/lon information below
# (if dom == 'conus' block)
domains = ["conus"] # Other option is 'regional'
domains = args.plot_domains # Other option is 'regional'

###################################################
# Read in all variables and calculate differences #
Expand Down
10 changes: 9 additions & 1 deletion scripts/exregional_plot_allvars_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,14 @@ def setup_logging(debug=False):
help="Name of native domain used in forecast (and in constructing post file names).",
required=True,
)
parser.add_argument(
"--plot-domains",
"-p",
nargs="+",
default=["conus"],
help="Name of domains to plot (either 'conus' or 'regional' or both).",
required=False,
)
parser.add_argument(
"--debug",
action="store_true",
Expand Down Expand Up @@ -438,7 +446,7 @@ def setup_logging(debug=False):
# Specify plotting domains
# User can add domains here, just need to specify lat/lon information below
# (if dom == 'conus' block)
domains = ["conus"] # Other option is 'regional'
domains = args.plot_domains # Other option is 'regional'

###################################################
# Read in all variables and calculate differences #
Expand Down
4 changes: 4 additions & 0 deletions ush/config_defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2210,6 +2210,10 @@ task_plot_allvars:
# By default the end is FCST_LEN_HRS
#-----------------------------------
PLOT_FCST_END: ""
#------------------------------------------------------------------------------
# Domains to plot. Currently supported are either "conus" or "regional" or both
#-------------------------------------------------------------------------------
PLOT_DOMAINS: ["conus"]


#----------------------------
Expand Down

0 comments on commit 5acf381

Please sign in to comment.