Skip to content

Commit

Permalink
Merge branch 'develop' into feature/jgdas_enkf_select_obs_com_in_out
Browse files Browse the repository at this point in the history
  • Loading branch information
mingshichen-noaa authored Nov 26, 2024
2 parents 1213950 + e41eff2 commit 20917eb
Show file tree
Hide file tree
Showing 27 changed files with 515 additions and 513 deletions.
2 changes: 1 addition & 1 deletion ci/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ def cases = ''
def GH = 'none'
// Location of the custom workspaces for each machine in the CI system. They are persitent for each iteration of the PR.
def NodeName = [hera: 'Hera-EMC', orion: 'Orion-EMC', hercules: 'Hercules-EMC', gaea: 'Gaea']
def custom_workspace = [hera: '/scratch1/NCEPDEV/global/CI', orion: '/work2/noaa/stmp/CI/ORION', hercules: '/work2/noaa/global/CI/HERCULES', gaea: '/gpfs/f5/epic/proj-shared/global/CI']
def custom_workspace = [hera: '/scratch1/NCEPDEV/global/CI_dh', orion: '/work2/noaa/stmp/CI/ORION', hercules: '/work2/noaa/global/CI/HERCULES', gaea: '/gpfs/f5/epic/proj-shared/global/CI']
def repo_url = '[email protected]:NOAA-EMC/global-workflow.git'
def STATUS = 'Passed'

Expand Down
2 changes: 1 addition & 1 deletion jobs/JGLOBAL_FORECAST
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ if [[ "${DO_ICE}" == "YES" ]]; then
COMIN_ICE_RESTART_PREV:COM_ICE_RESTART_TMPL
fi

if [[ "${DO_AERO}" == "YES" ]]; then
if [[ "${DO_AERO_FCST}" == "YES" ]]; then
YMD="${PDY}" HH="${cyc}" declare_from_tmpl -rx \
COMOUT_CHEM_HISTORY:COM_CHEM_HISTORY_TMPL
fi
Expand Down
2 changes: 1 addition & 1 deletion parm/archive/gdas.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ gdas:
- "{{ COMIN_ATMOS_ANALYSIS | relpath(ROTDIR) }}/{{ head }}oznstat"
- "{{ COMIN_ATMOS_ANALYSIS | relpath(ROTDIR) }}/{{ head }}radstat"
{% endif %}
{% if DO_AERO and (AERO_ANL_RUN == "gdas" or AERO_ANL_RUN == "both") %}
{% if DO_AERO_ANL %}
- "{{ COMIN_CHEM_ANALYSIS | relpath(ROTDIR) }}/{{ head }}aerostat"
{% endif %}
{% if DO_PREP_OBS_AERO %}
Expand Down
2 changes: 1 addition & 1 deletion parm/archive/gfs_arcdir.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
ARCDIR ~ "/snowstat." ~ RUN ~ "." ~ cycle_YMDH ~ ".tgz"]) %}
{% endif %}

{% if DO_AERO and (AERO_ANL_RUN == RUN or AERO_ANL_RUN == "both") %}
{% if DO_AERO_ANL %}
{% do det_anl_files.append([COMIN_CHEM_ANALYSIS ~ "/" ~ head ~ "aerostat",
ARCDIR ~ "/aerostat." ~ RUN ~ "." ~ cycle_YMDH ]) %}
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion parm/archive/gfsa.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ gfsa:
{% else %}
- "{{ COMIN_ATMOS_ANALYSIS | relpath(ROTDIR) }}/{{ head }}gsistat"
{% endif %}
{% if DO_AERO and (AERO_ANL_RUN == "gfs" or AERO_ANL_RUN == "both") %}
{% if DO_AERO_ANL %}
- "{{ COMIN_CHEM_ANALYSIS | relpath(ROTDIR) }}/{{ head }}aerostat"
{% endif %}
{% if DO_PREP_OBS_AERO %}
Expand Down
2 changes: 1 addition & 1 deletion parm/archive/master_gfs.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ datasets:
{% endfilter %}
{% endif %}

