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

Remove need for a ice_prod dependency check script #2809

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
9e6206c
Update linters.yaml
EricSinsky-NOAA Jun 3, 2024
4e13fbe
Revert changes in linters.yaml
EricSinsky-NOAA Jun 4, 2024
1eb0c26
Merge branch 'NOAA-EMC:develop' into develop
EricSinsky-NOAA Jun 7, 2024
720276b
Merge branch 'NOAA-EMC:develop' into develop
EricSinsky-NOAA Jun 12, 2024
219adb2
Merge branch 'NOAA-EMC:develop' into develop
EricSinsky-NOAA Jun 20, 2024
37e2a6f
Merge branch 'NOAA-EMC:develop' into develop
EricSinsky-NOAA Jun 24, 2024
b7ba980
Merge branch 'NOAA-EMC:develop' into develop
EricSinsky-NOAA Jun 25, 2024
a3efe66
Merge branch 'NOAA-EMC:develop' into develop
EricSinsky-NOAA Jun 26, 2024
a5aba03
Remove check_ice_netcdf dependency for ice_prod
EricSinsky-NOAA Jun 26, 2024
b7e301e
Remove check_ice_netcdf script
EricSinsky-NOAA Jun 26, 2024
f9fddac
Add function to calculate CICE average
EricSinsky-NOAA Jul 2, 2024
fe8304b
Merge remote-tracking branch 'EMC/develop' into feature/issue_2721
EricSinsky-NOAA Jul 31, 2024
50d1be4
Execute cice_avg function in forecast exscript
EricSinsky-NOAA Jul 31, 2024
9e5734f
Use cdo to perform time average in cice_avg func
EricSinsky-NOAA Jul 31, 2024
7d78340
Remove extra space
EricSinsky-NOAA Jul 31, 2024
ab3b754
Remove FHOUT_ICE_6h
EricSinsky-NOAA Aug 1, 2024
e0960cb
Add more fixes
EricSinsky-NOAA Aug 1, 2024
f240d6b
Merge remote-tracking branch 'EMC/develop' into feature/issue_2721
EricSinsky-NOAA Aug 6, 2024
6c60366
Add condition to perform additional CICE averaging
EricSinsky-NOAA Aug 6, 2024
c93497b
Fix conditional statement
EricSinsky-NOAA Aug 6, 2024
31ac952
Add flag on whether to further average CICE
EricSinsky-NOAA Aug 6, 2024
e9a032e
Simplify ocnice prod python script
EricSinsky-NOAA Aug 6, 2024
2590921
Fix shellcheck errors
EricSinsky-NOAA Aug 6, 2024
9bba756
Merge remote-tracking branch 'EMC/develop' into feature/issue_2721
EricSinsky-NOAA Aug 7, 2024
5ea1b65
Merge remote-tracking branch 'EMC/develop' into feature/issue_2721
EricSinsky-NOAA Aug 14, 2024
c1f799e
Merge remote-tracking branch 'EMC/develop' into feature/issue_2721
EricSinsky-NOAA Aug 23, 2024
6578921
Move some settings from predet to config.fcst
EricSinsky-NOAA Aug 23, 2024
6283104
Fix shell errors
EricSinsky-NOAA Aug 23, 2024
b9b3ba6
Merge remote-tracking branch 'EMC/develop' into feature/issue_2721
EricSinsky-NOAA Sep 3, 2024
fcb9003
Remove bugfix that for >=24hr non-00z ice_prod
EricSinsky-NOAA Sep 18, 2024
7ec84e3
Merge remote-tracking branch 'EMC/develop' into feature/issue_2721
EricSinsky-NOAA Sep 18, 2024
dc12832
Remove space
EricSinsky-NOAA Sep 18, 2024
d8e3ca2
Merge remote-tracking branch 'EMC/develop' into feature/issue_2721
EricSinsky-NOAA Sep 19, 2024
6c8548e
Simplify dependencies for ocean/ice prod
EricSinsky-NOAA Sep 19, 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
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
Fixed Show fixed Hide fixed

# 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)
WalterKolczynski-NOAA marked this conversation as resolved.
Show resolved Hide resolved
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
Loading