Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into feature/use_jcb_atm
Browse files Browse the repository at this point in the history
* upstream/develop:
  Add task to prepare emissions for GEFS (NOAA-EMC#2562)
  Single Executable for main GDAS JEDI applications (NOAA-EMC#2565)
  Add nest capability (NOAA-EMC#2545)
  • Loading branch information
danholdaway committed May 7, 2024
2 parents 6d0b8b6 + 9b6f840 commit b743ea0
Show file tree
Hide file tree
Showing 36 changed files with 1,376 additions and 152 deletions.
4 changes: 4 additions & 0 deletions env/HERA.env
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ elif [[ "${step}" = "prepsnowobs" ]]; then

export APRUN_CALCFIMS="${launcher} -n 1"

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

export APRUN="${launcher} -n 1"

elif [[ "${step}" = "waveinit" ]] || [[ "${step}" = "waveprep" ]] || [[ "${step}" = "wavepostsbs" ]] || [[ "${step}" = "wavepostbndpnt" ]] || [[ "${step}" = "wavepostbndpntbll" ]] || [[ "${step}" = "wavepostpnt" ]]; then

export CFP_MP="YES"
Expand Down
4 changes: 4 additions & 0 deletions env/HERCULES.env
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ case ${step} in

export APRUN_CALCFIMS="${launcher} -n 1"
;;
"prep_emissions")

export APRUN="${launcher} -n 1"
;;
"waveinit" | "waveprep" | "wavepostsbs" | "wavepostbndpnt" | "wavepostpnt" | "wavepostbndpntbll")

export CFP_MP="YES"
Expand Down
4 changes: 4 additions & 0 deletions env/JET.env
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ elif [[ "${step}" = "prepsnowobs" ]]; then

export APRUN_CALCFIMS="${launcher} -n 1"

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

export APRUN="${launcher} -n 1"

elif [[ "${step}" = "waveinit" ]] || [[ "${step}" = "waveprep" ]] || [[ "${step}" = "wavepostsbs" ]] || [[ "${step}" = "wavepostbndpnt" ]] || [[ "${step}" = "wavepostbndpntbll" ]] || [[ "${step}" = "wavepostpnt" ]]; then

export CFP_MP="YES"
Expand Down
4 changes: 4 additions & 0 deletions env/ORION.env
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ elif [[ "${step}" = "prepsnowobs" ]]; then

export APRUN_CALCFIMS="${launcher} -n 1"

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

export APRUN="${launcher} -n 1"

elif [[ "${step}" = "waveinit" ]] || [[ "${step}" = "waveprep" ]] || [[ "${step}" = "wavepostsbs" ]] || \
[[ "${step}" = "wavepostbndpnt" ]] || [[ "${step}" = "wavepostpnt" ]] || [[ "${step}" == "wavepostbndpntbll" ]]; then

Expand Down
4 changes: 4 additions & 0 deletions env/S4.env
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ elif [[ "${step}" = "prepsnowobs" ]]; then

export APRUN_CALCFIMS="${launcher} -n 1"

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

export APRUN="${launcher} -n 1"

elif [[ "${step}" = "waveinit" ]] || [[ "${step}" = "waveprep" ]] || [[ "${step}" = "wavepostsbs" ]] || [[ "${step}" = "wavepostbndpnt" ]] || [[ "${step}" = "wavepostbndpntbll" ]] || [[ "${step}" = "wavepostpnt" ]]; then

export CFP_MP="YES"
Expand Down
4 changes: 4 additions & 0 deletions env/WCOSS2.env
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ elif [[ "${step}" = "prepsnowobs" ]]; then

export APRUN_CALCFIMS="${launcher} -n 1"

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

export APRUN="${launcher} -n 1"

elif [[ "${step}" = "waveinit" ]] || [[ "${step}" = "waveprep" ]] || [[ "${step}" = "wavepostsbs" ]] || [[ "${step}" = "wavepostbndpnt" ]] || [[ "${step}" = "wavepostbndpntbll" ]] || [[ "${step}" = "wavepostpnt" ]]; then

export USE_CFP="YES"
Expand Down
35 changes: 35 additions & 0 deletions jobs/JGLOBAL_PREP_EMISSIONS
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#! /usr/bin/env bash

source "${HOMEgfs}/ush/preamble.sh"
source "${HOMEgfs}/ush/jjob_header.sh" -e "prep_emissions" -c "base prep_emissions"

##############################################
# Set variables used in the script
##############################################
# TODO: Set local variables used in this script e.g. GDATE may be needed for previous cycle

##############################################
# Begin JOB SPECIFIC work
##############################################
# Generate COM variables from templates
# TODO: Add necessary COMIN, COMOUT variables for this job

###############################################################
# Run relevant script
EXSCRIPT=${PREP_EMISSIONS_PY:-${SCRgfs}/exglobal_prep_emissions.py}
${EXSCRIPT}
status=$?
(( status != 0 )) && ( echo "FATAL ERROR: Error executing ${EXSCRIPT}, ABORT!"; exit "${status}" )

##############################################
# End JOB SPECIFIC work
##############################################

##############################################
# Final processing
##############################################
if [[ -e "${pgmout}" ]] ; then
cat "${pgmout}"
fi

exit 0
23 changes: 23 additions & 0 deletions jobs/rocoto/prep_emissions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#! /usr/bin/env bash

source "${HOMEgfs}/ush/preamble.sh"

###############################################################
# Source UFSDA workflow modules
source "${HOMEgfs}/ush/load_fv3gfs_modules.sh"
status=$?
(( status != 0 )) && exit "${status}"

export job="prep_emissions"
export jobid="${job}.$$"

###############################################################
# setup python path for workflow utilities and tasks
PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}${HOMEgfs}/ush/python"
export PYTHONPATH