{% if DO_AERO and (AERO_FCST_RUN == "gfs" or AERO_FCST_RUN == "both") %}
{% if DO_AERO_FCST %}
# Aerosol forecasts
{% filter indent(width=4) %}
{% include "chem.yaml.j2" %}
Expand Down
8 changes: 3 additions & 5 deletions parm/config/gefs/config.base
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,8 @@ export DO_COUPLED="NO"
export DO_WAVE="NO"
export DO_OCN="NO"
export DO_ICE="NO"
export DO_AERO="NO"
export DO_EXTRACTVARS="@DO_EXTRACTVARS@" # Option to process and extract a subset of products to save on disk
export AERO_FCST_RUN="gefs" # When to run aerosol forecast: gdas, gfs, or both
export WAVE_RUN="gefs" # When to include wave suite: gdas, gfs, or both
export DO_AERO_FCST="NO"
export DOBNDPNT_WAVE="NO" # The GEFS buoys file does not currently have any boundary points
export DOIBP_WAV="NO" # Option to create point outputs from input boundary points
export FRAC_GRID=".true."
Expand Down Expand Up @@ -183,7 +181,7 @@ case "${APP}" in
ATM)
;;
ATMA)
export DO_AERO="YES"
export DO_AERO_FCST="YES"
;;
ATMW)
export DO_COUPLED="YES"
Expand All @@ -200,7 +198,7 @@ case "${APP}" in
export DO_ICE="YES"

if [[ "${APP}" =~ A$ ]]; then
export DO_AERO="YES"
export DO_AERO_FCST="YES"
fi

if [[ "${APP}" =~ ^S2SW ]]; then
Expand Down
4 changes: 2 additions & 2 deletions parm/config/gefs/config.efcs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
echo "BEGIN: config.efcs"

# Turn off components in ensemble
# export DO_AERO="NO"
# export DO_AERO_FCST="NO"
# export DO_OCN="NO"
# export DO_ICE="NO"
# export DO_WAVE="NO"
Expand All @@ -19,7 +19,7 @@ string="--fv3 ${CASE}"
[[ "${DO_OCN}" == "YES" ]] && string="${string} --mom6 ${OCNRES}"
[[ "${DO_ICE}" == "YES" ]] && string="${string} --cice6 ${ICERES}"
[[ "${DO_WAVE}" == "YES" ]] && string="${string} --ww3 ${waveGRD// /;}"
[[ "${DO_AERO}" == "YES" ]] && string="${string} --gocart"
[[ "${DO_AERO_FCST}" == "YES" ]] && string="${string} --gocart"
# shellcheck disable=SC2086
source "${EXPDIR}/config.ufs" ${string}

Expand Down
16 changes: 2 additions & 14 deletions parm/config/gefs/config.fcst
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,12 @@ echo "BEGIN: config.fcst"
export USE_ESMF_THREADING="YES" # Toggle to use ESMF-managed threading or traditional threading in UFSWM
export COPY_FINAL_RESTARTS="NO" # Toggle to copy restarts from the end of GFS/GEFS Run (GDAS is handled seperately)

# Turn off waves if not used for this RUN
case ${WAVE_RUN} in
both | "${RUN/enkf}" ) ;; # Don't change
*) DO_WAVE="NO" ;; # Turn waves off
esac

# Turn off aerosols if not used for this RUN
case ${AERO_FCST_RUN} in
both | "${RUN/enkf}" ) ;; # Don't change
*) DO_AERO="NO" ;; # Turn waves off
esac

