Skip to content

Commit 380946c

Browse files
Add esnowanl to enkfgfs cycle (#3283)
This PR adds the capability for this task to run for the enkfgfs cycle, incorporating the rotating background directory structure used by other enkfgfs tasks. Resolves #3276 --------- Co-authored-by: Rahul Mahajan <aerorahul@users.noreply.github.com>
1 parent a783f9b commit 380946c

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

jobs/JGLOBAL_SNOWENS_ANALYSIS

+7
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ export GDUMP
1313
CDUMP=${RUN/enkf}
1414
export CDUMP
1515

16+
export NMEM_ENS_MAX=${NMEM_ENS}
17+
if [[ "${RUN}" == "enkfgfs" ]]; then
18+
NMEM_ENS=${NMEM_ENS_GFS}
19+
export mem_offset=$((NMEM_ENS_GFS_OFFSET * cyc/6))
20+
else
21+
export mem_offset=0
22+
fi
1623
##############################################
1724
# Begin JOB SPECIFIC work
1825
##############################################

parm/gdas/snow_stage_ens_update.yaml.j2

+6-2
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,17 @@ copy:
2222
# copy ensemble background files
2323
######################################
2424
{% for mem in range(1, NMEM_ENS + 1) %}
25+
{% set gmem = mem+mem_offset %}
26+
{% if gmem > NMEM_ENS_MAX %}
27+
{% set gmem = gmem-NMEM_ENS_MAX %}
28+
{% endif %}
2529
# define variables
2630
# Declare a dict of search and replace terms to run on each template
2731
{% set tmpl_dict = {'${ROTDIR}':ROTDIR,
28-
'${RUN}':RUN,
32+
'${RUN}':"enkfgdas",
2933
'${YMD}':previous_cycle | to_YMD,
3034
'${HH}':previous_cycle | strftime("%H"),
31-
'${MEMDIR}':"mem" + '%03d' % mem} %}
35+
'${MEMDIR}':"mem" + '%03d' % gmem} %}
3236

3337
# copy coupler file
3438
- ["{{ COM_ATMOS_RESTART_TMPL | replace_tmpl(tmpl_dict) }}/{{ current_cycle | to_fv3time }}.coupler.res", "{{ DATA }}/bkg/mem{{ '%03d' % mem }}/{{ current_cycle | to_fv3time }}.coupler.res"]

workflow/applications/gfs_cycled.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -313,8 +313,8 @@ def get_task_names(self):
313313
task_names[run] += ['eobs', 'eupd']
314314
task_names[run].append('echgres') if 'gdas' in run else 0
315315
task_names[run] += ['ediag'] if options['lobsdiag_forenkf'] else ['eomg']
316-
task_names[run].append('esnowanl') if options['do_jedisnowda'] and 'gdas' in run else 0
317316

317+
task_names[run].append('esnowanl') if options['do_jedisnowda'] else 0
318318
task_names[run].append('efcs') if 'gdas' in run else 0
319319
task_names[run].append('epos') if 'gdas' in run else 0
320320
task_names[run] += ['stage_ic', 'ecen', 'esfc', 'earc', 'cleanup']

workflow/rocoto/gfs_tasks.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ def snowanl(self):
619619
def esnowanl(self):
620620

621621
deps = []
622-
dep_dict = {'type': 'metatask', 'name': f'{self.run}_epmn', 'offset': f"-{timedelta_to_HMS(self._base['interval_gdas'])}"}
622+
dep_dict = {'type': 'metatask', 'name': 'enkfgdas_epmn', 'offset': f"-{timedelta_to_HMS(self._base['interval_gdas'])}"}
623623
deps.append(rocoto.add_dependency(dep_dict))
624624
dep_dict = {'type': 'task', 'name': f"{self.run.replace('enkf', '')}_prep"}
625625
deps.append(rocoto.add_dependency(dep_dict))

0 commit comments

Comments
 (0)