Skip to content

Commit

Permalink
Merge branch 'NOAA-EMC:develop' into feature/radbcor
Browse files Browse the repository at this point in the history
  • Loading branch information
RussTreadon-NOAA authored Sep 23, 2024
2 parents ae6b315 + fe57bb4 commit 7fec851
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 81 deletions.
43 changes: 0 additions & 43 deletions ush/check_ice_netcdf.sh

This file was deleted.

11 changes: 2 additions & 9 deletions ush/forecast_predet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -642,15 +642,8 @@ CICE_predet(){

# CICE does not have a concept of high frequency output like FV3
# Convert output settings into an explicit list for CICE
if (( $(( ( cyc + FHMIN ) % FHOUT_ICE )) == 0 )); then
# shellcheck disable=SC2312
mapfile -t CICE_OUTPUT_FH < <(seq "${FHMIN}" "${FHOUT_ICE}" "${FHMAX}") || exit 10
else
CICE_OUTPUT_FH=("${FHMIN}")
# shellcheck disable=SC2312
mapfile -t -O "${#CICE_OUTPUT_FH[@]}" CICE_OUTPUT_FH < <(seq "$(( FHMIN + $(( ( cyc + FHMIN ) % FHOUT_ICE )) ))" "${FHOUT_ICE}" "${FHMAX}") || exit 10
CICE_OUTPUT_FH+=("${FHMAX}")
fi
# shellcheck disable=SC2312
mapfile -t CICE_OUTPUT_FH < <(seq "${FHMIN}" "${FHOUT_ICE}" "${FHMAX}") || exit 10

# Fix files
${NCP} "${FIXgfs}/cice/${ICERES}/${CICE_GRID}" "${DATA}/"
Expand Down
16 changes: 2 additions & 14 deletions ush/python/pygfs/task/oceanice_products.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,10 @@ def __init__(self, config: Dict[str, Any]) -> None:

valid_datetime = add_to_datetime(self.task_config.current_cycle, to_timedelta(f"{self.task_config.FORECAST_HOUR}H"))

forecast_hour = self.task_config.FORECAST_HOUR
if self.task_config.COMPONENT == 'ice':
offset = int(self.task_config.current_cycle.strftime("%H")) % self.task_config.FHOUT_ICE_GFS
# For CICE cases where offset is not 0, forecast_hour needs to be adjusted based on the offset.
# TODO: Consider FHMIN when calculating offset.
if offset != 0:
forecast_hour = self.task_config.FORECAST_HOUR - int(self.task_config.current_cycle.strftime("%H"))
# For the first forecast hour, the interval may be different from the intervals of subsequent forecast hours
if forecast_hour <= self.task_config.FHOUT_ICE_GFS:
interval = self.task_config.FHOUT_ICE_GFS - int(self.task_config.current_cycle.strftime("%H"))
else:
interval = self.task_config.FHOUT_ICE_GFS
else:
forecast_hour = self.task_config.FORECAST_HOUR
interval = self.task_config.FHOUT_ICE_GFS
interval = self.task_config.FHOUT_ICE_GFS
if self.task_config.COMPONENT == 'ocean':
forecast_hour = self.task_config.FORECAST_HOUR
interval = self.task_config.FHOUT_OCN_GFS

# TODO: This is a bit of a hack, but it works for now
Expand Down
20 changes: 5 additions & 15 deletions workflow/rocoto/gefs_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,21 +213,11 @@ def _atmosoceaniceprod(self, component: str):
history_path = self._template_to_rocoto_cycstring(self._base[history_path_tmpl], {'MEMDIR': 'mem#member#'})
deps = []
data = f'{history_path}/{history_file_tmpl}'
if component in ['ocean']:
dep_dict = {'type': 'data', 'data': data, 'age': 120}
deps.append(rocoto.add_dependency(dep_dict))
dep_dict = {'type': 'metatask', 'name': 'fcst_mem#member#'}
deps.append(rocoto.add_dependency(dep_dict))
dependencies = rocoto.create_dependency(dep=deps, dep_condition='or')
elif component in ['ice']:
command = f"{self.HOMEgfs}/ush/check_ice_netcdf.sh @Y @m @d @H #fhr# &ROTDIR; #member# {fhout_ice_gfs}"
dep_dict = {'type': 'sh', 'command': command}
deps.append(rocoto.add_dependency(dep_dict))
dependencies = rocoto.create_dependency(dep=deps)
else:
dep_dict = {'type': 'data', 'data': data, 'age': 120}
deps.append(rocoto.add_dependency(dep_dict))
dependencies = rocoto.create_dependency(dep=deps)
dep_dict = {'type': 'data', 'data': data, 'age': 120}
deps.append(rocoto.add_dependency(dep_dict))
dep_dict = {'type': 'metatask', 'name': 'fcst_mem#member#'}
deps.append(rocoto.add_dependency(dep_dict))
dependencies = rocoto.create_dependency(dep=deps, dep_condition='or')

postenvars = self.envars.copy()
postenvar_dict = {'ENSMEM': '#member#',
Expand Down

0 comments on commit 7fec851

Please sign in to comment.