# Source model specific information that is resolution dependent
string="--fv3 ${CASE}"
[[ "${DO_OCN}" == "YES" ]] && string="${string} --mom6 ${OCNRES}"
[[ "${DO_ICE}" == "YES" ]] && string="${string} --cice6 ${ICERES}"
[[ "${DO_WAVE}" == "YES" ]] && string="${string} --ww3 ${waveGRD// /;}"
[[ "${DO_AERO}" == "YES" ]] && string="${string} --gocart"
[[ "${DO_AERO_FCST}" == "YES" ]] && string="${string} --gocart"
# We are counting on $string being multiple arguments
# shellcheck disable=SC2086
source "${EXPDIR}/config.ufs" ${string}
Expand Down Expand Up @@ -142,7 +130,7 @@ tbp=""
if [[ "${progsigma}" == ".true." ]]; then tbp="_progsigma" ; fi

# Radiation options
if [[ "${DO_AERO}" == "YES" ]]; then
if [[ "${DO_AERO_FCST}" == "YES" ]]; then
export IAER=2011 # spectral band mapping method for aerosol optical properties
else
export IAER=1011
Expand Down
4 changes: 2 additions & 2 deletions parm/config/gefs/config.resources
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ case ${step} in
export ntasks=1
export tasks_per_node=1
export threads_per_task=1
export is_exclusive=True
export memory="4096M"
;;

"waveinit")
Expand Down Expand Up @@ -144,7 +144,7 @@ case ${step} in
echo "MEDIATOR using (threads, PETS) = (${MEDTHREADS}, ${MEDPETS})"

CHMPETS=0; CHMTHREADS=0
if [[ "${DO_AERO}" == "YES" ]]; then
if [[ "${DO_AERO_FCST}" == "YES" ]]; then
# GOCART shares the same grid and forecast tasks as FV3 (do not add write grid component tasks).
(( CHMTHREADS = ATMTHREADS ))
(( CHMPETS = FV3PETS ))
Expand Down
34 changes: 23 additions & 11 deletions parm/config/gfs/config.base
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ export APP=@APP@

shopt -s extglob
# Adjust APP based on RUN
# If a component (WAVES, etc) needs to be turned off by RUN, set it here
case "${RUN}" in
enkf*) # Turn off aerosols and waves
APP="${APP/%+([WA])}"
Expand All @@ -175,11 +176,12 @@ export DO_COUPLED="NO"
export DO_WAVE="NO"
export DO_OCN="NO"
export DO_ICE="NO"
export DO_AERO="NO"
DO_AERO="NO"
export DO_PREP_OBS_AERO="NO"
export AERO_FCST_RUN="gdas" # When to run aerosol forecast: gdas, gfs, or both
export AERO_ANL_RUN="both" # When to run aerosol analysis: gdas, gfs, or both
export WAVE_RUN="both" # When to include wave suite: gdas, gfs, or both
aero_fcst_runs="gdas" # When to run aerosol forecast: gdas, gfs, or both
aero_anl_runs="gdas gfs" # When to run aerosol analysis: gdas, gfs, or both
export DO_AERO_FCST="NO"
export DO_AERO_ANL="NO"
export DOBNDPNT_WAVE="NO"
export DOIBP_WAV="NO" # Option to create point outputs from input boundary points
export FRAC_GRID=".true."
Expand Down Expand Up @@ -221,15 +223,15 @@ case "${CASE}" in
;;
*)
echo "FATAL ERROR: Unrecognized CASE ${CASE}, ABORT!"
exit 1
exit 2
;;
esac

case "${APP}" in
ATM)
;;
ATMA)
export DO_AERO="YES"
DO_AERO="YES"
;;
ATMW)
export DO_COUPLED="YES"
Expand All @@ -246,19 +248,29 @@ case "${APP}" in
export DO_ICE="YES"

if [[ "${APP}" =~ A$ ]]; then
export DO_AERO="YES"
DO_AERO="YES"
fi

if [[ "${APP}" =~ ^S2SW ]]; then
export DO_WAVE="YES"
fi
;;
*)
echo "Unrecognized APP: '${APP}'"
exit 2
echo "FATAL ERROR: Unrecognized APP: '${APP}'"
exit 3
;;
esac

