Skip to content

Commit

Permalink
Merge branch 'develop' into bugfix/ocnanalprep
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidHuber-NOAA committed Jul 8, 2024
2 parents c2b1f8c + 58fca16 commit 21c753a
Show file tree
Hide file tree
Showing 86 changed files with 727 additions and 982 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: 34 additions & 6 deletions env/GAEA.env
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,52 @@ step=$1
export launcher="srun -l --export=ALL"
export mpmd_opt="--multi-prog --output=mpmd.%j.%t.out"

export OMP_STACKSIZE=2048000
export NTHSTACK=1024000000

ulimit -s unlimited
ulimit -a

if [[ "${step}" = "fcst" ]]; then
if [[ "${step}" = "waveinit" ]]; then

export CFP_MP="YES"
if [[ "${step}" = "waveprep" ]]; then export MP_PULSE=0 ; fi
export wavempexec=${launcher}
export wave_mpmd=${mpmd_opt}

ppn="npe_node_${step}_${RUN}"
[[ -z "${!ppn+0}" ]] && ppn="npe_node_${step}"
nprocs="npe_${step}_${RUN}"
[[ -z ${!nprocs+0} ]] && nprocs="npe_${step}"
elif [[ "${step}" = "fcst" ]]; then

if [[ "${CDUMP}" =~ "gfs" ]]; then
nprocs="npe_${step}_gfs"
ppn="npe_node_${step}_gfs" || ppn="npe_node_${step}"
else
nprocs="npe_${step}"
ppn="npe_node_${step}"
fi
(( nnodes = (${!nprocs}+${!ppn}-1)/${!ppn} ))
(( ntasks = nnodes*${!ppn} ))
# With ESMF threading, the model wants to use the full node
export APRUN_UFS="${launcher} -n ${ntasks}"
unset nprocs ppn nnodes ntasks


elif [[ "${step}" = "atmos_products" ]]; then

export USE_CFP="YES" # Use MPMD for downstream product generation
export USE_CFP="YES" # Use MPMD for downstream product generation on Hera

elif [[ "${step}" = "oceanice_products" ]]; then

nth_max=$((npe_node_max / npe_node_oceanice_products))

export NTHREADS_OCNICEPOST=${nth_oceanice_products:-1}
export APRUN_OCNICEPOST="${launcher} -n 1 --cpus-per-task=${NTHREADS_OCNICEPOST}"

elif [[ "${step}" = "fit2obs" ]]; then

nth_max=$((npe_node_max / npe_node_fit2obs))

export NTHREADS_FIT2OBS=${nth_fit2obs:-1}
[[ ${NTHREADS_FIT2OBS} -gt ${nth_max} ]] && export NTHREADS_FIT2OBS=${nth_max}
export MPIRUN="${launcher} -n ${npe_fit2obs} --cpus-per-task=${NTHREADS_FIT2OBS}"

fi
10 changes: 10 additions & 0 deletions env/HERCULES.env
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,16 @@ case ${step} in
[[ ${NTHREADS_OCNANAL} -gt ${nth_max} ]] && export NTHREADS_OCNANAL=${nth_max}
export APRUN_OCNANAL="${launcher} -n ${npe_ocnanalrun} --cpus-per-task=${NTHREADS_OCNANAL}"
;;
"ocnanalecen")

export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}"

nth_max=$((npe_node_max / npe_node_ocnanalecen))

export NTHREADS_OCNANALECEN=${nth_ocnanalecen:-${nth_max}}
[[ ${NTHREADS_OCNANALECEN} -gt ${nth_max} ]] && export NTHREADS_OCNANALECEN=${nth_max}
export APRUN_OCNANALECEN="${launcher} -n ${npe_ocnanalecen} --cpus-per-task=${NTHREADS_OCNANALECEN}"
;;
"ocnanalchkpt")

export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}"
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 21c753a

Please sign in to comment.