Skip to content

Commit

Permalink
Update snow obs processing job (#3055)
Browse files Browse the repository at this point in the history
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 <[email protected]>
Co-authored-by: David Huber <[email protected]>
  • Loading branch information
jiaruidong2017 authored Nov 9, 2024
1 parent 152bb45 commit 1eb62f3
Show file tree
Hide file tree
Showing 17 changed files with 33 additions and 180 deletions.
6 changes: 2 additions & 4 deletions env/HERA.env
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down Expand Up @@ -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}"

Expand Down
6 changes: 2 additions & 4 deletions env/HERCULES.env
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down Expand Up @@ -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}"

Expand Down
6 changes: 2 additions & 4 deletions env/JET.env
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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}"

Expand Down
6 changes: 2 additions & 4 deletions env/ORION.env
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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}"

Expand Down
6 changes: 2 additions & 4 deletions env/S4.env
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down Expand Up @@ -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}"

Expand Down
6 changes: 2 additions & 4 deletions env/WCOSS2.env
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down Expand Up @@ -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}"

Expand Down
50 changes: 0 additions & 50 deletions jobs/JGLOBAL_PREP_SNOW_OBS

This file was deleted.

26 changes: 0 additions & 26 deletions jobs/rocoto/prepsnowobs.sh

This file was deleted.

8 changes: 8 additions & 0 deletions jobs/rocoto/snowanl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
18 changes: 0 additions & 18 deletions parm/config/gfs/config.prepsnowobs

This file was deleted.

9 changes: 1 addition & 8 deletions parm/config/gfs/config.resources
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions parm/config/gfs/config.snowanl
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
24 changes: 0 additions & 24 deletions scripts/exglobal_prep_snow_obs.py

This file was deleted.

2 changes: 2 additions & 0 deletions scripts/exglobal_snow_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
4 changes: 2 additions & 2 deletions workflow/applications/gfs_cycled.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']

Expand Down Expand Up @@ -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']
Expand Down
28 changes: 1 addition & 27 deletions workflow/rocoto/gfs_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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'])}"}
Expand Down
2 changes: 1 addition & 1 deletion workflow/rocoto/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 1eb62f3

Please sign in to comment.