# Aerosol forecasts and analyses may be RUN-dependent
if [[ "${DO_AERO}" == "YES" ]]; then
if [[ ${aero_anl_runs} =~ ${RUN} ]]; then
export DO_AERO_ANL="YES"
fi
if [[ ${aero_fcst_runs} =~ ${RUN} ]]; then
export DO_AERO_FCST="YES"
fi
fi

# Surface cycle update frequency
if [[ "${RUN}" =~ "gdas" ]] ; then
export FHCYC=1
Expand Down Expand Up @@ -457,8 +469,8 @@ export FHMAX_FITS=132
export HPSSARCH="@HPSSARCH@" # save data to HPSS archive
export LOCALARCH="@LOCALARCH@" # save data to local archive
if [[ ${HPSSARCH} = "YES" ]] && [[ ${LOCALARCH} = "YES" ]]; then
echo "Both HPSS and local archiving selected. Please choose one or the other."
exit 3
echo "FATAL ERROR: Both HPSS and local archiving selected. Please choose one or the other."
exit 4
fi
export ARCH_CYC=00 # Archive data at this cycle for warm_start capability
export ARCH_WARMICFREQ=4 # Archive frequency in days for warm_start capability
Expand Down
2 changes: 1 addition & 1 deletion parm/config/gfs/config.efcs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ string="--fv3 ${CASE}"
[[ "${DO_OCN}" == "YES" ]] && string="${string} --mom6 ${OCNRES}"
[[ "${DO_ICE}" == "YES" ]] && string="${string} --cice6 ${ICERES}"
[[ "${DO_WAVE}" == "YES" ]] && string="${string} --ww3 ${waveGRD// /;}"
[[ "${DO_AERO}" == "YES" ]] && string="${string} --gocart"
[[ "${DO_AERO_FCST}" == "YES" ]] && string="${string} --gocart"
# We are counting on $string being multiple arguments
# shellcheck disable=SC2086
source "${EXPDIR}/config.ufs" ${string}
Expand Down
16 changes: 2 additions & 14 deletions parm/config/gfs/config.fcst
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,12 @@ echo "BEGIN: config.fcst"
export USE_ESMF_THREADING="YES" # Toggle to use ESMF-managed threading or traditional threading in UFSWM
export COPY_FINAL_RESTARTS="NO" # Toggle to copy restarts from the end of GFS/GEFS Run (GDAS is handled seperately)

# Turn off waves if not used for this RUN
case ${WAVE_RUN} in
both | "${RUN/enkf}" ) ;; # Don't change
*) DO_WAVE="NO" ;; # Turn waves off
esac

# Turn off aerosols if not used for this RUN
case ${AERO_FCST_RUN} in
both | "${RUN/enkf}" ) ;; # Don't change
*) DO_AERO="NO" ;; # Turn aerosols off
esac

# Source model specific information that is resolution dependent
string="--fv3 ${CASE}"
[[ "${DO_OCN}" == "YES" ]] && string="${string} --mom6 ${OCNRES}"
[[ "${DO_ICE}" == "YES" ]] && string="${string} --cice6 ${ICERES}"
[[ "${DO_WAVE}" == "YES" ]] && string="${string} --ww3 ${waveGRD// /;}"
[[ "${DO_AERO}" == "YES" ]] && string="${string} --gocart"
[[ "${DO_AERO_FCST}" == "YES" ]] && string="${string} --gocart"
# We are counting on $string being multiple arguments
# shellcheck disable=SC2086
source "${EXPDIR}/config.ufs" ${string}
Expand Down Expand Up @@ -157,7 +145,7 @@ tbp=""
if [[ "${progsigma}" == ".true." ]]; then tbp="_progsigma" ; fi

