Skip to content

Commit

Permalink
Update gempak job to run one fcst hour per task (#2671)
Browse files Browse the repository at this point in the history
This PR updates gempak jobs (gfs, gdas, and goes) from processing all
forecast hours at once to one forecast hour at a time. This will reduce
the job runtime to less than 5 min, so restart capability is not needed.

Resolves #1250 
Ref #2666 #2667  
---------

Co-authored-by: Walter.Kolczynski <Walter.Kolczynski@noaa.gov>
  • Loading branch information
GwenChen-NOAA and WalterKolczynski-NOAA authored Jul 3, 2024
1 parent 8215ae6 commit 7dc6651
Show file tree
Hide file tree
Showing 15 changed files with 344 additions and 396 deletions.
6 changes: 5 additions & 1 deletion ecf/scripts/gdas/atmos/gempak/jgdas_atmos_gempak.ecf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#PBS -S /bin/bash
#PBS -N %RUN%_atmos_gempak_%CYC%
#PBS -N %RUN%_atmos_gempak_%FHR3%_%CYC%
#PBS -j oe
#PBS -q %QUEUE%
#PBS -A %PROJ%-%PROJENVIR%
Expand Down Expand Up @@ -31,9 +31,13 @@ module load gempak/${gempak_ver}

module list

#############################################################
# environment settings
#############################################################
export cyc=%CYC%
export cycle=t%CYC%z
export USE_CFP=YES
export FHR3=%FHR3%

############################################################
# CALL executable job script here
Expand Down
5 changes: 3 additions & 2 deletions ecf/scripts/gfs/atmos/gempak/jgfs_atmos_gempak.ecf
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#PBS -S /bin/bash
#PBS -N %RUN%_atmos_gempak_%CYC%
#PBS -N %RUN%_atmos_gempak_%FHR3%_%CYC%
#PBS -j oe
#PBS -q %QUEUE%
#PBS -A %PROJ%-%PROJENVIR%
#PBS -l walltime=03:00:00
#PBS -l walltime=00:30:00
#PBS -l select=1:ncpus=28:mpiprocs=28:mem=2GB
#PBS -l place=vscatter:shared
#PBS -l debug=true
Expand Down Expand Up @@ -37,6 +37,7 @@ module list
#############################################################
export cyc=%CYC%
export cycle=t%CYC%z
export FHR3=%FHR3%

############################################################
# CALL executable job script here
Expand Down
5 changes: 3 additions & 2 deletions ecf/scripts/gfs/atmos/gempak/jgfs_atmos_pgrb2_spec_gempak.ecf
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#PBS -S /bin/bash
#PBS -N %RUN%_atmos_pgrb2_spec_gempak_%CYC%
#PBS -N %RUN%_atmos_pgrb2_spec_gempak_%FHR3%_%CYC%
#PBS -j oe
#PBS -q %QUEUE%
#PBS -A %PROJ%-%PROJENVIR%
#PBS -l walltime=00:30:00
#PBS -l walltime=00:15:00
#PBS -l select=1:ncpus=1:mem=1GB
#PBS -l place=vscatter:shared
#PBS -l debug=true
Expand Down Expand Up @@ -35,6 +35,7 @@ module list
#############################################################
export cyc=%CYC%
export cycle=t%CYC%z
export FHR3=%FHR3%

############################################################
# CALL executable job script here
Expand Down
40 changes: 11 additions & 29 deletions jobs/JGDAS_ATMOS_GEMPAK
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,17 @@
source "${HOMEgfs}/ush/preamble.sh"
source "${HOMEgfs}/ush/jjob_header.sh" -e "gempak" -c "base gempak"

# TODO (#1219) This j-job is not part of the rocoto suite

############################################
# Set up model and cycle specific variables
############################################

export fend=09
export finc=3
export fstart=00
export GRIB=pgrb2f
export model=${model:-gdas}
export GRIB=${GRIB:-pgrb2f}
export EXT=""
export DBN_ALERT_TYPE=GDAS_GEMPAK
export DBN_ALERT_TYPE=${DBN_ALERT_TYPE:-GDAS_GEMPAK}

export SENDDBN=${SENDDBN:-NO}
export DBNROOT=${DBNROOT:-${UTILROOT}/fakedbn}

###################################
# Specify NET and RUN Name and model
####################################
export model=${model:-gdas}

##############################################
# Define COM directories
##############################################
Expand All @@ -40,26 +30,18 @@ for grid in 0p25 1p00; do
fi
done

# TODO: These actions belong in an ex-script not a j-job
if [[ -f poescript ]]; then
rm -f poescript
fi
########################################################
# Execute the script for one degree grib
########################################################

{
########################################################
# Execute the script.
echo "${SCRgfs}/exgdas_atmos_nawips.sh 1p00 009 GDAS_GEMPAK ${COM_ATMOS_GEMPAK_1p00}"
########################################################
"${SCRgfs}/exgdas_atmos_nawips.sh" "1p00" "${FHR3}" "GDAS_GEMPAK" "${COM_ATMOS_GEMPAK_1p00}"

########################################################
# Execute the script for quater-degree grib
echo "${SCRgfs}/exgdas_atmos_nawips.sh 0p25 009 GDAS_GEMPAK ${COM_ATMOS_GEMPAK_0p25}"
########################################################
} > poescript
########################################################
# Execute the script for quater-degree grib
########################################################

cat poescript
"${SCRgfs}/exgdas_atmos_nawips.sh" "0p25" "${FHR3}" "GDAS_GEMPAK" "${COM_ATMOS_GEMPAK_0p25}"

"${HOMEgfs}/ush/run_mpmd.sh" poescript
export err=$?; err_chk

############################################
Expand Down
164 changes: 92 additions & 72 deletions jobs/JGFS_ATMOS_GEMPAK
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,20 @@ source "${HOMEgfs}/ush/jjob_header.sh" -e "gempak" -c "base gempak"
############################################
# Set up model and cycle specific variables
############################################
export finc=${finc:-3}
export fstart=${fstart:-0}
export model=${model:-gfs}
export GRIB=${GRIB:-pgrb2f}
export EXT=""
export DBN_ALERT_TYPE=${DBN_ALERT_TYPE:-GFS_GEMPAK}

export SENDDBN=${SENDDBN:-NO}
export DBNROOT=${DBNROOT:-${UTILROOT}/fakedbn}

# For half-degree P Grib files
export DO_HD_PGRB=${DO_HD_PGRB:-YES}

###################################
# Specify NET and RUN Name and model
####################################
export model=${model:-gfs}

##############################################
# Define COM directories
##############################################
export SENDDBN=${SENDDBN:-NO}
export DBNROOT=${DBNROOT:-${UTILROOT}/fakedbn}

for grid in 0p25 0p50 1p00; do
GRID=${grid} YMD=${PDY} HH=${cyc} declare_from_tmpl -rx "COM_ATMOS_GRIB_${grid}:COM_ATMOS_GRIB_GRID_TMPL"
done
Expand All @@ -40,73 +33,100 @@ for grid in 1p00 0p50 0p25 40km 35km_atl 35km_pac; do
fi
done

# TODO: These actions belong in an ex-script not a j-job
if [[ -f poescript ]]; then
rm -f poescript
fi

fhr=10#${FHR3}
ocean_domain_max=180
if (( ocean_domain_max > FHMAX_GFS )); then
ocean_domain_max=${FHMAX_GFS}
fi

{
#################################################################
# Execute the script for the 384 hour 1 degree grib
##################################################################
echo "time ${SCRgfs}/exgfs_atmos_nawips.sh 1p00 ${FHMAX_GFS} GFS_GEMPAK ${COM_ATMOS_GEMPAK_1p00}"
echo "time ${SCRgfs}/exgfs_atmos_nawips.sh 1p00 ${FHMAX_GFS} GFS_GEMPAK ${COM_ATMOS_GEMPAK_1p00}"
echo "time ${SCRgfs}/exgfs_atmos_nawips.sh 1p00 ${FHMAX_GFS} GFS_GEMPAK ${COM_ATMOS_GEMPAK_1p00}"
echo "time ${SCRgfs}/exgfs_atmos_nawips.sh 1p00 ${FHMAX_GFS} GFS_GEMPAK ${COM_ATMOS_GEMPAK_1p00}"
echo "time ${SCRgfs}/exgfs_atmos_nawips.sh 1p00 ${FHMAX_GFS} GFS_GEMPAK ${COM_ATMOS_GEMPAK_1p00}"
echo "time ${SCRgfs}/exgfs_atmos_nawips.sh 1p00 ${FHMAX_GFS} GFS_GEMPAK ${COM_ATMOS_GEMPAK_1p00}"

#################################################################
# Execute the script for the half-degree grib
##################################################################
echo "time ${SCRgfs}/exgfs_atmos_nawips.sh 0p50 ${FHMAX_GFS} GFS_GEMPAK ${COM_ATMOS_GEMPAK_0p50}"
echo "time ${SCRgfs}/exgfs_atmos_nawips.sh 0p50 ${FHMAX_GFS} GFS_GEMPAK ${COM_ATMOS_GEMPAK_0p50}"
echo "time ${SCRgfs}/exgfs_atmos_nawips.sh 0p50 ${FHMAX_GFS} GFS_GEMPAK ${COM_ATMOS_GEMPAK_0p50}"
echo "time ${SCRgfs}/exgfs_atmos_nawips.sh 0p50 ${FHMAX_GFS} GFS_GEMPAK ${COM_ATMOS_GEMPAK_0p50}"
echo "time ${SCRgfs}/exgfs_atmos_nawips.sh 0p50 ${FHMAX_GFS} GFS_GEMPAK ${COM_ATMOS_GEMPAK_0p50}"
echo "time ${SCRgfs}/exgfs_atmos_nawips.sh 0p50 ${FHMAX_GFS} GFS_GEMPAK ${COM_ATMOS_GEMPAK_0p50}"

#################################################################
# Execute the script for the quater-degree grib
####################################################################
echo "time ${SCRgfs}/exgfs_atmos_nawips.sh 0p25 ${FHMAX_GFS} GFS_GEMPAK ${COM_ATMOS_GEMPAK_0p25}"
echo "time ${SCRgfs}/exgfs_atmos_nawips.sh 0p25 ${FHMAX_GFS} GFS_GEMPAK ${COM_ATMOS_GEMPAK_0p25}"
echo "time ${SCRgfs}/exgfs_atmos_nawips.sh 0p25 ${FHMAX_GFS} GFS_GEMPAK ${COM_ATMOS_GEMPAK_0p25}"
echo "time ${SCRgfs}/exgfs_atmos_nawips.sh 0p25 ${FHMAX_GFS} GFS_GEMPAK ${COM_ATMOS_GEMPAK_0p25}"
echo "time ${SCRgfs}/exgfs_atmos_nawips.sh 0p25 ${FHMAX_GFS} GFS_GEMPAK ${COM_ATMOS_GEMPAK_0p25}"
echo "time ${SCRgfs}/exgfs_atmos_nawips.sh 0p25 ${FHMAX_GFS} GFS_GEMPAK ${COM_ATMOS_GEMPAK_0p25}"
echo "time ${SCRgfs}/exgfs_atmos_nawips.sh 0p25 ${FHMAX_GFS} GFS_GEMPAK ${COM_ATMOS_GEMPAK_0p25}"
echo "time ${SCRgfs}/exgfs_atmos_nawips.sh 0p25 ${FHMAX_GFS} GFS_GEMPAK ${COM_ATMOS_GEMPAK_0p25}"
echo "time ${SCRgfs}/exgfs_atmos_nawips.sh 0p25 ${FHMAX_GFS} GFS_GEMPAK ${COM_ATMOS_GEMPAK_0p25}"
echo "time ${SCRgfs}/exgfs_atmos_nawips.sh 0p25 ${FHMAX_GFS} GFS_GEMPAK ${COM_ATMOS_GEMPAK_0p25}"

####################################################################
# Execute the script to create the 35km Pacific grids for OPC
#####################################################################
echo "time ${SCRgfs}/exgfs_atmos_nawips.sh 35km_pac ${ocean_domain_max} GFS_GEMPAK_WWB ${COM_ATMOS_GEMPAK_35km_pac}"
echo "time ${SCRgfs}/exgfs_atmos_nawips.sh 35km_pac ${ocean_domain_max} GFS_GEMPAK_WWB ${COM_ATMOS_GEMPAK_35km_pac}"

####################################################################
# Execute the script to create the 35km Atlantic grids for OPC
#####################################################################
echo "time ${SCRgfs}/exgfs_atmos_nawips.sh 35km_atl ${ocean_domain_max} GFS_GEMPAK_WWB ${COM_ATMOS_GEMPAK_35km_atl}"
echo "time ${SCRgfs}/exgfs_atmos_nawips.sh 35km_atl ${ocean_domain_max} GFS_GEMPAK_WWB ${COM_ATMOS_GEMPAK_35km_atl}"

#####################################################################
# Execute the script to create the 40km grids for HPC
######################################################################
echo "time ${SCRgfs}/exgfs_atmos_nawips.sh 40km ${ocean_domain_max} GFS_GEMPAK_WWB ${COM_ATMOS_GEMPAK_40km}"
echo "time ${SCRgfs}/exgfs_atmos_nawips.sh 40km ${ocean_domain_max} GFS_GEMPAK_WWB ${COM_ATMOS_GEMPAK_40km}"
} > poescript

cat poescript

"${HOMEgfs}/ush/run_mpmd.sh" poescript
#################################################################
# Execute the script for the 384 hour 1 degree grib
##################################################################
fhmin=0
fhmax=240
if (( fhr >= fhmin && fhr <= fhmax )); then
if ((fhr % 3 == 0)); then
"${SCRgfs}/exgfs_atmos_nawips.sh" "1p00" "${FHR3}" "GFS_GEMPAK" "${COM_ATMOS_GEMPAK_1p00}"
fi
fi

fhmin=252
fhmax=384
if (( fhr >= fhmin && fhr <= fhmax )); then
if ((fhr % 12 == 0)); then
"${SCRgfs}/exgfs_atmos_nawips.sh" "1p00" "${FHR3}" "GFS_GEMPAK" "${COM_ATMOS_GEMPAK_1p00}"
fi
fi

#################################################################
# Execute the script for the half-degree grib
##################################################################
fhmin=0
fhmax=240
if (( fhr >= fhmin && fhr <= fhmax )); then
if ((fhr % 3 == 0)); then
"${SCRgfs}/exgfs_atmos_nawips.sh" "0p50" "${FHR3}" "GFS_GEMPAK" "${COM_ATMOS_GEMPAK_0p50}"
fi
fi

fhmin=246
fhmax=276
if (( fhr >= fhmin && fhr <= fhmax )); then
if ((fhr % 6 == 0)); then
"${SCRgfs}/exgfs_atmos_nawips.sh" "0p50" "${FHR3}" "GFS_GEMPAK" "${COM_ATMOS_GEMPAK_0p50}"
fi
fi

fhmin=288
fhmax=384
if (( fhr >= fhmin && fhr <= fhmax )); then
if ((fhr % 12 == 0)); then
"${SCRgfs}/exgfs_atmos_nawips.sh" "0p50" "${FHR3}" "GFS_GEMPAK" "${COM_ATMOS_GEMPAK_0p50}"
fi
fi

#################################################################
# Execute the script for the quater-degree grib
####################################################################
fhmin=0
fhmax=120
if (( fhr >= fhmin && fhr <= fhmax )); then
if ((fhr % 1 == 0)); then
"${SCRgfs}/exgfs_atmos_nawips.sh" "0p25" "${FHR3}" "GFS_GEMPAK" "${COM_ATMOS_GEMPAK_0p25}"
fi
fi

fhmin=123
fhmax=240
if (( fhr >= fhmin && fhr <= fhmax )); then
if ((fhr % 3 == 0)); then
"${SCRgfs}/exgfs_atmos_nawips.sh" "0p25" "${FHR3}" "GFS_GEMPAK" "${COM_ATMOS_GEMPAK_0p25}"
fi
fi

fhmin=252
fhmax=384
if (( fhr >= fhmin && fhr <= fhmax )); then
if ((fhr % 12 == 0)); then
"${SCRgfs}/exgfs_atmos_nawips.sh" "0p25" "${FHR3}" "GFS_GEMPAK" "${COM_ATMOS_GEMPAK_0p25}"
fi
fi

####################################################################
# Execute the script to create the 35km and 40km grids
#####################################################################
fhmin=0
fhmax="${ocean_domain_max}"
if (( fhr >= fhmin && fhr <= fhmax )); then
if ((fhr % 3 == 0)); then
"${SCRgfs}/exgfs_atmos_nawips.sh" "35km_pac" "${FHR3}" "GFS_GEMPAK_WWB" "${COM_ATMOS_GEMPAK_35km_pac}"

"${SCRgfs}/exgfs_atmos_nawips.sh" "35km_atl" "${FHR3}" "GFS_GEMPAK_WWB" "${COM_ATMOS_GEMPAK_35km_atl}"

"${SCRgfs}/exgfs_atmos_nawips.sh" "40km" "${FHR3}" "GFS_GEMPAK_WWB" "${COM_ATMOS_GEMPAK_40km}"
fi
fi

export err=$?; err_chk

############################################
Expand Down
Loading

0 comments on commit 7dc6651

Please sign in to comment.