From 1eb62f3f5a46950438ea1781605c585b13d28ca9 Mon Sep 17 00:00:00 2001 From: Jiarui Dong Date: Fri, 8 Nov 2024 21:36:26 -0500 Subject: [PATCH 1/2] Update snow obs processing job (#3055) This PR removes the `prepsnowobs` job, and add the IMS snow obs processing to the snow analysis job and it will only process the snow cover obs if the cycle is 00z. Resolves #2902 --------- Co-authored-by: Cory Martin Co-authored-by: David Huber <69919478+DavidHuber-NOAA@users.noreply.github.com> --- env/HERA.env | 6 ++-- env/HERCULES.env | 6 ++-- env/JET.env | 6 ++-- env/ORION.env | 6 ++-- env/S4.env | 6 ++-- env/WCOSS2.env | 6 ++-- jobs/JGLOBAL_PREP_SNOW_OBS | 50 ----------------------------- jobs/rocoto/prepsnowobs.sh | 26 --------------- jobs/rocoto/snowanl.sh | 8 +++++ parm/config/gfs/config.prepsnowobs | 18 ----------- parm/config/gfs/config.resources | 9 +----- parm/config/gfs/config.snowanl | 6 ++++ scripts/exglobal_prep_snow_obs.py | 24 -------------- scripts/exglobal_snow_analysis.py | 2 ++ workflow/applications/gfs_cycled.py | 4 +-- workflow/rocoto/gfs_tasks.py | 28 +--------------- workflow/rocoto/tasks.py | 2 +- 17 files changed, 33 insertions(+), 180 deletions(-) delete mode 100755 jobs/JGLOBAL_PREP_SNOW_OBS delete mode 100755 jobs/rocoto/prepsnowobs.sh delete mode 100644 parm/config/gfs/config.prepsnowobs delete mode 100755 scripts/exglobal_prep_snow_obs.py diff --git a/env/HERA.env b/env/HERA.env index 259461b1ac..f10bfcc537 100755 --- a/env/HERA.env +++ b/env/HERA.env @@ -52,10 +52,6 @@ if [[ "${step}" = "prep" ]] || [[ "${step}" = "prepbufr" ]]; then export sys_tp="HERA" export launcher_PREP="srun --hint=nomultithread" -elif [[ "${step}" = "prepsnowobs" ]]; then - - export APRUN_CALCFIMS="${APRUN_default}" - elif [[ "${step}" = "prep_emissions" ]]; then export APRUN="${APRUN_default}" @@ -116,6 +112,8 @@ elif [[ "${step}" = "prepobsaero" ]]; then elif [[ "${step}" = "snowanl" ]]; then + export APRUN_CALCFIMS="${launcher} -n 1" + export NTHREADS_SNOWANL=${NTHREADSmax} export APRUN_SNOWANL="${APRUN_default} --cpus-per-task=${NTHREADS_SNOWANL}" diff --git a/env/HERCULES.env b/env/HERCULES.env index bed1d11281..15e3928f08 100755 --- a/env/HERCULES.env +++ b/env/HERCULES.env @@ -50,10 +50,6 @@ case ${step} in export sys_tp="HERCULES" export launcher_PREP="srun --hint=nomultithread" ;; - "prepsnowobs") - - export APRUN_CALCFIMS="${APRUN_default}" - ;; "prep_emissions") export APRUN="${APRUN_default}" @@ -115,6 +111,8 @@ case ${step} in ;; "snowanl") + export APRUN_CALCFIMS="${launcher} -n 1" + export NTHREADS_SNOWANL=${NTHREADSmax} export APRUN_SNOWANL="${APRUN_default} --cpus-per-task=${NTHREADS_SNOWANL}" diff --git a/env/JET.env b/env/JET.env index dbc249d4d6..6465b69acd 100755 --- a/env/JET.env +++ b/env/JET.env @@ -40,10 +40,6 @@ if [[ "${step}" = "prep" ]] || [[ "${step}" = "prepbufr" ]]; then export sys_tp="JET" export launcher_PREP="srun" -elif [[ "${step}" = "prepsnowobs" ]]; then - - export APRUN_CALCFIMS="${launcher} -n 1" - elif [[ "${step}" = "prep_emissions" ]]; then export APRUN="${launcher} -n 1" @@ -99,6 +95,8 @@ elif [[ "${step}" = "prepobsaero" ]]; then elif [[ "${step}" = "snowanl" ]]; then + export APRUN_CALCFIMS="${launcher} -n 1" + export NTHREADS_SNOWANL=${NTHREADSmax} export APRUN_SNOWANL="${APRUN_default}" diff --git a/env/ORION.env b/env/ORION.env index 06ae2c1a63..1dc49e9362 100755 --- a/env/ORION.env +++ b/env/ORION.env @@ -47,10 +47,6 @@ if [[ "${step}" = "prep" ]] || [[ "${step}" = "prepbufr" ]]; then export sys_tp="ORION" export launcher_PREP="srun --hint=nomultithread" -elif [[ "${step}" = "prepsnowobs" ]]; then - - export APRUN_CALCFIMS="${launcher} -n 1" - elif [[ "${step}" = "prep_emissions" ]]; then export APRUN="${launcher} -n 1" @@ -106,6 +102,8 @@ elif [[ "${step}" = "prepobsaero" ]]; then elif [[ "${step}" = "snowanl" ]]; then + export APRUN_CALCFIMS="${launcher} -n 1" + export NTHREADS_SNOWANL=${NTHREADSmax} export APRUN_SNOWANL="${APRUN_default} --cpus-per-task=${NTHREADS_SNOWANL}" diff --git a/env/S4.env b/env/S4.env index 5d5ffd23b1..9a5baf29ed 100755 --- a/env/S4.env +++ b/env/S4.env @@ -40,10 +40,6 @@ if [[ "${step}" = "prep" ]] || [[ "${step}" = "prepbufr" ]]; then export sys_tp="S4" export launcher_PREP="srun" -elif [[ "${step}" = "prepsnowobs" ]]; then - - export APRUN_CALCFIMS="${APRUN_default}" - elif [[ "${step}" = "prep_emissions" ]]; then export APRUN="${APRUN_default}" @@ -99,6 +95,8 @@ elif [[ "${step}" = "prepobsaero" ]]; then elif [[ "${step}" = "snowanl" ]]; then + export APRUN_CALCFIMS="${launcher} -n 1" + export NTHREADS_SNOWANL=${NTHREADSmax} export APRUN_SNOWANL="${APRUN_default}" diff --git a/env/WCOSS2.env b/env/WCOSS2.env index c67c16f929..fff8f7b096 100755 --- a/env/WCOSS2.env +++ b/env/WCOSS2.env @@ -34,10 +34,6 @@ if [[ "${step}" = "prep" ]] || [[ "${step}" = "prepbufr" ]]; then export sys_tp="wcoss2" export launcher_PREP="mpiexec" -elif [[ "${step}" = "prepsnowobs" ]]; then - - export APRUN_CALCFIMS="${APRUN_default}" - elif [[ "${step}" = "prep_emissions" ]]; then export APRUN="${APRUN_default}" @@ -92,6 +88,8 @@ elif [[ "${step}" = "prepobsaero" ]]; then elif [[ "${step}" = "snowanl" ]]; then + export APRUN_CALCFIMS="${launcher} -n 1" + export NTHREADS_SNOWANL=${NTHREADSmax} export APRUN_SNOWANL="${APRUN_default}" diff --git a/jobs/JGLOBAL_PREP_SNOW_OBS b/jobs/JGLOBAL_PREP_SNOW_OBS deleted file mode 100755 index 0e3557697d..0000000000 --- a/jobs/JGLOBAL_PREP_SNOW_OBS +++ /dev/null @@ -1,50 +0,0 @@ -#! /usr/bin/env bash - -source "${HOMEgfs}/ush/preamble.sh" -export DATA=${DATA:-${DATAROOT}/${RUN}snowanl_${cyc}} -source "${HOMEgfs}/ush/jjob_header.sh" -e "prepsnowobs" -c "base prepsnowobs" - -############################################## -# Set variables used in the script -############################################## -# Ignore possible spelling error (nothing is misspelled) -# shellcheck disable=SC2153 -GDATE=$(date --utc +%Y%m%d%H -d "${PDY} ${cyc} - ${assim_freq} hours") -gPDY=${GDATE:0:8} -gcyc=${GDATE:8:2} -GDUMP="gdas" - -############################################## -# Begin JOB SPECIFIC work -############################################## -# Generate COM variables from templates -YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COM_OBS - -RUN=${GDUMP} YMD=${gPDY} HH=${gcyc} declare_from_tmpl -rx \ - COM_ATMOS_RESTART_PREV:COM_ATMOS_RESTART_TMPL - -############################################################### -# Run relevant script -EXSCRIPT=${GDASSNOWPREPPY:-${SCRgfs}/exglobal_prep_snow_obs.py} -${EXSCRIPT} -status=$? -[[ ${status} -ne 0 ]] && (echo "FATAL ERROR: Error executing ${EXSCRIPT}, ABORT!"; exit "${status}") - -############################################## -# End JOB SPECIFIC work -############################################## - -############################################## -# Final processing -############################################## -if [[ -e "${pgmout}" ]] ; then - cat "${pgmout}" -fi - -########################################## -# Remove the Temporary working directory -########################################## -cd "${DATAROOT}" || exit 1 -[[ ${KEEPDATA} = "NO" ]] && rm -rf "${DATA}" - -exit 0 diff --git a/jobs/rocoto/prepsnowobs.sh b/jobs/rocoto/prepsnowobs.sh deleted file mode 100755 index 3f23bc16a5..0000000000 --- a/jobs/rocoto/prepsnowobs.sh +++ /dev/null @@ -1,26 +0,0 @@ -#! /usr/bin/env bash - -source "${HOMEgfs}/ush/preamble.sh" - -############################################################### -# Source UFSDA workflow modules -. "${HOMEgfs}/ush/load_ufsda_modules.sh" -status=$? -[[ ${status} -ne 0 ]] && exit "${status}" - -export job="prepsnowobs" -export jobid="${job}.$$" - -############################################################### -# setup python path for ioda utilities -# shellcheck disable=SC2311 -pyiodaPATH="${HOMEgfs}/sorc/gdas.cd/build/lib/python$(detect_py_ver)/" -gdasappPATH="${HOMEgfs}/sorc/gdas.cd/sorc/iodaconv/src:${pyiodaPATH}" -PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}:${gdasappPATH}" -export PYTHONPATH - -############################################################### -# Execute the JJOB -"${HOMEgfs}/jobs/JGLOBAL_PREP_SNOW_OBS" -status=$? -exit "${status}" diff --git a/jobs/rocoto/snowanl.sh b/jobs/rocoto/snowanl.sh index 97df7a46c7..cf1ddd688b 100755 --- a/jobs/rocoto/snowanl.sh +++ b/jobs/rocoto/snowanl.sh @@ -11,6 +11,14 @@ status=$? export job="snowanl" export jobid="${job}.$$" +############################################################### +# setup python path for ioda utilities +# shellcheck disable=SC2311 +pyiodaPATH="${HOMEgfs}/sorc/gdas.cd/build/lib/python$(detect_py_ver)/" +gdasappPATH="${HOMEgfs}/sorc/gdas.cd/sorc/iodaconv/src:${pyiodaPATH}" +PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}:${gdasappPATH}" +export PYTHONPATH + ############################################################### # Execute the JJOB "${HOMEgfs}/jobs/JGLOBAL_SNOW_ANALYSIS" diff --git a/parm/config/gfs/config.prepsnowobs b/parm/config/gfs/config.prepsnowobs deleted file mode 100644 index 20bdd89ddf..0000000000 --- a/parm/config/gfs/config.prepsnowobs +++ /dev/null @@ -1,18 +0,0 @@ -#! /usr/bin/env bash - -########## config.prepsnowobs ########## -# Snow Obs Prep specific - -echo "BEGIN: config.prepsnowobs" - -# Get task specific resources -. "${EXPDIR}/config.resources" prepsnowobs - -export IMS_OBS_LIST="${PARMgfs}/gdas/snow/prep/prep_ims.yaml.j2" - -export CALCFIMSEXE="${EXECgfs}/calcfIMS.exe" -export FIMS_NML_TMPL="${PARMgfs}/gdas/snow/prep/fims.nml.j2" - -export IMS2IODACONV="${USHgfs}/imsfv3_scf2ioda.py" - -echo "END: config.prepsnowobs" diff --git a/parm/config/gfs/config.resources b/parm/config/gfs/config.resources index 14e6f0d7fb..cddd1643fd 100644 --- a/parm/config/gfs/config.resources +++ b/parm/config/gfs/config.resources @@ -12,7 +12,7 @@ if (( $# != 1 )); then echo "Must specify an input task argument to set resource variables!" echo "argument can be any one of the following:" echo "stage_ic aerosol_init" - echo "prep prepsnowobs prepatmiodaobs" + echo "prep prepatmiodaobs" echo "atmanlinit atmanlvar atmanlfv3inc atmanlfinal" echo "atmensanlinit atmensanlobs atmensanlsol atmensanlletkf atmensanlfv3inc atmensanlfinal" echo "snowanl esnowrecen" @@ -152,13 +152,6 @@ case ${step} in memory="${mem_node_max}" ;; - "prepsnowobs") - walltime="00:05:00" - ntasks=1 - threads_per_task=1 - tasks_per_node=1 - ;; - "prepatmiodaobs") walltime="00:30:00" ntasks=1 diff --git a/parm/config/gfs/config.snowanl b/parm/config/gfs/config.snowanl index b1460dfa67..1aeaf58e46 100644 --- a/parm/config/gfs/config.snowanl +++ b/parm/config/gfs/config.snowanl @@ -19,6 +19,12 @@ export JEDIYAML="${PARMgfs}/gdas/snow/letkfoi/letkfoi.yaml.j2" export SNOWDEPTHVAR="snodl" export BESTDDEV="30." # Background Error Std. Dev. for LETKFOI +# Process IMS snowcover into snow depth +export IMS_OBS_LIST="${PARMgfs}/gdas/snow/prep/prep_ims.yaml.j2" +export CALCFIMSEXE="${EXECgfs}/calcfIMS.exe" +export FIMS_NML_TMPL="${PARMgfs}/gdas/snow/prep/fims.nml.j2" +export IMS2IODACONV="${USHgfs}/imsfv3_scf2ioda.py" + # Name of the executable that applies increment to bkg and its namelist template export APPLY_INCR_EXE="${EXECgfs}/apply_incr.exe" export APPLY_INCR_NML_TMPL="${PARMgfs}/gdas/snow/letkfoi/apply_incr_nml.j2" diff --git a/scripts/exglobal_prep_snow_obs.py b/scripts/exglobal_prep_snow_obs.py deleted file mode 100755 index aa1eb1bb7d..0000000000 --- a/scripts/exglobal_prep_snow_obs.py +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env python3 -# exglobal_prep_snow_obs.py -# This script creates a SnowAnalysis object -# and runs the prepare_GTS and prepare_IMS method -# which perform the pre-processing for GTS and IMS data -import os - -from wxflow import Logger, cast_strdict_as_dtypedict -from pygfs.task.snow_analysis import SnowAnalysis - - -# Initialize root logger -logger = Logger(level=os.environ.get("LOGGING_LEVEL", "DEBUG"), colored_log=True) - - -if __name__ == '__main__': - - # Take configuration from environment and cast it as python dictionary - config = cast_strdict_as_dtypedict(os.environ) - - # Instantiate the snow prepare task - SnowAnl = SnowAnalysis(config) - if SnowAnl.task_config.cyc == 0: - SnowAnl.prepare_IMS() diff --git a/scripts/exglobal_snow_analysis.py b/scripts/exglobal_snow_analysis.py index fe050f5af5..dd52b699dc 100755 --- a/scripts/exglobal_snow_analysis.py +++ b/scripts/exglobal_snow_analysis.py @@ -19,6 +19,8 @@ # Instantiate the snow analysis task anl = SnowAnalysis(config) + if anl.task_config.cyc == 0: + anl.prepare_IMS() anl.initialize() anl.execute() anl.finalize() diff --git a/workflow/applications/gfs_cycled.py b/workflow/applications/gfs_cycled.py index f92bf95fba..e85e8b159f 100644 --- a/workflow/applications/gfs_cycled.py +++ b/workflow/applications/gfs_cycled.py @@ -113,7 +113,7 @@ def _get_app_configs(self): configs += ['prepobsaero'] if self.do_jedisnowda: - configs += ['prepsnowobs', 'snowanl'] + configs += ['snowanl'] if self.do_hybvar: configs += ['esnowrecen'] @@ -156,7 +156,7 @@ def get_task_names(self): gdas_gfs_common_tasks_before_fcst += ['sfcanl', 'analcalc'] if self.do_jedisnowda: - gdas_gfs_common_tasks_before_fcst += ['prepsnowobs', 'snowanl'] + gdas_gfs_common_tasks_before_fcst += ['snowanl'] wave_prep_tasks = ['waveinit', 'waveprep'] wave_bndpnt_tasks = ['wavepostbndpnt', 'wavepostbndpntbll'] diff --git a/workflow/rocoto/gfs_tasks.py b/workflow/rocoto/gfs_tasks.py index d3bb68a6b8..461241450e 100644 --- a/workflow/rocoto/gfs_tasks.py +++ b/workflow/rocoto/gfs_tasks.py @@ -563,34 +563,10 @@ def aeroanlfinal(self): return task - def prepsnowobs(self): - - deps = [] - dep_dict = {'type': 'task', 'name': f'{self.run}_prep'} - deps.append(rocoto.add_dependency(dep_dict)) - dependencies = rocoto.create_dependency(dep=deps) - - resources = self.get_resource('prepsnowobs') - task_name = f'{self.run}_prepsnowobs' - task_dict = {'task_name': task_name, - 'resources': resources, - 'dependency': dependencies, - 'envars': self.envars, - 'cycledef': self.run.replace('enkf', ''), - 'command': f'{self.HOMEgfs}/jobs/rocoto/prepsnowobs.sh', - 'job_name': f'{self.pslot}_{task_name}_@H', - 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', - 'maxtries': '&MAXTRIES;' - } - - task = rocoto.create_task(task_dict) - - return task - def snowanl(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.run}_prepsnowobs'} + dep_dict = {'type': 'task', 'name': f'{self.run}_prep'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) @@ -613,8 +589,6 @@ def snowanl(self): def esnowrecen(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.run.replace("enkf","")}_prepsnowobs'} - deps.append(rocoto.add_dependency(dep_dict)) dep_dict = {'type': 'task', 'name': f'{self.run.replace("enkf","")}_snowanl'} deps.append(rocoto.add_dependency(dep_dict)) dep_dict = {'type': 'metatask', 'name': f'{self.run}_epmn', 'offset': f"-{timedelta_to_HMS(self._base['interval_gdas'])}"} diff --git a/workflow/rocoto/tasks.py b/workflow/rocoto/tasks.py index b989def13f..df56f90718 100644 --- a/workflow/rocoto/tasks.py +++ b/workflow/rocoto/tasks.py @@ -20,7 +20,7 @@ class Tasks: 'eobs', 'eomg', 'epos', 'esfc', 'eupd', 'atmensanlinit', 'atmensanlobs', 'atmensanlsol', 'atmensanlletkf', 'atmensanlfv3inc', 'atmensanlfinal', 'aeroanlinit', 'aeroanlvar', 'aeroanlfinal', 'aeroanlgenb', - 'prepsnowobs', 'snowanl', 'esnowrecen', + 'snowanl', 'esnowrecen', 'fcst', 'atmanlupp', 'atmanlprod', 'atmupp', 'goesupp', 'atmos_prod', 'ocean_prod', 'ice_prod', From 3f683979770bd89b3325e3a7ca77104e6e0477bb Mon Sep 17 00:00:00 2001 From: mingshichen-noaa <48537176+mingshichen-noaa@users.noreply.github.com> Date: Fri, 8 Nov 2024 21:36:59 -0500 Subject: [PATCH 2/2] Update JGDAS ENKF ECEN job (#3050) NCO has requested that each COM variable specify whether it is an input or an output. This completes that process for the global jgdas enkf ecen job. Refs #2451 --- jobs/JGDAS_ENKF_ECEN | 6 ++--- scripts/exgdas_enkf_ecen.sh | 44 ++++++++++++++++++------------------- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/jobs/JGDAS_ENKF_ECEN b/jobs/JGDAS_ENKF_ECEN index 38bf847b38..71efd6ede9 100755 --- a/jobs/JGDAS_ENKF_ECEN +++ b/jobs/JGDAS_ENKF_ECEN @@ -29,13 +29,13 @@ export GPREFIX="${GDUMP}.t${gcyc}z." export GPREFIX_ENS="${GDUMP_ENS}.t${gcyc}z." RUN=${RUN/enkf} YMD=${PDY} HH=${cyc} declare_from_tmpl -rx \ - COM_ATMOS_ANALYSIS_DET:COM_ATMOS_ANALYSIS_TMPL + COMIN_ATMOS_ANALYSIS_DET:COM_ATMOS_ANALYSIS_TMPL MEMDIR="ensstat" YMD=${PDY} HH=${cyc} declare_from_tmpl -rx \ - COM_ATMOS_ANALYSIS_STAT:COM_ATMOS_ANALYSIS_TMPL + COMOUT_ATMOS_ANALYSIS_STAT:COM_ATMOS_ANALYSIS_TMPL MEMDIR="ensstat" RUN=${GDUMP} YMD=${gPDY} HH=${gcyc} declare_from_tmpl -rx \ - COM_ATMOS_HISTORY_STAT_PREV:COM_ATMOS_HISTORY_TMPL + COMIN_ATMOS_HISTORY_STAT_PREV:COM_ATMOS_HISTORY_TMPL ############################################################### diff --git a/scripts/exgdas_enkf_ecen.sh b/scripts/exgdas_enkf_ecen.sh index 442b0b04a1..f84df82875 100755 --- a/scripts/exgdas_enkf_ecen.sh +++ b/scripts/exgdas_enkf_ecen.sh @@ -117,37 +117,37 @@ for imem in $(seq 1 $NMEM_ENS); do memchar="mem"$(printf %03i $imem) MEMDIR=${memchar} YMD=${PDY} HH=${cyc} declare_from_tmpl -x \ - COM_ATMOS_ANALYSIS_MEM:COM_ATMOS_ANALYSIS_TMPL + COMOUT_ATMOS_ANALYSIS_MEM:COM_ATMOS_ANALYSIS_TMPL MEMDIR=${gmemchar} RUN=${GDUMP_ENS} YMD=${gPDY} HH=${gcyc} declare_from_tmpl -x \ - COM_ATMOS_HISTORY_MEM_PREV:COM_ATMOS_HISTORY_TMPL + COMIN_ATMOS_HISTORY_MEM_PREV:COM_ATMOS_HISTORY_TMPL - ${NLN} "${COM_ATMOS_HISTORY_MEM_PREV}/${GPREFIX_ENS}atmf00${FHR}${ENKF_SUFFIX}.nc" "./atmges_${memchar}" + ${NLN} "${COMIN_ATMOS_HISTORY_MEM_PREV}/${GPREFIX_ENS}atmf00${FHR}${ENKF_SUFFIX}.nc" "./atmges_${memchar}" if [ $DO_CALC_INCREMENT = "YES" ]; then if [ $FHR -eq 6 ]; then - ${NLN} "${COM_ATMOS_ANALYSIS_MEM}/${APREFIX_ENS}atmanl.nc" "./atmanl_${memchar}" + ${NLN} "${COMOUT_ATMOS_ANALYSIS_MEM}/${APREFIX_ENS}atmanl.nc" "./atmanl_${memchar}" else - ${NLN} "${COM_ATMOS_ANALYSIS_MEM}/${APREFIX_ENS}atma00${FHR}.nc" "./atmanl_${memchar}" + ${NLN} "${COMOUT_ATMOS_ANALYSIS_MEM}/${APREFIX_ENS}atma00${FHR}.nc" "./atmanl_${memchar}" fi fi - mkdir -p "${COM_ATMOS_ANALYSIS_MEM}" + mkdir -p "${COMOUT_ATMOS_ANALYSIS_MEM}" if [ $FHR -eq 6 ]; then - ${NLN} "${COM_ATMOS_ANALYSIS_MEM}/${APREFIX_ENS}atminc.nc" "./atminc_${memchar}" + ${NLN} "${COMOUT_ATMOS_ANALYSIS_MEM}/${APREFIX_ENS}atminc.nc" "./atminc_${memchar}" else - ${NLN} "${COM_ATMOS_ANALYSIS_MEM}/${APREFIX_ENS}atmi00${FHR}.nc" "./atminc_${memchar}" + ${NLN} "${COMOUT_ATMOS_ANALYSIS_MEM}/${APREFIX_ENS}atmi00${FHR}.nc" "./atminc_${memchar}" fi if [[ $RECENTER_ENKF = "YES" ]]; then if [ $DO_CALC_INCREMENT = "YES" ]; then if [ $FHR -eq 6 ]; then - ${NLN} "${COM_ATMOS_ANALYSIS_MEM}/${APREFIX_ENS}ratmanl.nc" "./ratmanl_${memchar}" + ${NLN} "${COMOUT_ATMOS_ANALYSIS_MEM}/${APREFIX_ENS}ratmanl.nc" "./ratmanl_${memchar}" else - ${NLN} "${COM_ATMOS_ANALYSIS_MEM}/${APREFIX_ENS}ratma00${FHR}.nc" "./ratmanl_${memchar}" + ${NLN} "${COMOUT_ATMOS_ANALYSIS_MEM}/${APREFIX_ENS}ratma00${FHR}.nc" "./ratmanl_${memchar}" fi else if [ $FHR -eq 6 ]; then - ${NLN} "${COM_ATMOS_ANALYSIS_MEM}/${APREFIX_ENS}ratminc.nc" "./ratminc_${memchar}" + ${NLN} "${COMOUT_ATMOS_ANALYSIS_MEM}/${APREFIX_ENS}ratminc.nc" "./ratminc_${memchar}" else - ${NLN} "${COM_ATMOS_ANALYSIS_MEM}/${APREFIX_ENS}ratmi00${FHR}.nc" "./ratminc_${memchar}" + ${NLN} "${COMOUT_ATMOS_ANALYSIS_MEM}/${APREFIX_ENS}ratmi00${FHR}.nc" "./ratminc_${memchar}" fi fi fi @@ -156,9 +156,9 @@ done if [ $DO_CALC_INCREMENT = "YES" ]; then # Link ensemble mean analysis if [ $FHR -eq 6 ]; then - ${NLN} "${COM_ATMOS_ANALYSIS_STAT}/${APREFIX_ENS}atmanl.ensmean.nc" "./atmanl_ensmean" + ${NLN} "${COMOUT_ATMOS_ANALYSIS_STAT}/${APREFIX_ENS}atmanl.ensmean.nc" "./atmanl_ensmean" else - ${NLN} "${COM_ATMOS_ANALYSIS_STAT}/${APREFIX_ENS}atma00${FHR}.ensmean.nc" "./atmanl_ensmean" + ${NLN} "${COMOUT_ATMOS_ANALYSIS_STAT}/${APREFIX_ENS}atma00${FHR}.ensmean.nc" "./atmanl_ensmean" fi # Compute ensemble mean analysis @@ -176,9 +176,9 @@ if [ $DO_CALC_INCREMENT = "YES" ]; then else # Link ensemble mean increment if [ $FHR -eq 6 ]; then - ${NLN} "${COM_ATMOS_ANALYSIS_STAT}/${APREFIX_ENS}atminc.ensmean.nc" "./atminc_ensmean" + ${NLN} "${COMOUT_ATMOS_ANALYSIS_STAT}/${APREFIX_ENS}atminc.ensmean.nc" "./atminc_ensmean" else - ${NLN} "${COM_ATMOS_ANALYSIS_STAT}/${APREFIX_ENS}atmi00${FHR}.ensmean.nc" "./atminc_ensmean" + ${NLN} "${COMOUT_ATMOS_ANALYSIS_STAT}/${APREFIX_ENS}atmi00${FHR}.ensmean.nc" "./atminc_ensmean" fi # Compute ensemble mean increment @@ -195,8 +195,8 @@ else export err=$?; err_chk # If available, link to ensemble mean guess. Otherwise, compute ensemble mean guess - if [[ -s "${COM_ATMOS_HISTORY_STAT_PREV}/${GPREFIX_ENS}atmf00${FHR}.ensmean.nc" ]]; then - ${NLN} "${COM_ATMOS_HISTORY_STAT_PREV}/${GPREFIX_ENS}atmf00${FHR}.ensmean.nc" "./atmges_ensmean" + if [[ -s "${COMIN_ATMOS_HISTORY_STAT_PREV}/${GPREFIX_ENS}atmf00${FHR}.ensmean.nc" ]]; then + ${NLN} "${COMIN_ATMOS_HISTORY_STAT_PREV}/${GPREFIX_ENS}atmf00${FHR}.ensmean.nc" "./atmges_ensmean" else DATAPATH="./" ATMGESNAME="atmges" @@ -231,11 +231,11 @@ if [ $RECENTER_ENKF = "YES" ]; then # GSI EnVar analysis if [ $FHR -eq 6 ]; then - ATMANL_GSI="${COM_ATMOS_ANALYSIS_DET}/${APREFIX}atmanl.nc" - ATMANL_GSI_ENSRES="${COM_ATMOS_ANALYSIS_DET}/${APREFIX}atmanl.ensres.nc" + ATMANL_GSI="${COMIN_ATMOS_ANALYSIS_DET}/${APREFIX}atmanl.nc" + ATMANL_GSI_ENSRES="${COMIN_ATMOS_ANALYSIS_DET}/${APREFIX}atmanl.ensres.nc" else - ATMANL_GSI="${COM_ATMOS_ANALYSIS_DET}/${APREFIX}atma00${FHR}.nc" - ATMANL_GSI_ENSRES="${COM_ATMOS_ANALYSIS_DET}/${APREFIX}atma00${FHR}.ensres.nc" + ATMANL_GSI="${COMIN_ATMOS_ANALYSIS_DET}/${APREFIX}atma00${FHR}.nc" + ATMANL_GSI_ENSRES="${COMIN_ATMOS_ANALYSIS_DET}/${APREFIX}atma00${FHR}.ensres.nc" fi # if we already have a ensemble resolution GSI analysis then just link to it