forked from NOAA-EMC/global-workflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update ocean post-processing triggers (NOAA-EMC#2784)
This PR: - replaces `check_netcdf.sh` checker for ocean post-processing with with ocean output at the next forecast hour or finishing of the forecast job for ocean prod - removes no longer needed `ush/check_netcdf.sh`
- Loading branch information
Showing
3 changed files
with
14 additions
and
29 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -218,7 +218,7 @@ def _atmosoceaniceprod(self, component: str): | |
'history_file_tmpl': f'{self.run}[email protected]#fhr#'}, | ||
'ocean': {'config': 'oceanice_products', | ||
'history_path_tmpl': 'COM_OCEAN_HISTORY_TMPL', | ||
'history_file_tmpl': f'{self.run}.ocean.t@Hz.{fhout_ocn_gfs}hr_avg.f#fhr#.nc'}, | ||
'history_file_tmpl': f'{self.run}.ocean.t@Hz.{fhout_ocn_gfs}hr_avg.f#fhr_next#.nc'}, | ||
'ice': {'config': 'oceanice_products', | ||
'history_path_tmpl': 'COM_ICE_HISTORY_TMPL', | ||
'history_file_tmpl': f'{self.run}.ice.t@Hz.{fhout_ice_gfs}hr_avg.f#fhr#.nc'}} | ||
|
@@ -236,10 +236,9 @@ def _atmosoceaniceprod(self, component: str): | |
if component in ['ocean']: | ||
dep_dict = {'type': 'data', 'data': data, 'age': 120} | ||
deps.append(rocoto.add_dependency(dep_dict)) | ||
command = f"{self.HOMEgfs}/ush/check_netcdf.sh {history_path}/{history_file_tmpl}" | ||
dep_dict = {'type': 'sh', 'command': command} | ||
dep_dict = {'type': 'task', 'name': 'fcst_mem#member#'} | ||
deps.append(rocoto.add_dependency(dep_dict)) | ||
dependencies = rocoto.create_dependency(dep=deps, dep_condition='and') | ||
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} | ||
|
@@ -281,6 +280,9 @@ def _atmosoceaniceprod(self, component: str): | |
fhrs.remove(0) | ||
|
||
fhr_var_dict = {'fhr': ' '.join([f"{fhr:03d}" for fhr in fhrs])} | ||
if component in ['ocean']: | ||
fhrs_next = fhrs[1:] + [fhrs[-1] + (fhrs[-1] - fhrs[-2])] | ||
fhr_var_dict['fhr_next'] = ' '.join([f"{fhr:03d}" for fhr in fhrs_next]) | ||
|
||
fhr_metatask_dict = {'task_name': f'{component}_prod_#member#', | ||
'task_dict': task_dict, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1084,7 +1084,7 @@ def _atmosoceaniceprod(self, component: str): | |
'history_file_tmpl': f'{self.run}[email protected]#fhr#'}, | ||
'ocean': {'config': 'oceanice_products', | ||
'history_path_tmpl': 'COM_OCEAN_HISTORY_TMPL', | ||
'history_file_tmpl': f'{self.run}[email protected]_avg.f#fhr#.nc'}, | ||
'history_file_tmpl': f'{self.run}[email protected]_avg.f#fhr_next#.nc'}, | ||
'ice': {'config': 'oceanice_products', | ||
'history_path_tmpl': 'COM_ICE_HISTORY_TMPL', | ||
'history_file_tmpl': f'{self.run}[email protected]_avg.f#fhr#.nc'}} | ||
|
@@ -1104,13 +1104,9 @@ def _atmosoceaniceprod(self, component: str): | |
data = f'{history_path}/{history_file_tmpl}' | ||
dep_dict = {'type': 'data', 'data': data, 'age': 120} | ||
deps.append(rocoto.add_dependency(dep_dict)) | ||
if component in ['ocean']: | ||
command = f"{self.HOMEgfs}/ush/check_netcdf.sh {history_path}/{history_file_tmpl}" | ||
dep_dict = {'type': 'sh', 'command': command} | ||
deps.append(rocoto.add_dependency(dep_dict)) | ||
dependencies = rocoto.create_dependency(dep=deps, dep_condition='and') | ||
else: | ||
dependencies = rocoto.create_dependency(dep=deps) | ||
dep_dict = {'type': 'task', 'name': f'{self.cdump}fcst'} | ||
deps.append(rocoto.add_dependency(dep_dict)) | ||
dependencies = rocoto.create_dependency(dep=deps, dep_condition='or') | ||
|
||
cycledef = 'gdas_half,gdas' if self.run in ['gdas'] else self.run | ||
resources = self.get_resource(component_dict['config']) | ||
|
@@ -1134,10 +1130,12 @@ def _atmosoceaniceprod(self, component: str): | |
fhrs.remove(0) | ||
|
||
fhr_var_dict = {'fhr': ' '.join([f"{fhr:03d}" for fhr in fhrs])} | ||
if component in ['ocean']: | ||
fhrs_next = fhrs[1:] + [fhrs[-1] + (fhrs[-1] - fhrs[-2])] | ||
fhr_var_dict['fhr_next'] = ' '.join([f"{fhr:03d}" for fhr in fhrs_next]) | ||
metatask_dict = {'task_name': f'{self.run}{component}_prod', | ||
'task_dict': task_dict, | ||
'var_dict': fhr_var_dict | ||
} | ||
'var_dict': fhr_var_dict} | ||
|
||
task = rocoto.create_task(metatask_dict) | ||
|
||
|