Skip to content

Commit ea200a4

Browse files
revert changes to extend stage_ic to gdas for cycled parallels (NOAA-EMC#2294)
1 parent 62afe41 commit ea200a4

File tree

5 files changed

+13
-87
lines changed

5 files changed

+13
-87
lines changed

parm/config/gfs/config.stage_ic

-9
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ echo "BEGIN: config.stage_ic"
77
# Get task specific resources
88
source "${EXPDIR}/config.resources" stage_ic
99

10-
# Stage ICs for coupled system
11-
if [[ "${DO_COUPLED}" = "YES" ]]; then
1210
case "${CASE}" in
1311
"C48" | "C96")
1412
export CPL_ATMIC="workflow_${CASE}_refactored"
@@ -39,12 +37,5 @@ case "${CASE}" in
3937
exit 1
4038
;;
4139
esac
42-
fi # End block for coupled ICs
43-
44-
# Stage ICs for cycled runs
45-
if [[ "${MODE}" == "cycled" ]]; then
46-
export CPL_ATMIC="C48C48"
47-
export CPL_ATMDAIC="C48C48"
48-
fi
4940

5041
echo "END: config.stage_ic"

scripts/exglobal_stage_ic.sh

-55
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ error_message() {
2525
echo "FATAL ERROR: Unable to copy ${1} to ${2} (Error code ${3})"
2626
}
2727

28-
if [[ "${MODE}" == "forecast-only" ]]; then
29-
3028
###############################################################
3129
for MEMDIR in "${MEMDIR_ARRAY[@]}"; do
3230

@@ -154,59 +152,6 @@ for MEMDIR in "${MEMDIR_ARRAY[@]}"; do
154152

155153
done # for MEMDIR in "${MEMDIR_ARRAY[@]}"; do
156154

157-
# Stage files for MODE="cycled"
158-
else
159-
# Stage deterministic ICs from previous cycle
160-
RUN=${rCDUMP} YMD=${gPDY} HH=${gcyc} generate_com COM_TOP:COM_TOP_TMPL
161-
COM_TOP_BASE=$(dirname "${COM_TOP}")
162-
[[ ! -d "${COM_TOP_BASE}" ]] && mkdir -p "${COM_TOP_BASE}"
163-
[[ -d "${COM_TOP_BASE}/${gcyc}" ]] && rm -f "${COM_TOP_BASE:-}/${gcyc:-}"
164-
src="${BASE_CPLIC}/${CPL_ATMIC:-}/${RUN}.${gPDY}/${gcyc}"
165-
tgt="${COM_TOP_BASE}/"
166-
${NLN} "${src}" "${tgt}"
167-
rc=$?
168-
((rc != 0)) && error_message "${src}" "${tgt}" "${rc}"
169-
err=$((err + rc))
170-
171-
# Stage ensemble ICs from previous cycle
172-
if [[ "${DOHYBVAR}" == "YES" ]]; then
173-
RUN=enkf${rCDUMP} YMD=${gPDY} HH=${gcyc} generate_com COM_TOP:COM_TOP_TMPL
174-
COM_TOP_BASE=$(dirname "${COM_TOP}")
175-
[[ ! -d "${COM_TOP_BASE}" ]] && mkdir -p "${COM_TOP_BASE}"
176-
[[ -d "${COM_TOP_BASE}/${gcyc}" ]] && rm -rf "${COM_TOP_BASE:-}/${gcyc:-}"
177-
src="${BASE_CPLIC}/${CPL_ATMIC:-}/enkf${RUN}.${gPDY}/${gcyc}"
178-
tgt="${COM_TOP_BASE}/"
179-
${NLN} "${src}" "${tgt}"
180-
rc=$?
181-
((rc != 0)) && error_message "${src}" "${tgt}" "${rc}"
182-
err=$((err + rc))
183-
fi
184-
185-
# Stage bias correction files
186-
RUN=${rCDUMP} YMD=${PDY} HH=${cyc} generate_com COM_ATMOS_ANALYSIS:COM_ATMOS_ANALYSIS_TMPL
187-
[[ ! -d "${COM_ATMOS_ANALYSIS}" ]] && mkdir -p "${COM_ATMOS_ANALYSIS}"
188-
src="${BASE_CPLIC}/${CPL_ATMIC:-}/${RUN}.${PDY}/${cyc}/analysis/atmos"
189-
tgt="${COM_ATMOS_ANALYSIS}/"
190-
if [[ "${DO_JEDIATMVAR}" == "YES" || "${DO_JEDIATMENS}" == "YES" ]]; then
191-
flist="radbcor"
192-
else
193-
flist="abias abias_air abias_pc radstat"
194-
fi
195-
for ftype in ${flist}; do
196-
file=${rCDUMP}.t${cyc}z.${ftype}
197-
${NCP} "${src}"/"${file}" "${tgt}"
198-
rc=$?
199-
((rc != 0)) && error_message "${src}" "${tgt}" "${rc}"
200-
err=$((err + rc))
201-
done
202-
if [[ "${DO_JEDIATMVAR}" == "YES" || "${DO_JEDIATMENS}" == "YES" ]]; then
203-
cd "${tgt}" || exit
204-
tar -xvf "${rCDUMP}".t"${cyc}"z.radbcor
205-
cd "${DATA}" || exit
206-
fi
207-
208-
fi
209-
210155
###############################################################
211156
# Check for errors and exit if any of the above failed
212157
if [[ "${err}" -ne 0 ]]; then