# Radiation options
if [[ "${DO_AERO}" == "YES" ]]; then
if [[ "${DO_AERO_FCST}" == "YES" ]]; then
export IAER=2011 # spectral band mapping method for aerosol optical properties
else
export IAER=1011
Expand Down
4 changes: 2 additions & 2 deletions parm/config/gfs/config.resources
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,7 @@ case ${step} in
echo "MEDIATOR using (threads, PETS) = (${MEDTHREADS}, ${MEDPETS})"

CHMPETS=0; CHMTHREADS=0
if [[ "${DO_AERO}" == "YES" ]]; then
if [[ "${DO_AERO_FCST}" == "YES" ]]; then
# GOCART shares the same grid and forecast tasks as FV3 (do not add write grid component tasks).
(( CHMTHREADS = ATMTHREADS ))
(( CHMPETS = FV3PETS ))
Expand Down Expand Up @@ -1036,7 +1036,7 @@ case ${step} in
ntasks=1
tasks_per_node=1
threads_per_task=1
export is_exclusive=True
memory="4096M"
;;

"atmensanlinit")
Expand Down
6 changes: 3 additions & 3 deletions scripts/exglobal_archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import os

from pygfs.task.archive import Archive
from wxflow import AttrDict, Logger, cast_strdict_as_dtypedict, chdir, logit
from wxflow import AttrDict, Logger, cast_strdict_as_dtypedict, logit

# initialize root logger
logger = Logger(level=os.environ.get("LOGGING_LEVEL", "DEBUG"), colored_log=True)
Expand All @@ -19,7 +19,7 @@ def main():

# Pull out all the configuration keys needed to run the rest of archive steps
keys = ['ATARDIR', 'current_cycle', 'FHMIN', 'FHMAX', 'FHOUT', 'RUN', 'PDY',
'DO_VERFRAD', 'DO_VMINMON', 'DO_VERFOZN', 'DO_ICE', 'DO_AERO', 'DO_PREP_OBS_AERO',
'DO_VERFRAD', 'DO_VMINMON', 'DO_VERFOZN', 'DO_ICE', 'DO_PREP_OBS_AERO',
'PARMgfs', 'DO_OCN', 'DO_WAVE', 'WRITE_DOPOST', 'PSLOT', 'HPSSARCH', 'DO_MOS',
'DO_JEDISNOWDA', 'LOCALARCH', 'REALTIME', 'ROTDIR', 'ARCH_WARMICFREQ',
'ARCH_FCSTICFREQ', 'ARCH_CYC', 'assim_freq', 'ARCDIR', 'SDATE',
Expand All @@ -29,7 +29,7 @@ def main():
'DOIAU', 'OCNRES', 'ICERES', 'NUM_SND_COLLECTIVES', 'FHOUT_WAV',
'FHOUT_HF_WAV', 'FHMAX_WAV', 'FHMAX_HF_WAV', 'FHMAX_WAV_GFS',
'restart_interval_gdas', 'restart_interval_gfs',
'AERO_ANL_RUN', 'AERO_FCST_RUN', 'DOIBP_WAV', 'DO_JEDIOCNVAR',
'DO_AERO_ANL', 'DO_AERO_FCST', 'DOIBP_WAV', 'DO_JEDIOCNVAR',
'NMEM_ENS', 'DO_JEDIATMVAR', 'DO_VRFY_OCEANDA', 'FHMAX_FITS', 'waveGRD',
'IAUFHRS', 'DO_FIT2OBS', 'NET', 'FHOUT_HF_GFS', 'FHMAX_HF_GFS', 'REPLAY_ICS',
'OFFSET_START_HOUR']
Expand Down
2 changes: 1 addition & 1 deletion ush/python/pygfs/task/archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def configure(self, arch_dict: Dict[str, Any]) -> (Dict[str, Any], List[Dict[str
Parameters
----------
arch_dict : Dict[str, Any]
Task specific keys, e.g. runtime options (DO_AERO, DO_ICE, etc)
Task specific keys, e.g. runtime options (DO_AERO_FCST, DO_ICE, etc)
Return
------
Expand Down
Loading

0 comments on commit 20917eb

Please sign in to comment.