###############################################################
# Execute the JJOB
"${HOMEgfs}/jobs/JGLOBAL_PREP_EMISSIONS"
status=$?
exit "${status}"
7 changes: 7 additions & 0 deletions parm/config/gefs/config.base
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,13 @@ export DO_AERO="NO"
export WAVE_CDUMP="" # When to include wave suite: gdas, gfs, or both
export DOBNDPNT_WAVE="NO" # The GEFS buoys file does not currently have any boundary points
export FRAC_GRID=".true."
export DO_NEST="NO" # Whether to run a global-nested domain
if [[ "${DO_NEST:-NO}" == "YES" ]] ; then
export ntiles=7
export NEST_OUTPUT_GRID="regional_latlon"
else
export ntiles=6
fi

# Set operational resolution
export OPS_RES="C768" # Do not change
Expand Down
11 changes: 11 additions & 0 deletions parm/config/gefs/config.prep_emissions
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#! /usr/bin/env bash

########## config.prep_emissions ##########
# aerosol emissions preprocessing specific

echo "BEGIN: config.prep_emissions"

# Get task specific resources
source "${EXPDIR}/config.resources" prep_emissions

echo "END: config.prep_emissions"
8 changes: 8 additions & 0 deletions parm/config/gefs/config.resources
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@ case ${step} in
export memory_waveinit="2GB"
;;

"prep_emissions")
export wtime_prep_emissions="00:10:00"
export npe_prep_emissions=1
export nth_prep_emissions=1
export npe_node_prep_emissions=$(( npe_node_max / nth_prep_emissions ))
export memory_prep_emissions="1GB"
;;

"fcst" | "efcs")
export is_exclusive=True

Expand Down
2 changes: 1 addition & 1 deletion parm/config/gfs/config.aeroanl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export JEDI_FIX_YAML="${PARMgfs}/gdas/aero_jedi_fix.yaml.j2"
export io_layout_x=@IO_LAYOUT_X@
export io_layout_y=@IO_LAYOUT_Y@

export JEDIEXE="${EXECgfs}/fv3jedi_var.x"
export JEDIEXE="${EXECgfs}/gdas.x"

