diff --git a/parm/archive/gdas.yaml.j2 b/parm/archive/gdas.yaml.j2 index 030678f31f..b630563c02 100644 --- a/parm/archive/gdas.yaml.j2 +++ b/parm/archive/gdas.yaml.j2 @@ -67,7 +67,7 @@ gdas: - "{{ COMIN_ATMOS_ANALYSIS | relpath(ROTDIR) }}/{{ head }}oznstat" - "{{ COMIN_ATMOS_ANALYSIS | relpath(ROTDIR) }}/{{ head }}radstat" {% endif %} - {% if 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 %} diff --git a/parm/archive/gfs_arcdir.yaml.j2 b/parm/archive/gfs_arcdir.yaml.j2 index 57dbc78885..98803b473c 100644 --- a/parm/archive/gfs_arcdir.yaml.j2 +++ b/parm/archive/gfs_arcdir.yaml.j2 @@ -50,7 +50,7 @@ ARCDIR ~ "/snowstat." ~ RUN ~ "." ~ cycle_YMDH ~ ".tgz"]) %} {% endif %} - {% if 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 %} diff --git a/parm/archive/gfsa.yaml.j2 b/parm/archive/gfsa.yaml.j2 index 226a7178fa..b0397818cf 100644 --- a/parm/archive/gfsa.yaml.j2 +++ b/parm/archive/gfsa.yaml.j2 @@ -38,7 +38,7 @@ gfsa: {% else %} - "{{ COMIN_ATMOS_ANALYSIS | relpath(ROTDIR) }}/{{ head }}gsistat" {% endif %} - {% if 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 %} diff --git a/parm/archive/master_gfs.yaml.j2 b/parm/archive/master_gfs.yaml.j2 index ab9a00c95e..e7187d70d5 100644 --- a/parm/archive/master_gfs.yaml.j2 +++ b/parm/archive/master_gfs.yaml.j2 @@ -33,7 +33,7 @@ datasets: {% endfilter %} {% endif %} -{% if AERO_FCST_RUN == "gfs" or AERO_FCST_RUN == "both" %} +{% if DO_AERO_FCST %} # Aerosol forecasts {% filter indent(width=4) %} {% include "chem.yaml.j2" %} diff --git a/parm/config/gefs/config.base b/parm/config/gefs/config.base index 6cf8488f91..b6e7616155 100644 --- a/parm/config/gefs/config.base +++ b/parm/config/gefs/config.base @@ -135,9 +135,7 @@ 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="" # When to run aerosol forecast: gdas, gfs, or both -export AERO_ANL_RUN="" # When to run aerosol analysis: gdas, gfs, or both -export WAVE_RUN="" # 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." @@ -183,13 +181,11 @@ case "${APP}" in ;; ATMA) export DO_AERO="YES" - export AERO_ANL_RUN="both" - export AERO_FCST_RUN="gdas" + export DO_AERO_FCST="NO" ;; ATMW) export DO_COUPLED="YES" export DO_WAVE="YES" - export WAVE_RUN="both" ;; NG-GODAS) export DO_ATM="NO" @@ -203,13 +199,11 @@ case "${APP}" in if [[ "${APP}" =~ A$ ]]; then export DO_AERO="YES" - export AERO_ANL_RUN="both" - export AERO_FCST_RUN="gdas" + export DO_AERO_FCST="NO" fi if [[ "${APP}" =~ ^S2SW ]]; then export DO_WAVE="YES" - export WAVE_RUN="both" export cplwav2atm=".true." fi ;; diff --git a/parm/config/gefs/config.fcst b/parm/config/gefs/config.fcst index efdedb24f4..8d9fb0bea5 100644 --- a/parm/config/gefs/config.fcst +++ b/parm/config/gefs/config.fcst @@ -8,17 +8,10 @@ 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 +if [[ "${DO_AERO_FCST}" == "NO" ]]; then + DO_AERO="NO" +fi # Source model specific information that is resolution dependent string="--fv3 ${CASE}" diff --git a/parm/config/gfs/config.base b/parm/config/gfs/config.base index 328721cacd..2a45e63d83 100644 --- a/parm/config/gfs/config.base +++ b/parm/config/gfs/config.base @@ -155,6 +155,7 @@ export SENDDBN=${SENDDBN:-"NO"} export DBNROOT=${DBNROOT:-${UTILROOT:-}/fakedbn} # APP settings; configurable by RUN +# If a component (WAVES, etc) needs to be turned on/off by RUN, set it here case "${RUN}" in "gfs") export APP=@APP@ @@ -193,9 +194,11 @@ export DO_OCN="NO" export DO_ICE="NO" export DO_AERO="NO" export DO_PREP_OBS_AERO="NO" -export AERO_FCST_RUN="" # When to run aerosol forecast: gdas, gfs, or both -export AERO_ANL_RUN="" # When to run aerosol analysis: gdas, gfs, or both -export WAVE_RUN="" # 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 +wave_runs="gdas gfs" # When to include wave suite: 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." @@ -246,13 +249,10 @@ case "${APP}" in ;; ATMA) export DO_AERO="YES" - export AERO_ANL_RUN="both" - export AERO_FCST_RUN="gdas" ;; ATMW) export DO_COUPLED="YES" export DO_WAVE="YES" - export WAVE_RUN="both" ;; NG-GODAS) export DO_ATM="NO" @@ -266,13 +266,10 @@ case "${APP}" in if [[ "${APP}" =~ A$ ]]; then export DO_AERO="YES" - export AERO_ANL_RUN="both" - export AERO_FCST_RUN="gdas" fi if [[ "${APP}" =~ ^S2SW ]]; then export DO_WAVE="YES" - export WAVE_RUN="both" fi ;; *) @@ -281,6 +278,22 @@ case "${APP}" in ;; esac +# Aerosol forecasts and analyses may be RUN-dependent +if [[ "${DO_AERO}" == "YES" ]]; then + for aero_run in ${aero_anl_runs}; do + if [[ "${aero_run}" == "${RUN}" ]]; then + export DO_AERO_ANL="YES" + break + fi + done + for aero_run in ${aero_fcst_runs}; do + if [[ "${aero_run}" == "${RUN}" ]]; then + export DO_AERO_FCST="YES" + break + fi + done +fi + # Surface cycle update frequency if [[ "${RUN}" =~ "gdas" ]] ; then export FHCYC=1 diff --git a/parm/config/gfs/config.fcst b/parm/config/gfs/config.fcst index da336ff73b..1c19cd1c03 100644 --- a/parm/config/gfs/config.fcst +++ b/parm/config/gfs/config.fcst @@ -8,17 +8,10 @@ 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 +# Turn off aerosols if they are not being forecasted +if [[ "${DO_AERO_FCST}" == "NO" ]]; then + DO_AERO="NO" +fi # Source model specific information that is resolution dependent string="--fv3 ${CASE}" diff --git a/scripts/exglobal_archive.py b/scripts/exglobal_archive.py index 4ee9e5ed0e..cf885b028d 100755 --- a/scripts/exglobal_archive.py +++ b/scripts/exglobal_archive.py @@ -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) @@ -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'] diff --git a/workflow/applications/applications.py b/workflow/applications/applications.py index 03e47089d7..67eceb02d2 100644 --- a/workflow/applications/applications.py +++ b/workflow/applications/applications.py @@ -98,6 +98,8 @@ def _get_run_options(self, conf: Configuration) -> Dict[str, Any]: run_options[run]['do_ice'] = run_base.get('DO_ICE', False) run_options[run]['do_aero'] = run_base.get('DO_AERO', False) run_options[run]['do_prep_obs_aero'] = run_base.get('DO_PREP_OBS_AERO', False) + run_options[run]['do_aero_anl'] = run_base.get('DO_AERO_ANL', False) + run_options[run]['do_aero_fcst'] = run_base.get('DO_AERO_FCST', False) run_options[run]['do_hpssarch'] = run_base.get('HPSSARCH', False) run_options[run]['fcst_segments'] = run_base.get('FCST_SEGMENTS', None) @@ -105,37 +107,6 @@ def _get_run_options(self, conf: Configuration) -> Dict[str, Any]: if not AppConfig.is_monotonic(run_options[run]['fcst_segments']): raise ValueError(f'Forecast segments do not increase monotonically: {",".join(self.fcst_segments)}') - wave_runs = [] - if run_options[run]['do_wave']: - wave_run = run_base.get('WAVE_RUN', 'BOTH').lower() - if wave_run in ['both']: - wave_runs = ['gfs', 'gdas'] - elif wave_run in ['gfs', 'gdas']: - wave_runs = [wave_run] - - run_options[run]['wave_runs'] = wave_runs - - aero_anl_runs = [] - aero_fcst_runs = [] - if run_options[run]['do_aero']: - aero_anl_run = run_base.get('AERO_ANL_RUN', 'BOTH').lower() - if aero_anl_run in ['both']: - aero_anl_runs = ['gfs', 'gdas'] - elif aero_anl_run in ['gfs', 'gdas']: - aero_anl_runs = [aero_anl_run] - - aero_fcst_run = run_base.get('AERO_FCST_RUN', None).lower() - if aero_fcst_run in ['both']: - aero_fcst_runs = ['gfs', 'gdas'] - elif aero_fcst_run in ['gfs', 'gdas']: - aero_fcst_runs = [aero_fcst_run] - - run_options[run]['do_aero_anl'] = True if run in aero_anl_runs else False - run_options[run]['do_aero_fcst'] = True if run in aero_fcst_runs else False - - run_options[run]['aero_anl_runs'] = aero_anl_runs - run_options[run]['aero_fcst_runs'] = aero_fcst_runs - # Append any MODE-specific options run_options = self._netmode_run_options(run_base, run_options) diff --git a/workflow/applications/gfs_cycled.py b/workflow/applications/gfs_cycled.py index 7f5504df3a..e3c50a13ee 100644 --- a/workflow/applications/gfs_cycled.py +++ b/workflow/applications/gfs_cycled.py @@ -192,17 +192,17 @@ def get_task_names(self): if not options['do_jediatmvar']: task_names[run] += ['analdiag'] - if options['do_wave'] and run in self.wave_runs: + if options['do_wave']: task_names[run] += wave_prep_tasks - if options['do_aero'] and run in options['aero_anl_runs']: + if options['do_aero_anl']: task_names[run] += ['aeroanlgenb'] else: - if options['do_wave'] and run in self.wave_runs: + if options['do_wave']: task_names[run] += wave_prep_tasks - if options['do_aero'] and run in options['aero_anl_runs']: + if options['do_aero_anl']: task_names[run] += ['aeroanlinit', 'aeroanlvar', 'aeroanlfinal'] if options['do_prep_obs_aero']: @@ -257,7 +257,7 @@ def get_task_names(self): if options['do_metp']: task_names[run] += ['metp'] - if options['do_wave'] and run in options['wave_runs']: + if options['do_wave']: if options['do_wave_bnd']: task_names[run] += wave_bndpnt_tasks task_names[run] += wave_post_tasks diff --git a/workflow/applications/gfs_forecast_only.py b/workflow/applications/gfs_forecast_only.py index 11f00a614a..665cbf7805 100644 --- a/workflow/applications/gfs_forecast_only.py +++ b/workflow/applications/gfs_forecast_only.py @@ -99,11 +99,8 @@ def get_task_names(self): tasks = ['stage_ic'] options = self.run_options[self.run] - if options['do_aero']: - aero_fcst_run = options['aero_fcst_run'] - if self.run in aero_fcst_run or aero_fcst_run == "both": - if not options['exp_warm_start']: - tasks += ['aerosol_init'] + if options['do_aero_fcst'] and not options['exp_warm_start']: + tasks += ['aerosol_init'] if options['do_wave']: tasks += ['waveinit'] diff --git a/workflow/rocoto/gfs_tasks.py b/workflow/rocoto/gfs_tasks.py index ca2a73af82..e41dc9404a 100644 --- a/workflow/rocoto/gfs_tasks.py +++ b/workflow/rocoto/gfs_tasks.py @@ -867,14 +867,12 @@ def _fcst_forecast_only(self): dep_dict = {'type': 'task', 'name': f'{self.run}stage_ic'} dependencies.append(rocoto.add_dependency(dep_dict)) - if self.options['do_wave'] and self.run in self.options['wave_runs']: + if self.options['do_wave']: wave_job = 'waveprep' if self.options['app'] in ['ATMW'] else 'waveinit' dep_dict = {'type': 'task', 'name': f'{self.run}{wave_job}'} dependencies.append(rocoto.add_dependency(dep_dict)) - if self.options['do_aero'] and \ - self.run in self.options['aero_fcst_runs'] and \ - not self._base['EXP_WARM_START']: + if self.options['do_aero_fcst'] and not self._base['EXP_WARM_START']: # Calculate offset based on RUN = gfs | gdas interval = None if self.run in ['gfs']: @@ -935,7 +933,7 @@ def _fcst_cycled(self): dep_dict = {'type': 'task', 'name': f'{self.run}marineanlfinal'} dependencies.append(rocoto.add_dependency(dep_dict)) - if self.options['do_aero'] and self.run in self.options['aero_anl_runs']: + if self.options['do_aero_anl']: dep_dict = {'type': 'task', 'name': f'{self.run}aeroanlfinal'} dependencies.append(rocoto.add_dependency(dep_dict)) @@ -950,7 +948,7 @@ def _fcst_cycled(self): dependencies.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep_condition='or', dep=dependencies) - if self.options['do_wave'] and self.run in self.options['wave_runs']: + if self.options['do_wave']: dep_dict = {'type': 'task', 'name': f'{self.run}waveprep'} dependencies.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep_condition='and', dep=dependencies)