Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add JEDI 3DEnVar atmosphere only CI test #2309

Merged
merged 16 commits into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
51633b5
initial commit of ci yamls for JEDI hybatmDA case (#2294)
RussTreadon-NOAA Feb 7, 2024
5b2f440
Merge branch 'NOAA-EMC:develop' into feature/jedi_atm_ci
RussTreadon-NOAA Feb 8, 2024
a41a0db
updates to populate EXPDIR and ROTDIR for JEDI hybatmDA ci (#2294)
RussTreadon-NOAA Feb 8, 2024
cc5ef37
Merge branch 'NOAA-EMC:develop' into feature/jedi_atm_ci
RussTreadon-NOAA Feb 9, 2024
38414ac
turn off monitor jobs for JEDIATMVAR, adjust JEDIATM resources, fix p…
RussTreadon-NOAA Feb 9, 2024
1d8972b
Merge branch 'NOAA-EMC:develop' into feature/jedi_atm_ci
RussTreadon-NOAA Feb 12, 2024
693b65a
Merge branch 'NOAA-EMC:develop' into feature/jedi_atm_ci
RussTreadon-NOAA Feb 12, 2024
87eb1ad
Merge branch 'NOAA-EMC:develop' into feature/jedi_atm_ci
RussTreadon-NOAA Feb 13, 2024
91b9308
extend stage_ic to gdas for cycled parallels (#2294)
RussTreadon-NOAA Feb 13, 2024
c102c6f
correct shellcheck errors (#2294)
RussTreadon-NOAA Feb 13, 2024
1bc6181
Merge branch 'NOAA-EMC:develop' into feature/jedi_atm_ci
RussTreadon-NOAA Feb 13, 2024
96cf468
Merge branch 'NOAA-EMC:develop' into feature/jedi_atm_ci
RussTreadon-NOAA Feb 14, 2024
62afe41
Merge branch 'NOAA-EMC:develop' into feature/jedi_atm_ci
RussTreadon-NOAA Feb 14, 2024
ea200a4
revert changes to extend stage_ic to gdas for cycled parallels (#2294)
RussTreadon-NOAA Feb 14, 2024
621ea5b
Merge branch 'NOAA-EMC:develop' into feature/jedi_atm_ci
RussTreadon-NOAA Feb 16, 2024
a78ac19
skip C48C48_ufs_hybatmDA ci test on hera (#2294)
RussTreadon-NOAA Feb 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
extend stage_ic to gdas for cycled parallels (#2294)
  • Loading branch information
RussTreadon-NOAA committed Feb 13, 2024
commit 91b930886e332e53e98f5c281447a65cf89d30f0
1 change: 0 additions & 1 deletion ci/cases/pr/C48C48_ufs_hybatmDA.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ arguments:
resensatmos: 48
comroot: {{ 'RUNTESTS' | getenv }}/COMROOT
expdir: {{ 'RUNTESTS' | getenv }}/EXPDIR
icsdir: {{ 'ICSDIR_ROOT' | getenv }}/C48C48
idate: 2021032312
edate: 2021032400
nens: 2
Expand Down
2 changes: 1 addition & 1 deletion parm/config/gfs/config.base.emc.dyn
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ export FHMAX_FITS=132
[[ "${FHMAX_FITS}" -gt "${FHMAX_GFS}" ]] && export FHMAX_FITS=${FHMAX_GFS}

# The monitor jobs are not yet supported for JEDIATMVAR
if [[ ${DO_JEDIATMVAR} = "NO" ]]; then
if [[ ${DO_JEDIATMVAR} = "YES" ]]; then
export DO_VERFOZN="NO" # Ozone data assimilation monitoring
export DO_VERFRAD="NO" # Radiance data assimilation monitoring
export DO_VMINMON="NO" # GSI minimization monitoring
Expand Down
9 changes: 9 additions & 0 deletions parm/config/gfs/config.stage_ic
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
# Get task specific resources
source "${EXPDIR}/config.resources" stage_ic

# Stage ICs for coupled system
if [[ "${DO_COUPLED}" = "YES" ]]; then
case "${CASE}" in
"C48" | "C96")
export CPL_ATMIC="workflow_${CASE}_refactored"
Expand Down Expand Up @@ -37,5 +39,12 @@
exit 1
;;
esac
fi # End block for coupled ICs

# Stage ICs for cycled runs
if [[ "$MODE" = "cycled" ]]; then

Check notice

Code scanning / shellcheck

Prefer putting braces around variable references even when not strictly required. Note

Prefer putting braces around variable references even when not strictly required.
export CPL_ATMIC="C48C48"
export CPL_ATMDAIC="C48C48"
fi

echo "END: config.stage_ic"
55 changes: 55 additions & 0 deletions scripts/exglobal_stage_ic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
echo "FATAL ERROR: Unable to copy ${1} to ${2} (Error code ${3})"
}

if [[ "${MODE}" == "forecast-only" ]]; then

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

Expand Down Expand Up @@ -152,6 +154,59 @@

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

# Stage files for MODE="cycled"
else
# Stage deterministic ICs from previous cycle
RUN=${rCDUMP} YMD=${gPDY} HH=${gcyc} generate_com COM_TOP:COM_TOP_TMPL
COM_TOP_BASE=$(dirname $COM_TOP)

Check notice

Code scanning / shellcheck

Double quote to prevent globbing and word splitting. Note

Double quote to prevent globbing and word splitting.

Check notice

Code scanning / shellcheck

Prefer putting braces around variable references even when not strictly required. Note

Prefer putting braces around variable references even when not strictly required.
[[ ! -d "${COM_TOP_BASE}" ]] && mkdir -p "${COM_TOP_BASE}"
[[ -d "${COM_TOP_BASE}/${gcyc}" ]] && rm -rf "${COM_TOP_BASE}/${gcyc}"

Check warning

Code scanning / shellcheck

Use "${var:?}" to ensure this never expands to / . Warning

Use "${var:?}" to ensure this never expands to / .
src="${BASE_CPLIC}/${CPL_ATMIC:-}/${RUN}.${gPDY}/${gcyc}"
tgt="${COM_TOP_BASE}/"
${NLN} "${src}" "${tgt}"
rc=$?
((rc != 0)) && error_message "${src}" "${tgt}" "${rc}"
err=$((err + rc))

# Stage ensemble ICs from previous cycle
if [[ "${DOHYBVAR}" == "YES" ]]; then
RUN=enkf${rCDUMP} YMD=${gPDY} HH=${gcyc} generate_com COM_TOP:COM_TOP_TMPL
COM_TOP_BASE=$(dirname $COM_TOP)

Check notice

Code scanning / shellcheck

Double quote to prevent globbing and word splitting. Note

Double quote to prevent globbing and word splitting.

Check notice

Code scanning / shellcheck

Prefer putting braces around variable references even when not strictly required. Note

Prefer putting braces around variable references even when not strictly required.
[[ ! -d "${COM_TOP_BASE}" ]] && mkdir -p "${COM_TOP_BASE}"
[[ -d "${COM_TOP_BASE}/${gcyc}" ]] && rm -rf "${COM_TOP_BASE}/${gcyc}"

Check warning

Code scanning / shellcheck

Use "${var:?}" to ensure this never expands to / . Warning

Use "${var:?}" to ensure this never expands to / .
src="${BASE_CPLIC}/${CPL_ATMIC:-}/enkf${RUN}.${gPDY}/${gcyc}"
tgt="${COM_TOP_BASE}/"
${NLN} "${src}" "${tgt}"
rc=$?
((rc != 0)) && error_message "${src}" "${tgt}" "${rc}"
err=$((err + rc))
fi

# Stage bias correction files
RUN=${rCDUMP} YMD=${PDY} HH=${cyc} generate_com COM_ATMOS_ANALYSIS:COM_ATMOS_ANALYSIS_TMPL
[[ ! -d "${COM_ATMOS_ANALYSIS}" ]] && mkdir -p "${COM_ATMOS_ANALYSIS}"
src="${BASE_CPLIC}/${CPL_ATMIC:-}/${RUN}.${PDY}/${cyc}/analysis/atmos"
tgt="${COM_ATMOS_ANALYSIS}/"
if [[ "${DO_JEDIATMVAR}" == "YES" || "${DO_JEDIATMENS}" == "YES" ]]; then
flist="radbcor"
else
flist="abias abias_air abias_pc radstat"
fi
for ftype in $flist; do

Check notice

Code scanning / shellcheck

Prefer putting braces around variable references even when not strictly required. Note

Prefer putting braces around variable references even when not strictly required.
file=${rCDUMP}.t${cyc}z.$ftype

Check notice

Code scanning / shellcheck

Prefer putting braces around variable references even when not strictly required. Note

Prefer putting braces around variable references even when not strictly required.
${NCP} "${src}/$file" "${tgt}"

Check notice

Code scanning / shellcheck

Prefer putting braces around variable references even when not strictly required. Note

Prefer putting braces around variable references even when not strictly required.
rc=$?
((rc != 0)) && error_message "${src}" "${tgt}" "${rc}"
err=$((err + rc))
done
if [[ "${DO_JEDIATMVAR}" == "YES" || "${DO_JEDIATMENS}" == "YES" ]]; then
cd ${tgt}

Check warning

Code scanning / shellcheck

Use 'cd ... || exit' or 'cd ... || return' in case cd fails. Warning

Use 'cd ... || exit' or 'cd ... || return' in case cd fails.

Check notice

Code scanning / shellcheck

Double quote to prevent globbing and word splitting. Note

Double quote to prevent globbing and word splitting.
tar -xvf ${rCDUMP}.t${cyc}z.radbcor

Check notice

Code scanning / shellcheck

Double quote to prevent globbing and word splitting. Note

Double quote to prevent globbing and word splitting.

Check notice

Code scanning / shellcheck

Double quote to prevent globbing and word splitting. Note

Double quote to prevent globbing and word splitting.
cd ${DATA}

Check warning

Code scanning / shellcheck

Use 'cd ... || exit' or 'cd ... || return' in case cd fails. Warning

Use 'cd ... || exit' or 'cd ... || return' in case cd fails.

Check notice

Code scanning / shellcheck

Double quote to prevent globbing and word splitting. Note

Double quote to prevent globbing and word splitting.
fi

fi

###############################################################
# Check for errors and exit if any of the above failed
if [[ "${err}" -ne 0 ]]; then
Expand Down
2 changes: 1 addition & 1 deletion ush/python/pygfs/task/atm_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def initialize(self: Analysis) -> None:
'NMEM_ENS', 'DATA', 'current_cycle', 'ntiles']
for key in keys:
localconf[key] = self.task_config[key]
localconf.RUN = 'enkf' + self.task_config.RUN
localconf.RUN = 'enkfgdas'
localconf.dirname = 'ens'
FileHandler(self.get_fv3ens_dict(localconf)).sync()

Expand Down
5 changes: 3 additions & 2 deletions workflow/applications/gfs_cycled.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def _get_app_configs(self):
Returns the config_files that are involved in the cycled app
"""

configs = ['prep']
configs = ['stage_ic', 'prep']

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

# Collect all "gdas" cycle tasks
gdas_tasks = gdas_gfs_common_tasks_before_fcst.copy()
gdas_tasks = ['stage_ic']
gdas_tasks += gdas_gfs_common_tasks_before_fcst.copy()

if not self.do_jediatmvar:
gdas_tasks += ['analdiag']
Expand Down
29 changes: 19 additions & 10 deletions workflow/rocoto/gfs_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,22 @@ def stage_ic(self):

# Atm ICs
if self.app_config.do_atm:
prefix = f"{cpl_ic['BASE_CPLIC']}/{cpl_ic['CPL_ATMIC']}/@Y@m@d@H/atmos"
for file in ['gfs_ctrl.nc'] + \
[f'{datatype}_data.tile{tile}.nc'
for datatype in ['gfs', 'sfc']
for tile in range(1, self.n_tiles + 1)]:
if self.cdump in 'gdas':
prefix = f"{cpl_ic['BASE_CPLIC']}/{cpl_ic['CPL_ATMIC']}/gdas.@Y@m@d/@H/model_data/atmos/restart"
PDY = self._base.get('SDATE').strftime("%Y%m%d%H")[0:8]
cyc = self._base.get('SDATE').strftime("%Y%m%d%H")[8:10]
file = PDY + '.' + cyc + '0000.fv_core.res.nc'
data = f"{prefix}/{file}"
dep_dict = {'type': 'data', 'data': data}
deps.append(rocoto.add_dependency(dep_dict))
dep_dict = {'type': 'data', 'data': data, 'offset': f"-{timedelta_to_HMS(self._base['cycle_interval'])}"}
else:
prefix = f"{cpl_ic['BASE_CPLIC']}/{cpl_ic['CPL_ATMIC']}/@Y@m@d@H/atmos"
for file in ['gfs_ctrl.nc'] + \
[f'{datatype}_data.tile{tile}.nc'
for datatype in ['gfs', 'sfc']
for tile in range(1, self.n_tiles + 1)]:
data = f"{prefix}/{file}"
dep_dict = {'type': 'data', 'data': data}
deps.append(rocoto.add_dependency(dep_dict))
else: # data-atmosphere
# TODO - need more information about how these forcings are stored
prefix = f"{cpl_ic['BASE_CPLIC']}/{cpl_ic['CPL_DATM']}/@Y@m@d@H"
Expand Down Expand Up @@ -70,13 +78,14 @@ def stage_ic(self):

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

cycledef = 'gdas_half' if self.cdump in ['gdas'] else self.cdump
resources = self.get_resource('stage_ic')
task_name = f'{self.cdump}stage_ic'
task_dict = {'task_name': task_name,
'resources': resources,
'dependency': dependencies,
'envars': self.envars,
'cycledef': self.cdump,
'cycledef': cycledef,
'command': f'{self.HOMEgfs}/jobs/rocoto/stage_ic.sh',
'job_name': f'{self.pslot}_{task_name}_@H',
'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log',
Expand Down Expand Up @@ -833,7 +842,7 @@ def _fcst_cycled(self):
dependencies = rocoto.create_dependency(dep_condition='and', dep=dependencies)

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

Expand Down Expand Up @@ -2535,7 +2544,7 @@ def efcs(self):
dep_dict = {'type': 'task', 'name': f'{self.cdump}esfc'}
deps.append(rocoto.add_dependency(dep_dict))
dependencies = rocoto.create_dependency(dep_condition='and', dep=deps)
dep_dict = {'type': 'cycleexist', 'condition': 'not', 'offset': f"-{timedelta_to_HMS(self._base['cycle_interval'])}"}
dep_dict = {'type': 'task', 'name': f'gdasstage_ic'}
dependencies.append(rocoto.add_dependency(dep_dict))
dependencies = rocoto.create_dependency(dep_condition='or', dep=dependencies)

Expand Down
Loading