if [[ "${DOIAU}" == "YES" ]]; then
export aero_bkg_times="3,6,9"
Expand Down
2 changes: 1 addition & 1 deletion parm/config/gfs/config.atmanl
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ export layout_y_atmanl=@LAYOUT_Y_ATMANL@
export io_layout_x=@IO_LAYOUT_X@
export io_layout_y=@IO_LAYOUT_Y@

export JEDIEXE=${EXECgfs}/fv3jedi_var.x
export JEDIEXE=${EXECgfs}/gdas.x

echo "END: config.atmanl"
2 changes: 1 addition & 1 deletion parm/config/gfs/config.atmensanl
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ export layout_y_atmensanl=@LAYOUT_Y_ATMENSANL@
export io_layout_x=@IO_LAYOUT_X@
export io_layout_y=@IO_LAYOUT_Y@

export JEDIEXE=${EXECgfs}/fv3jedi_letkf.x
export JEDIEXE=${EXECgfs}/gdas.x

echo "END: config.atmensanl"
7 changes: 7 additions & 0 deletions parm/config/gfs/config.base
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,13 @@ export DO_AERO="NO"
export WAVE_CDUMP="" # When to include wave suite: gdas, gfs, or both
export DOBNDPNT_WAVE="NO"
export FRAC_GRID=".true."
export DO_NEST="NO" # Whether to run a global-nested domain
if [[ "${DO_NEST:-NO}" == "YES" ]] ; then
export ntiles=7
export NEST_OUTPUT_GRID="regional_latlon"
else
export ntiles=6
fi

# Set operational resolution
export OPS_RES="C768" # Do not change # TODO: Why is this needed and where is it used?
Expand Down
3 changes: 3 additions & 0 deletions parm/config/gfs/config.fcst
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,9 @@ export DO_SKEB=${DO_SKEB:-"NO"}
export DO_SHUM=${DO_SHUM:-"NO"}
export DO_LAND_PERT=${DO_LAND_PERT:-"NO"}
export DO_CA=${DO_CA:-"YES"}
if [[ "${DO_NEST:-NO}" == "YES" ]] ; then
export DO_CA="NO" # CA does not work with nesting.
fi

#coupling settings
export cplmode="ufs.frac"
Expand Down
7 changes: 7 additions & 0 deletions parm/config/gfs/config.resources
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,13 @@ case ${step} in
[[ "${DO_ICE}" == "YES" ]] && nthreads_cice6=1
fi

if (( ntiles > 6 )); then
export layout_x_nest=${layout_x_nest:-10}
export layout_y_nest=${layout_y_nest:-10}
export npx_nest=${npx_nest:-1441}
export npy_nest=${npy_nest:-961}
fi

# PETS for the atmosphere dycore
(( FV3PETS = ntasks_fv3 * nthreads_fv3 ))
echo "FV3 using (nthreads, PETS) = (${nthreads_fv3}, ${FV3PETS})"
Expand Down
2 changes: 1 addition & 1 deletion parm/config/gfs/config.snowanl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ source "${EXPDIR}/config.resources" snowanl
export OBS_LIST="${PARMgfs}/gdas/snow/obs/lists/gdas_snow.yaml.j2"

# Name of the JEDI executable and its yaml template
export JEDIEXE="${EXECgfs}/fv3jedi_letkf.x"
export JEDIEXE="${EXECgfs}/gdas.x"
export JEDIYAML="${PARMgfs}/gdas/snow/letkfoi/letkfoi.yaml.j2"

# Ensemble member properties
Expand Down
4 changes: 4 additions & 0 deletions parm/config/gfs/config.stage_ic
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,8 @@ case "${CASE}" in
;;
esac

if [[ "${DO_NEST:-NO}" == "YES" ]] ; then
export CPL_ATMIC="GLOBAL-NEST_${CASE}"
fi

echo "END: config.stage_ic"
Loading

0 comments on commit b743ea0

Please sign in to comment.