workflow/applications/gfs_cycled.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def _get_app_configs(self):
3535
Returns the config_files that are involved in the cycled app
3636
"""
3737

38-
configs = ['stage_ic', 'prep']
38+
configs = ['prep']
3939

4040
if self.do_jediatmvar:
4141
configs += ['prepatmiodaobs', 'atmanlinit', 'atmanlrun', 'atmanlfinal']
@@ -166,8 +166,7 @@ def get_task_names(self):
166166
hybrid_after_eupd_tasks += ['ecen', 'esfc', 'efcs', 'epos', 'earc', 'cleanup']
167167

168168
# Collect all "gdas" cycle tasks
169-
gdas_tasks = ['stage_ic']
170-
gdas_tasks += gdas_gfs_common_tasks_before_fcst.copy()
169+
gdas_tasks = gdas_gfs_common_tasks_before_fcst.copy()
171170

172171
if not self.do_jediatmvar:
173172
gdas_tasks += ['analdiag']

workflow/rocoto/gfs_tasks.py

+10-19
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,14 @@ def stage_ic(self):
2424

2525
# Atm ICs
2626
if self.app_config.do_atm:
27-
if self.cdump in 'gdas':
28-
prefix = f"{cpl_ic['BASE_CPLIC']}/{cpl_ic['CPL_ATMIC']}/gdas.@Y@m@d/@H/model_data/atmos/restart"
29-
PDY = self._base.get('SDATE').strftime("%Y%m%d%H")[0:8]
30-
cyc = self._base.get('SDATE').strftime("%Y%m%d%H")[8:10]
31-
file = PDY + '.' + cyc + '0000.fv_core.res.nc'
27+
prefix = f"{cpl_ic['BASE_CPLIC']}/{cpl_ic['CPL_ATMIC']}/@Y@m@d@H/atmos"
28+
for file in ['gfs_ctrl.nc'] + \
29+
[f'{datatype}_data.tile{tile}.nc'
30+
for datatype in ['gfs', 'sfc']
31+
for tile in range(1, self.n_tiles + 1)]:
3232
data = f"{prefix}/{file}"
33-
dep_dict = {'type': 'data', 'data': data, 'offset': f"-{timedelta_to_HMS(self._base['cycle_interval'])}"}
34-
else:
35-
prefix = f"{cpl_ic['BASE_CPLIC']}/{cpl_ic['CPL_ATMIC']}/@Y@m@d@H/atmos"
36-
for file in ['gfs_ctrl.nc'] + \
37-
[f'{datatype}_data.tile{tile}.nc'
38-
for datatype in ['gfs', 'sfc']
39-
for tile in range(1, self.n_tiles + 1)]:
40-
data = f"{prefix}/{file}"
41-
dep_dict = {'type': 'data', 'data': data}
42-
deps.append(rocoto.add_dependency(dep_dict))
33+
dep_dict = {'type': 'data', 'data': data}
34+
deps.append(rocoto.add_dependency(dep_dict))
4335
else: # data-atmosphere
4436
# TODO - need more information about how these forcings are stored
4537
prefix = f"{cpl_ic['BASE_CPLIC']}/{cpl_ic['CPL_DATM']}/@Y@m@d@H"
@@ -78,14 +70,13 @@ def stage_ic(self):
7870

7971
dependencies = rocoto.create_dependency(dep_condition='and', dep=deps)
8072

81-
cycledef = 'gdas_half' if self.cdump in ['gdas'] else self.cdump
8273
resources = self.get_resource('stage_ic')
8374
task_name = f'{self.cdump}stage_ic'
8475
task_dict = {'task_name': task_name,
8576
'resources': resources,
8677
'dependency': dependencies,
8778
'envars': self.envars,
88-
'cycledef': cycledef,
79+
'cycledef': self.cdump,
8980
'command': f'{self.HOMEgfs}/jobs/rocoto/stage_ic.sh',
9081
'job_name': f'{self.pslot}_{task_name}_@H',
9182
'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log',
@@ -842,7 +833,7 @@ def _fcst_cycled(self):
842833
dependencies = rocoto.create_dependency(dep_condition='and', dep=dependencies)
843834

844835
if self.cdump in ['gdas']:
845-
dep_dict = {'type': 'task', 'name': f'{self.cdump}stage_ic'}
836+
dep_dict = {'type': 'cycleexist', 'condition': 'not', 'offset': f"-{timedelta_to_HMS(self._base['cycle_interval'])}"}
846837
dependencies.append(rocoto.add_dependency(dep_dict))
847838
dependencies = rocoto.create_dependency(dep_condition='or', dep=dependencies)
848839

@@ -2540,7 +2531,7 @@ def efcs(self):
25402531
dep_dict = {'type': 'task', 'name': f'{self.cdump}esfc'}
25412532
deps.append(rocoto.add_dependency(dep_dict))
25422533
dependencies = rocoto.create_dependency(dep_condition='and', dep=deps)
2543-
dep_dict = {'type': 'task', 'name': f'gdasstage_ic'}
2534+
dep_dict = {'type': 'cycleexist', 'condition': 'not', 'offset': f"-{timedelta_to_HMS(self._base['cycle_interval'])}"}
25442535
dependencies.append(rocoto.add_dependency(dep_dict))
25452536
dependencies = rocoto.create_dependency(dep_condition='or', dep=dependencies)
25462537

workflow/setup_expt.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ def link_files_from_src_to_dst(src_dir, dst_dir):
219219
src_dir = os.path.join(inputs.icsdir, current_cycle_dir, src_atm_anl_dir)
220220
dst_dir = os.path.join(rotdir, current_cycle_dir, dst_atm_anl_dir)
221221
makedirs_if_missing(dst_dir)
222-
for ftype in ['abias', 'abias_pc', 'abias_air', 'radstat', 'atms_n20.satbias.nc4', 'atms_n20.satbias_cov.nc4', 'atms_n20.tlapse.txt']:
222+
for ftype in ['abias', 'abias_pc', 'abias_air', 'radstat']:
223223
fname = f'{inputs.cdump}.t{idatestr[8:]}z.{ftype}'
224224
src_file = os.path.join(src_dir, fname)
225225
if os.path.exists(src_file):

0 commit comments

Comments
 (0)