diff --git a/jobs/JREGIONAL_RUN_PYTHON_GRAPHICS b/jobs/JREGIONAL_RUN_PYTHON_GRAPHICS index 5c4c02533..5ba81bc6e 100755 --- a/jobs/JREGIONAL_RUN_PYTHON_GRAPHICS +++ b/jobs/JREGIONAL_RUN_PYTHON_GRAPHICS @@ -62,9 +62,10 @@ on the output files corresponding to a specified forecast hour. #----------------------------------------------------------------------- # + if [ "${RUN_ENVIR}" = "nco" ]; then COMOUT="${COMOUT_BASEDIR}/$RUN.$PDY/$cyc${SLASH_ENSMEM_SUBDIR}" - postprd_dir="$COMOUT" + postprd_dir="${COMOUT}" run_dir="${COMOUT}/pyprd" zip_dir="${COMOUT}/nclprd" else @@ -73,26 +74,44 @@ else zip_dir="${CYCLE_DIR}${SLASH_ENSMEM_SUBDIR}/nclprd" fi +# Use a subdirectory for input from alternative wgrib2-produced grids. +if [ "${TILES:-}" = "full" ] ; then + subdir=${postprd_dir}/${TILELABEL:-}_grid + if [ -d ${subdir} ] ; then + postprd_dir=${subdir} + run_dir=${run_dir}/${TILELABEL:-}_grid + zip_dir=${zip_dir}/${TILELABEL:-}_grid + fi +fi + + # Choose an appropriate sites file for the grid -if [[ ${PREDEF_GRID_NAME} =~ CONUS ]] ; then - sites_file=conus_raobs.txt -elif [[ ${PREDEF_GRID_NAME} =~ AK ]] ; then +sites_file=conus_raobs.txt +tiles=${TILES:-full} + +if [[ "${PREDEF_GRID_NAME}" =~ "AK" || \ + "${TILELABEL:-}" == "242" ]] ; then sites_file=alaska_raobs.txt -else - print_err_msg_exit "\ - Choice of sites file is ambiguous. Please help." + tiles=${TILES:-full} + +elif [[ "${PREDEF_GRID_NAME}" =~ "RAP" || \ + "${PREDEF_GRID_NAME}" =~ "NA" || \ + "${TILELABEL:-}" = "221" ]] ; then + sites_file=na_raobs.txt + tiles=${TILES:-full} + fi # Choose the appropriate file template for graphics type - -case ${GRAPHICS_TYPE} in +case ${GRAPHICS_TYPE} in "maps") - file_tmpl="${NET}.${CDATE:8:2}z.bgdawpf{FCST_TIME:03d}.tm${CDATE:8:2}.grib2" + file_tmpl="${NET}.t${CDATE:8:2}z.bgdawpf{FCST_TIME:03d}.tm00.grib2" file_type=prs extra_args="\ - --tiles all + --all_leads \ + --tiles $tiles \ --images ${PYTHON_GRAPHICS_DIR}/image_lists/rrfs_subset.yml hourly" ;; @@ -101,9 +120,8 @@ case ${GRAPHICS_TYPE} in file_tmpl="${NET}.t${CDATE:8:2}z.bgrd3df{FCST_TIME:03d}.tm00.grib2" file_type=nat extra_args="\ - --sites ${PYTHON_GRAPHICS_DIR}/static/${sites_file}\ + --sites ${PYTHON_GRAPHICS_DIR}/static/${sites_file} \ --max_plev 100" - zip_dir=${zip_dir}/skewt ;; *) @@ -126,6 +144,7 @@ python -u ${PYTHON_GRAPHICS_DIR}/create_graphics.py \ -f 0 ${FCST_LEN_HRS} \ --file_tmpl ${file_tmpl} \ --file_type ${file_type} \ + -m "${MODEL}" \ -n ${SLURM_CPUS_ON_NODE:-12} \ -o ${run_dir} \ -s ${CDATE} \ diff --git a/ush/config.sh.3DRTMA_dev1 b/ush/config.sh.3DRTMA_dev1 index 39349d3e6..7e3f4929c 100644 --- a/ush/config.sh.3DRTMA_dev1 +++ b/ush/config.sh.3DRTMA_dev1 @@ -28,6 +28,9 @@ PREEXISTING_DIR_METHOD="upgrade" PREDEF_GRID_NAME=RRFS_CONUS_3km +TILE_LABELS="CONUS regions zones1 zones2" +TILE_SETS="full NE,NC,NW,SE,SC,SW ATL,CA-NV,CentralCA,CHI-DET,DCArea,EastCO,GreatLakes NYC-BOS,SEA-POR,SouthCA,SouthFL,VortexSE" + DO_DACYCLE="true" # #------------------------------------------------------------------------------------- diff --git a/ush/config.sh.RRFS_NA_13km b/ush/config.sh.RRFS_NA_13km index a37e7286d..359022c95 100644 --- a/ush/config.sh.RRFS_NA_13km +++ b/ush/config.sh.RRFS_NA_13km @@ -28,6 +28,9 @@ PREEXISTING_DIR_METHOD="rename" PREDEF_GRID_NAME=GSD_RAP13km ADDNL_OUTPUT_GRIDS=( "130" "242" ) +TILE_LABELS="NA" +TILE_SETS="full" + DO_DACYCLE="true" #DO_RETRO="true" #LBCS_ICS_ONLY="true" @@ -139,4 +142,3 @@ PTMP="/lfs4/BMC/nrtrr/NCO_dirs/ptmp" # Path to directory STMP that mostly conta # # where EMC_GRID_NAME has the value set above. # - diff --git a/ush/config.sh.RRFS_NA_3km b/ush/config.sh.RRFS_NA_3km index ab093ebd5..7a79bccb9 100644 --- a/ush/config.sh.RRFS_NA_3km +++ b/ush/config.sh.RRFS_NA_3km @@ -119,6 +119,9 @@ NCL_REGION="conus" MODEL="RRFS_NA_3km" ADDNL_OUTPUT_GRIDS=( "hrrr" "rrfsak" ) +TILE_LABELS="NA" +TILE_SETS="full" + # # In NCO mode, the following don't need to be explicitly set to "FALSE" # in this configuration file because the experiment generation script diff --git a/ush/config.sh.RRFS_dev1 b/ush/config.sh.RRFS_dev1 index b409057b4..54845c667 100644 --- a/ush/config.sh.RRFS_dev1 +++ b/ush/config.sh.RRFS_dev1 @@ -31,6 +31,9 @@ PREEXISTING_DIR_METHOD="rename" PREDEF_GRID_NAME=RRFS_CONUS_3km ADDNL_OUTPUT_GRIDS=( "hrrr" ) +TILE_LABELS="CONUS REGIONS" +TILE_SETS="full NE,NC,NW,SE,SC,SW" + DO_DACYCLE="true" #DO_RETRO="true" #LBCS_ICS_ONLY="true" diff --git a/ush/config_defaults.sh b/ush/config_defaults.sh index ddac2fe7a..6b493376d 100644 --- a/ush/config_defaults.sh +++ b/ush/config_defaults.sh @@ -1464,6 +1464,7 @@ NNODES_PROC_LIGHTNING="1" NNODES_PROC_BUFR="1" NNODES_RUN_REF2TTEN="1" NNODES_RUN_NONVARCLDANL="1" +NNODES_RUN_GRAPHICS="1" # # Number of cores. # @@ -1487,6 +1488,7 @@ PPN_PROC_LIGHTNING="1" PPN_PROC_BUFR="1" PPN_RUN_REF2TTEN="1" PPN_RUN_NONVARCLDANL="1" +PPN_RUN_GRAPHICS="24" # # Walltimes. # @@ -1577,6 +1579,34 @@ CUSTOM_POST_CONFIG_FP="" # #----------------------------------------------------------------------- # +# Set the tiles (or subdomains) for creating graphics in a Rocoto metatask. +# Do not include references to the grids that are produced in separate grib +# files (set with ADDNL_OUTPUT_GRIDS above). Those will be added in setup.sh +# +# TILE_LABELS +# A space separated list (string is fine, no need for array) of the labels +# applied to the groupings of tiles to be run as a single batch jobs. For +# example, you may label the set of tiles SE,NE,SC,NC,SW,NW as "regions", and +# the full input domain as "full" if you wanted those to run in two domains. The +# length must match the length of TILE_SETS. +# +# TILE_SETS +# A space separated list of tile groupings to plot. Space-separated sets +# indicate which ones will be grouped in a single batch job, comma sepated items +# are the tiles to be plotted in that batch job. For example: +# TILE_SETS="full SW,SC,SE NW,NC,NE" +# TILE_LABELS="full southern_regions northern_regions" +# would plot maps for the full domain in a batch job separately from the +# southern regions, using a third batch job for the northern regions. The +# space-separated list must match the length of TILE_LABELS. +# +#----------------------------------------------------------------------- +# +TILE_LABELS="full" +TILE_SETS="full" +# +#----------------------------------------------------------------------- +# # Set parameters associated with running ensembles. Definitions: # # DO_ENSEMBLE: diff --git a/ush/generate_FV3LAM_wflow.sh b/ush/generate_FV3LAM_wflow.sh index a55a0ef81..09d40acfc 100755 --- a/ush/generate_FV3LAM_wflow.sh +++ b/ush/generate_FV3LAM_wflow.sh @@ -218,6 +218,7 @@ settings="\ 'nnodes_proc_bufr': ${NNODES_PROC_BUFR} 'nnodes_run_ref2tten': ${NNODES_RUN_REF2TTEN} 'nnodes_run_nonvarcldanl': ${NNODES_RUN_NONVARCLDANL} + 'nnodes_run_graphics': ${NNODES_RUN_GRAPHICS} # # Number of cores used for a task # @@ -245,6 +246,7 @@ settings="\ 'ppn_proc_bufr': ${PPN_PROC_BUFR} 'ppn_run_ref2tten': ${PPN_RUN_REF2TTEN} 'ppn_run_nonvarcldanl': ${PPN_RUN_NONVARCLDANL} + 'ppn_run_graphics': ${PPN_RUN_GRAPHICS} # # Maximum wallclock time for each task. # @@ -367,6 +369,11 @@ settings="\ 'do_nonvar_cldanal': ${DO_NONVAR_CLDANAL} 'do_refl2tten': ${DO_REFL2TTEN} # +# graphics related parameters +# + 'tilelabels': ${TILE_LABELS} + 'tilesets': ${TILE_SETS} +# # retrospective experiments # 'do_retro': ${DO_RETRO} diff --git a/ush/setup.sh b/ush/setup.sh index 6a37ce6a9..20b2c4499 100755 --- a/ush/setup.sh +++ b/ush/setup.sh @@ -853,6 +853,19 @@ fi # #----------------------------------------------------------------------- # +# Add graphics for the additional post-processed domains +# +#----------------------------------------------------------------------- +# +if [ ${#ADDNL_OUTPUT_GRIDS[@]} -ne 0 ]; then + for grid in ${ADDNL_OUTPUT_GRIDS[@]} ; do + TILE_SETS="${TILE_SETS} full" + TILE_LABELS="${TILE_LABELS} ${grid}" + done +fi +# +#----------------------------------------------------------------------- +# # If using a custom post configuration file, make sure that it exists. # #----------------------------------------------------------------------- diff --git a/ush/templates/FV3LAM_wflow.xml b/ush/templates/FV3LAM_wflow.xml index ae95d1295..385a29d4a 100644 --- a/ush/templates/FV3LAM_wflow.xml +++ b/ush/templates/FV3LAM_wflow.xml @@ -112,7 +112,7 @@ tasks; and the "FCST" type is used for the RUN_FCST_TN task. {%- else %} &ACCOUNT;&QUEUE_ANALYSIS;"> {%- endif %} -&SERVICE_ACCOUNT;&QUEUE_GRAPHICS;{{ partition_graphics }}"> +&SERVICE_ACCOUNT;&QUEUE_GRAPHICS;{{ partition_graphics }}--exclusive"> @@ -897,17 +897,45 @@ MODULES_RUN_TASK_FP script. ************************************************************************ --> - + + + {{ tilelabels }} + {{ tilesets }} + + + &RSRV_GRAPHICS; + &WALL_LIMIT_GRAPHICS; + + {{ wtime_run_fcst }} + {{ nnodes_run_graphics }}:ppn={{ ppn_run_graphics }} + &TAG;_python_@H_#tilelabel# + &LOGDIR;/python_#tilelabel#.log + &LOAD_MODULES_RUN_TASK_FP; "run_graphics" "&JOBSDIR;/JREGIONAL_RUN_PYTHON_GRAPHICS" + + GLOBAL_VAR_DEFNS_FP&GLOBAL_VAR_DEFNS_FP; + PDY@Y@m@d + cyc@H + CDATE@Y@m@d@H + SLASH_ENSMEM_SUBDIR{{ slash_ensmem_subdir }} + GRAPHICS_TYPEmaps + TILES#tileset# + TILELABEL#tilelabel# + + + + + + + + &RSRV_GRAPHICS; &WALL_LIMIT_GRAPHICS; {{ wtime_run_fcst }} - 1:ppn=24 - --exclusive - &TAG;_python_@H_skewt - &LOGDIR;/python_skewt.log - + {{ nnodes_run_graphics }}:ppn={{ ppn_run_graphics }} + &TAG;_python_@H_skewts + &LOGDIR;/python_skewts_@H.log &LOAD_MODULES_RUN_TASK_FP; "run_graphics" "&JOBSDIR;/JREGIONAL_RUN_PYTHON_GRAPHICS" GLOBAL_VAR_DEFNS_FP&GLOBAL_VAR_DEFNS_FP; @@ -926,77 +954,11 @@ MODULES_RUN_TASK_FP script. ************************************************************************ ************************************************************************ --> - - - {% for h in range(0, postproc_long_len_hrs+1) %}{{ " %03d" % h }}{% endfor %} - {% for h in range(0, postproc_len_hrs+1) %}{{ " normal" }}{% endfor %} {% for h in range(postproc_len_hrs+1, postproc_long_len_hrs+1) %}{{ " long" }}{% endfor %} - - - - &RSRV_GRAPHICS; - &WALL_LIMIT_GRAPHICS; - - &JOBSDIR;/../scripts/exregional_run_ncl.ksh - 00:30:00 - 24G - 16 - &TAG;_&RUN_NCL_TN;_#fhr# - &LOGDIR;/&RUN_NCL_TN;_#fhr#_@Y@m@d@H.log - - GLOBAL_VAR_DEFNS_FP&GLOBAL_VAR_DEFNS_FP; - START_TIME@Y@m@d@H - FCST_TIME#fhr# - - - - - - +{%- endif %} - {%- if not do_retro %} - - - - {% for h in range(0, postproc_long_len_hrs+1) %}{{ " %03d" % h }}{% endfor %} - {% for h in range(0, postproc_len_hrs+1) %}{{ " normal" }}{% endfor %} {% for h in range(postproc_len_hrs+1, postproc_long_len_hrs+1) %}{{ " long" }}{% endfor %} - - - - &RSRV_GRAPHICS; - &WALL_LIMIT_GRAPHICS; - &JOBSDIR;/../scripts/exregional_run_ncl_zip.ksh - 1 - 00:15:00 - 2G - &TAG;_&RUN_NCL_ZIP_TN;_#fhr# - &LOGDIR;/&RUN_NCL_ZIP_TN;_#fhr#_@Y@m@d@H.log - - GLOBAL_VAR_DEFNS_FP&GLOBAL_VAR_DEFNS_FP; - START_TIME@Y@m@d@H - FCST_TIME#fhr# - - - - - - - - - - - - - -{%- endif %} -{%- endif %} - -{%- if not do_retro %}