From 26e06a31691dee337c3916ed3c9e7e5cbbf5d423 Mon Sep 17 00:00:00 2001 From: "Anton.Fernando" Date: Thu, 17 Oct 2024 16:56:17 -0400 Subject: [PATCH 01/41] modified gefs_tasks.py --- workflow/rocoto/gefs_tasks.py | 60 +++++++++++++++++++++-------------- 1 file changed, 36 insertions(+), 24 deletions(-) diff --git a/workflow/rocoto/gefs_tasks.py b/workflow/rocoto/gefs_tasks.py index 955f631c8e..5c07b9281d 100644 --- a/workflow/rocoto/gefs_tasks.py +++ b/workflow/rocoto/gefs_tasks.py @@ -314,36 +314,48 @@ def atmos_ensstat(self): def wavepostsbs(self): deps = [] - dep_dict = {'type': 'metatask', 'name': f'gefs_fcst_mem#member#'} + dep_dict = {'type': 'metatask', 'name': f'fcst_mem#member#'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) - wave_post_envars = self.envars.copy() - postenvar_dict = {'ENSMEM': '#member#', - 'MEMDIR': 'mem#member#', - } - for key, value in postenvar_dict.items(): - wave_post_envars.append(rocoto.create_envar(name=key, value=str(value))) - resources = self.get_resource('wavepostsbs') + tasks = [] + for member in [f"{mem:03d}" for mem in range(1, self.nmem + 1)]: - task_name = f'gefs_wave_post_grid_mem#member#' - task_dict = {'task_name': task_name, - 'resources': resources, - 'dependency': dependencies, - 'envars': wave_post_envars, - 'cycledef': 'gefs', - 'command': f'{self.HOMEgfs}/jobs/rocoto/wavepostsbs.sh', - 'job_name': f'{self.pslot}_{task_name}_@H', - 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', - 'maxtries': '&MAXTRIES;' - } + wave_post_envars = self.envars.copy() + wave_post_dict = {'ENSMEM': f'{member}', + 'MEMDIR': f'mem{member}', + 'FHR3': '#fhr#', + } + for key, value in wave_post_dict.items(): + wave_post_envars.append(rocoto.create_envar(name=key, value=str(value))) - member_var_dict = {'member': ' '.join([str(mem).zfill(3) for mem in range(0, self.nmem + 1)])} - member_metatask_dict = {'task_name': 'gefs_wave_post_grid', - 'task_dict': task_dict, - 'var_dict': member_var_dict - } + task_name = f'wave_post_mem{member}_f#fhr#' + task_dict = {'task_name': task_name, + 'resources': resources, + 'dependency': dependencies, + 'envars': wave_post_envars, + 'cycledef': 'gefs', + 'command': f'{self.HOMEgfs}/jobs/rocoto/wavepostsbs.sh', + 'job_name': f'{self.pslot}_{task_name}_@H', + 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', + 'maxtries': '&MAXTRIES;' + } + + fhrs = self._get_forecast_hours('gefs', self._configs['wavepostsbs']) + fhr_var_dict = {'fhr': ' '.join([f"{fhr:03d}" for fhr in fhrs])} + 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'wave_post_mem{member}', + 'task_dict': task_dict, + 'var_dict': fhr_var_dict} + + member_var_dict = {'member': ' '.join([f"{mem:03d}" for mem in range(0, self.nmem + 1)])} + member_metatask_dict = {'task_name': f'wave_post_grid', + 'task_dict': fhr_metatask_dict, + 'var_dict': member_var_dict} + tasks.append(rocoto.create_task(member_metatask_dict)) task = rocoto.create_task(member_metatask_dict) From 97b5932d4a9dc6ee653812754d7fdafca09ed574 Mon Sep 17 00:00:00 2001 From: "Anton.Fernando" Date: Thu, 17 Oct 2024 16:59:39 -0400 Subject: [PATCH 02/41] modified gefs_tasks.py --- workflow/rocoto/gefs_tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflow/rocoto/gefs_tasks.py b/workflow/rocoto/gefs_tasks.py index 5c07b9281d..9b545ae5f9 100644 --- a/workflow/rocoto/gefs_tasks.py +++ b/workflow/rocoto/gefs_tasks.py @@ -314,7 +314,7 @@ def atmos_ensstat(self): def wavepostsbs(self): deps = [] - dep_dict = {'type': 'metatask', 'name': f'fcst_mem#member#'} + dep_dict = {'type': 'metatask', 'name': f'gefs_fcst_mem#member#'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) From 64552f86230b7a42552e0f10ddf8091dbfba3ee2 Mon Sep 17 00:00:00 2001 From: AntonMFernando Date: Thu, 17 Oct 2024 22:05:52 -0400 Subject: [PATCH 03/41] modifed gefs_tasks.py --- workflow/rocoto/gefs_tasks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/workflow/rocoto/gefs_tasks.py b/workflow/rocoto/gefs_tasks.py index 9b545ae5f9..7d2dbad145 100644 --- a/workflow/rocoto/gefs_tasks.py +++ b/workflow/rocoto/gefs_tasks.py @@ -326,7 +326,7 @@ def wavepostsbs(self): wave_post_dict = {'ENSMEM': f'{member}', 'MEMDIR': f'mem{member}', 'FHR3': '#fhr#', - } + } for key, value in wave_post_dict.items(): wave_post_envars.append(rocoto.create_envar(name=key, value=str(value))) @@ -340,7 +340,7 @@ def wavepostsbs(self): 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', 'maxtries': '&MAXTRIES;' - } + } fhrs = self._get_forecast_hours('gefs', self._configs['wavepostsbs']) fhr_var_dict = {'fhr': ' '.join([f"{fhr:03d}" for fhr in fhrs])} From ed3768cdd702ae01c2fd4c60413b92d3710b92ec Mon Sep 17 00:00:00 2001 From: AntonMFernando Date: Thu, 17 Oct 2024 22:08:35 -0400 Subject: [PATCH 04/41] modifed gefs_tasks.py --- workflow/rocoto/gefs_tasks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/workflow/rocoto/gefs_tasks.py b/workflow/rocoto/gefs_tasks.py index 7d2dbad145..e4cbb7cc05 100644 --- a/workflow/rocoto/gefs_tasks.py +++ b/workflow/rocoto/gefs_tasks.py @@ -326,7 +326,7 @@ def wavepostsbs(self): wave_post_dict = {'ENSMEM': f'{member}', 'MEMDIR': f'mem{member}', 'FHR3': '#fhr#', - } + } for key, value in wave_post_dict.items(): wave_post_envars.append(rocoto.create_envar(name=key, value=str(value))) @@ -340,7 +340,7 @@ def wavepostsbs(self): 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', 'maxtries': '&MAXTRIES;' - } + } fhrs = self._get_forecast_hours('gefs', self._configs['wavepostsbs']) fhr_var_dict = {'fhr': ' '.join([f"{fhr:03d}" for fhr in fhrs])} From 9373b8804dcfe3f88132a92414e62bc0447fc1c6 Mon Sep 17 00:00:00 2001 From: AntonMFernando Date: Thu, 17 Oct 2024 23:17:46 -0400 Subject: [PATCH 05/41] modified gefs_tasks.py --- workflow/rocoto/gefs_tasks.py | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/workflow/rocoto/gefs_tasks.py b/workflow/rocoto/gefs_tasks.py index e4cbb7cc05..c4126d930f 100644 --- a/workflow/rocoto/gefs_tasks.py +++ b/workflow/rocoto/gefs_tasks.py @@ -319,6 +319,17 @@ def wavepostsbs(self): dependencies = rocoto.create_dependency(dep=deps) resources = self.get_resource('wavepostsbs') + task_name = f'wave_post_mem#member#_f#fhr#' + task_dict = {'task_name': task_name, + 'resources': resources, + 'dependency': dependencies, + 'envars': wave_post_envars, + 'cycledef': 'gefs', + 'command': f'{self.HOMEgfs}/jobs/rocoto/wavepostsbs.sh', + 'job_name': f'{self.pslot}_{task_name}_@H', + 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', + 'maxtries': '&MAXTRIES;' + } tasks = [] for member in [f"{mem:03d}" for mem in range(1, self.nmem + 1)]: @@ -330,18 +341,6 @@ def wavepostsbs(self): for key, value in wave_post_dict.items(): wave_post_envars.append(rocoto.create_envar(name=key, value=str(value))) - task_name = f'wave_post_mem{member}_f#fhr#' - task_dict = {'task_name': task_name, - 'resources': resources, - 'dependency': dependencies, - 'envars': wave_post_envars, - 'cycledef': 'gefs', - 'command': f'{self.HOMEgfs}/jobs/rocoto/wavepostsbs.sh', - 'job_name': f'{self.pslot}_{task_name}_@H', - 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', - 'maxtries': '&MAXTRIES;' - } - fhrs = self._get_forecast_hours('gefs', self._configs['wavepostsbs']) fhr_var_dict = {'fhr': ' '.join([f"{fhr:03d}" for fhr in fhrs])} fhrs_next = fhrs[1:] + [fhrs[-1] + (fhrs[-1] - fhrs[-2])] From 916c1faa66d5245a9aa4bdeb83c08f54127d77c8 Mon Sep 17 00:00:00 2001 From: AntonMFernando Date: Thu, 17 Oct 2024 23:19:30 -0400 Subject: [PATCH 06/41] modified gefs_tasks.py --- workflow/rocoto/gefs_tasks.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/workflow/rocoto/gefs_tasks.py b/workflow/rocoto/gefs_tasks.py index c4126d930f..e3d1b8acf7 100644 --- a/workflow/rocoto/gefs_tasks.py +++ b/workflow/rocoto/gefs_tasks.py @@ -318,6 +318,9 @@ def wavepostsbs(self): deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) + for key, value in wave_post_dict.items(): + wave_post_envars.append(rocoto.create_envar(name=key, value=str(value))) + resources = self.get_resource('wavepostsbs') task_name = f'wave_post_mem#member#_f#fhr#' task_dict = {'task_name': task_name, @@ -338,8 +341,6 @@ def wavepostsbs(self): 'MEMDIR': f'mem{member}', 'FHR3': '#fhr#', } - for key, value in wave_post_dict.items(): - wave_post_envars.append(rocoto.create_envar(name=key, value=str(value))) fhrs = self._get_forecast_hours('gefs', self._configs['wavepostsbs']) fhr_var_dict = {'fhr': ' '.join([f"{fhr:03d}" for fhr in fhrs])} From f018d2e30d3692f9e9933f6ca0791dc5421d8487 Mon Sep 17 00:00:00 2001 From: AntonMFernando Date: Thu, 17 Oct 2024 23:25:43 -0400 Subject: [PATCH 07/41] modified gefs_tasks.py --- workflow/rocoto/gefs_tasks.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/workflow/rocoto/gefs_tasks.py b/workflow/rocoto/gefs_tasks.py index e3d1b8acf7..8b2f4558a7 100644 --- a/workflow/rocoto/gefs_tasks.py +++ b/workflow/rocoto/gefs_tasks.py @@ -318,6 +318,12 @@ def wavepostsbs(self): deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) + wave_post_envars = self.envars.copy() + wave_post_dict = {'ENSMEM': '#member#', + 'MEMDIR': 'mem#member#', + 'FHR3': '#fhr#', + } + for key, value in wave_post_dict.items(): wave_post_envars.append(rocoto.create_envar(name=key, value=str(value))) @@ -336,12 +342,6 @@ def wavepostsbs(self): tasks = [] for member in [f"{mem:03d}" for mem in range(1, self.nmem + 1)]: - wave_post_envars = self.envars.copy() - wave_post_dict = {'ENSMEM': f'{member}', - 'MEMDIR': f'mem{member}', - 'FHR3': '#fhr#', - } - fhrs = self._get_forecast_hours('gefs', self._configs['wavepostsbs']) fhr_var_dict = {'fhr': ' '.join([f"{fhr:03d}" for fhr in fhrs])} fhrs_next = fhrs[1:] + [fhrs[-1] + (fhrs[-1] - fhrs[-2])] From aede2e9e5d16dc595848ea7429dc96e69655d5fd Mon Sep 17 00:00:00 2001 From: AntonMFernando Date: Thu, 17 Oct 2024 23:31:05 -0400 Subject: [PATCH 08/41] modify gefs_tasks.py --- workflow/rocoto/gefs_tasks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/workflow/rocoto/gefs_tasks.py b/workflow/rocoto/gefs_tasks.py index 8b2f4558a7..c6a55b5114 100644 --- a/workflow/rocoto/gefs_tasks.py +++ b/workflow/rocoto/gefs_tasks.py @@ -318,6 +318,7 @@ def wavepostsbs(self): deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) + resources = self.get_resource('wavepostsbs') wave_post_envars = self.envars.copy() wave_post_dict = {'ENSMEM': '#member#', 'MEMDIR': 'mem#member#', @@ -327,7 +328,7 @@ def wavepostsbs(self): for key, value in wave_post_dict.items(): wave_post_envars.append(rocoto.create_envar(name=key, value=str(value))) - resources = self.get_resource('wavepostsbs') + task_name = f'wave_post_mem#member#_f#fhr#' task_dict = {'task_name': task_name, 'resources': resources, From f59a6c9c0f3af10a954f75075eb977831a513342 Mon Sep 17 00:00:00 2001 From: AntonMFernando Date: Thu, 17 Oct 2024 23:44:00 -0400 Subject: [PATCH 09/41] modified exgfs_wave_post_gridded_sbs.sh --- scripts/exgfs_wave_post_gridded_sbs.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/exgfs_wave_post_gridded_sbs.sh b/scripts/exgfs_wave_post_gridded_sbs.sh index b0cca34bd1..9823d1e2ee 100755 --- a/scripts/exgfs_wave_post_gridded_sbs.sh +++ b/scripts/exgfs_wave_post_gridded_sbs.sh @@ -235,7 +235,7 @@ source "${USHgfs}/preamble.sh" fhrg=$fhr sleep_interval=10 iwaitmax=120 # Maximum loop cycles for waiting until wave component output file is ready (fails after max) - while [ $fhr -le $FHMAX_WAV ]; do + if [ $fhr -le $FHMAX_WAV ]; then ymdh=$($NDATE $fhr ${PDY}${cyc}) YMD=$(echo $ymdh | cut -c1-8) @@ -256,7 +256,7 @@ source "${USHgfs}/preamble.sh" export GRDIDATA=${DATA}/output_$YMDHMS # Gridded data (main part, need to be run side-by-side with forecast - + if [ $fhr = $fhrg ] then for wavGRD in ${waveGRD}; do @@ -269,7 +269,7 @@ source "${USHgfs}/preamble.sh" fi ${NLN} "${gfile}" "./out_grd.${wavGRD}" done - + if [ "$DOGRI_WAV" = 'YES' ] then nigrd=1 @@ -429,7 +429,7 @@ source "${USHgfs}/preamble.sh" fhr=$fhrg #loop with out_grd stride - done + fi # --------------------------------------------------------------------------- # # 7. Ending output From f07b0ec6076253bb3d3d42ebd2ad20933d861f9f Mon Sep 17 00:00:00 2001 From: AntonMFernando Date: Fri, 18 Oct 2024 00:34:04 -0400 Subject: [PATCH 10/41] modified gefs_tasks.py --- workflow/rocoto/gefs_tasks.py | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/workflow/rocoto/gefs_tasks.py b/workflow/rocoto/gefs_tasks.py index c6a55b5114..5c39bcbb0a 100644 --- a/workflow/rocoto/gefs_tasks.py +++ b/workflow/rocoto/gefs_tasks.py @@ -313,12 +313,12 @@ def atmos_ensstat(self): return task def wavepostsbs(self): + resources = self.get_resource('wavepostsbs') deps = [] dep_dict = {'type': 'metatask', 'name': f'gefs_fcst_mem#member#'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) - resources = self.get_resource('wavepostsbs') wave_post_envars = self.envars.copy() wave_post_dict = {'ENSMEM': '#member#', 'MEMDIR': 'mem#member#', @@ -329,7 +329,7 @@ def wavepostsbs(self): wave_post_envars.append(rocoto.create_envar(name=key, value=str(value))) - task_name = f'wave_post_mem#member#_f#fhr#' + task_name = f'gefs_wave_post_grid_mem#member#_f#fhr#' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, @@ -341,22 +341,19 @@ def wavepostsbs(self): 'maxtries': '&MAXTRIES;' } tasks = [] - for member in [f"{mem:03d}" for mem in range(1, self.nmem + 1)]: - fhrs = self._get_forecast_hours('gefs', self._configs['wavepostsbs']) - fhr_var_dict = {'fhr': ' '.join([f"{fhr:03d}" for fhr in fhrs])} - fhrs_next = fhrs[1:] + [fhrs[-1] + (fhrs[-1] - fhrs[-2])] - fhr_var_dict['fhr_next'] = ' '.join([f"{fhr:03d}" for fhr in fhrs_next]) + fhrs = self._get_forecast_hours('gefs', self._configs['wavepostsbs']) + fhr_var_dict = {'fhr': ' '.join([f"{fhr:03d}" for fhr in fhrs])} - fhr_metatask_dict = {'task_name': f'wave_post_mem{member}', - 'task_dict': task_dict, - 'var_dict': fhr_var_dict} + fhr_metatask_dict = {'task_name': f'gefs_wave_post_grid_mem#member#', + 'task_dict': task_dict, + 'var_dict': fhr_var_dict} - member_var_dict = {'member': ' '.join([f"{mem:03d}" for mem in range(0, self.nmem + 1)])} - member_metatask_dict = {'task_name': f'wave_post_grid', - 'task_dict': fhr_metatask_dict, - 'var_dict': member_var_dict} - tasks.append(rocoto.create_task(member_metatask_dict)) + member_var_dict = {'member': ' '.join([f"{mem:03d}" for mem in range(0, self.nmem + 1)])} + member_metatask_dict = {'task_name': f'gefs_wave_post_grid', + 'task_dict': fhr_metatask_dict, + 'var_dict': member_var_dict} + tasks.append(rocoto.create_task(member_metatask_dict)) task = rocoto.create_task(member_metatask_dict) From 6261b4fb2c959e8ccd58c924d6184576fac03b1e Mon Sep 17 00:00:00 2001 From: AntonMFernando Date: Fri, 18 Oct 2024 00:35:57 -0400 Subject: [PATCH 11/41] modified gefs.py --- workflow/rocoto/gefs_tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflow/rocoto/gefs_tasks.py b/workflow/rocoto/gefs_tasks.py index 5c39bcbb0a..1951606fd0 100644 --- a/workflow/rocoto/gefs_tasks.py +++ b/workflow/rocoto/gefs_tasks.py @@ -482,7 +482,7 @@ def wavepostpnt(self): def extractvars(self): deps = [] if self.app_config.do_wave: - dep_dict = {'type': 'task', 'name': 'wave_post_grid_mem#member#'} + dep_dict = {'type': 'metatask', 'name': 'gefs_wave_post_grid_mem#member#'} deps.append(rocoto.add_dependency(dep_dict)) if self.app_config.do_ocean: dep_dict = {'type': 'metatask', 'name': 'gefs_ocean_prod_#member#'} From b2b3078ffb4bd741d031fa8dcaede23c66d2de50 Mon Sep 17 00:00:00 2001 From: AntonMFernando Date: Fri, 18 Oct 2024 00:52:07 -0400 Subject: [PATCH 12/41] modified gefs_tasks.py --- workflow/rocoto/gefs_tasks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/workflow/rocoto/gefs_tasks.py b/workflow/rocoto/gefs_tasks.py index 1951606fd0..2b8abd4aec 100644 --- a/workflow/rocoto/gefs_tasks.py +++ b/workflow/rocoto/gefs_tasks.py @@ -340,7 +340,7 @@ def wavepostsbs(self): 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', 'maxtries': '&MAXTRIES;' } - tasks = [] + task = [] fhrs = self._get_forecast_hours('gefs', self._configs['wavepostsbs']) fhr_var_dict = {'fhr': ' '.join([f"{fhr:03d}" for fhr in fhrs])} @@ -353,7 +353,7 @@ def wavepostsbs(self): member_metatask_dict = {'task_name': f'gefs_wave_post_grid', 'task_dict': fhr_metatask_dict, 'var_dict': member_var_dict} - tasks.append(rocoto.create_task(member_metatask_dict)) + task.append(rocoto.create_task(member_metatask_dict)) task = rocoto.create_task(member_metatask_dict) From ea023be05fa34f42f72e4af595e5879e48b7a7ab Mon Sep 17 00:00:00 2001 From: AntonMFernando Date: Fri, 18 Oct 2024 00:54:57 -0400 Subject: [PATCH 13/41] modified gefs_tasks.py --- workflow/rocoto/gefs_tasks.py | 1 - 1 file changed, 1 deletion(-) diff --git a/workflow/rocoto/gefs_tasks.py b/workflow/rocoto/gefs_tasks.py index 2b8abd4aec..b14a06f2a3 100644 --- a/workflow/rocoto/gefs_tasks.py +++ b/workflow/rocoto/gefs_tasks.py @@ -340,7 +340,6 @@ def wavepostsbs(self): 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', 'maxtries': '&MAXTRIES;' } - task = [] fhrs = self._get_forecast_hours('gefs', self._configs['wavepostsbs']) fhr_var_dict = {'fhr': ' '.join([f"{fhr:03d}" for fhr in fhrs])} From 3c69e48e5052a67542e317903e00b5cc964c0105 Mon Sep 17 00:00:00 2001 From: AntonMFernando Date: Fri, 18 Oct 2024 00:59:12 -0400 Subject: [PATCH 14/41] modified gefs_tasks.py --- workflow/rocoto/gefs_tasks.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/workflow/rocoto/gefs_tasks.py b/workflow/rocoto/gefs_tasks.py index b14a06f2a3..f5cd4edc91 100644 --- a/workflow/rocoto/gefs_tasks.py +++ b/workflow/rocoto/gefs_tasks.py @@ -352,8 +352,6 @@ def wavepostsbs(self): member_metatask_dict = {'task_name': f'gefs_wave_post_grid', 'task_dict': fhr_metatask_dict, 'var_dict': member_var_dict} - task.append(rocoto.create_task(member_metatask_dict)) - task = rocoto.create_task(member_metatask_dict) return task From 16205f1c65336fa7e3cf39df251288a6647e5add Mon Sep 17 00:00:00 2001 From: AntonMFernando Date: Fri, 18 Oct 2024 19:34:29 -0400 Subject: [PATCH 15/41] modified gefs_task.py --- workflow/rocoto/gefs_tasks.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/workflow/rocoto/gefs_tasks.py b/workflow/rocoto/gefs_tasks.py index f5cd4edc91..a96e3b4465 100644 --- a/workflow/rocoto/gefs_tasks.py +++ b/workflow/rocoto/gefs_tasks.py @@ -329,7 +329,7 @@ def wavepostsbs(self): wave_post_envars.append(rocoto.create_envar(name=key, value=str(value))) - task_name = f'gefs_wave_post_grid_mem#member#_f#fhr#' + task_name = f'gefs_wave_post_grid_#member#_f#fhr#' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, @@ -344,7 +344,7 @@ def wavepostsbs(self): fhrs = self._get_forecast_hours('gefs', self._configs['wavepostsbs']) fhr_var_dict = {'fhr': ' '.join([f"{fhr:03d}" for fhr in fhrs])} - fhr_metatask_dict = {'task_name': f'gefs_wave_post_grid_mem#member#', + fhr_metatask_dict = {'task_name': f'gefs_wave_post_grid_#member#', 'task_dict': task_dict, 'var_dict': fhr_var_dict} @@ -352,6 +352,7 @@ def wavepostsbs(self): member_metatask_dict = {'task_name': f'gefs_wave_post_grid', 'task_dict': fhr_metatask_dict, 'var_dict': member_var_dict} + task = rocoto.create_task(member_metatask_dict) return task From 0c7cb507446754c75bb85ec29bb986a9e08576bf Mon Sep 17 00:00:00 2001 From: AntonMFernando Date: Fri, 18 Oct 2024 19:35:22 -0400 Subject: [PATCH 16/41] modified global-workflow\scripts\exgfs_wave_post_gridded_sbs.sh --- scripts/exgfs_wave_post_gridded_sbs.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/exgfs_wave_post_gridded_sbs.sh b/scripts/exgfs_wave_post_gridded_sbs.sh index 9823d1e2ee..0dcd901116 100755 --- a/scripts/exgfs_wave_post_gridded_sbs.sh +++ b/scripts/exgfs_wave_post_gridded_sbs.sh @@ -221,14 +221,14 @@ source "${USHgfs}/preamble.sh" # 1.a.2 Loop over forecast time to generate post files # When executed side-by-side, serial mode (cfp when run after the fcst step) # Contingency for RERUN=YES - if [ "${RERUN-NO}" = "YES" ]; then + if [ "${RERUN:-NO}" = "YES" ]; then fhr=$((FHRUN + FHMIN_WAV)) if [ $FHMAX_HF_WAV -gt 0 ] && [ $FHOUT_HF_WAV -gt 0 ] && [ $fhr -lt $FHMAX_HF_WAV ]; then FHINCG=$FHOUT_HF_WAV else FHINCG=$FHOUT_WAV fi - fhr=$((fhr + FHINCG)) + fhr=$(($FORECAST_HOUR + FHINCG)) else fhr=$FHMIN_WAV fi @@ -236,7 +236,6 @@ source "${USHgfs}/preamble.sh" sleep_interval=10 iwaitmax=120 # Maximum loop cycles for waiting until wave component output file is ready (fails after max) if [ $fhr -le $FHMAX_WAV ]; then - ymdh=$($NDATE $fhr ${PDY}${cyc}) YMD=$(echo $ymdh | cut -c1-8) HMS="$(echo $ymdh | cut -c9-10)0000" From 458b1308ec3487f58d154b90b2309241c6d201d6 Mon Sep 17 00:00:00 2001 From: AntonMFernando Date: Fri, 18 Oct 2024 19:37:57 -0400 Subject: [PATCH 17/41] modified global-workflow\scripts\exgfs_wave_post_gridded_sbs.sh --- scripts/exgfs_wave_post_gridded_sbs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/exgfs_wave_post_gridded_sbs.sh b/scripts/exgfs_wave_post_gridded_sbs.sh index 0dcd901116..55414b29d2 100755 --- a/scripts/exgfs_wave_post_gridded_sbs.sh +++ b/scripts/exgfs_wave_post_gridded_sbs.sh @@ -228,7 +228,7 @@ source "${USHgfs}/preamble.sh" else FHINCG=$FHOUT_WAV fi - fhr=$(($FORECAST_HOUR + FHINCG)) + fhr=$((FORECAST_HOUR + FHINCG)) else fhr=$FHMIN_WAV fi From 027e79fee418c673399d7ef8959247dcfb49489b Mon Sep 17 00:00:00 2001 From: AntonMFernando Date: Fri, 18 Oct 2024 19:39:35 -0400 Subject: [PATCH 18/41] modifed gefs_tasks.py --- workflow/rocoto/gefs_tasks.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/workflow/rocoto/gefs_tasks.py b/workflow/rocoto/gefs_tasks.py index a96e3b4465..0e961672b8 100644 --- a/workflow/rocoto/gefs_tasks.py +++ b/workflow/rocoto/gefs_tasks.py @@ -324,11 +324,9 @@ def wavepostsbs(self): 'MEMDIR': 'mem#member#', 'FHR3': '#fhr#', } - for key, value in wave_post_dict.items(): wave_post_envars.append(rocoto.create_envar(name=key, value=str(value))) - task_name = f'gefs_wave_post_grid_#member#_f#fhr#' task_dict = {'task_name': task_name, 'resources': resources, From f75bbf379699fa30026f1ffaf5231e32ef555dd4 Mon Sep 17 00:00:00 2001 From: AntonMFernando Date: Fri, 18 Oct 2024 19:42:00 -0400 Subject: [PATCH 19/41] modified global-workflow\scripts\exgfs_wave_post_gridded_sbs.sh --- scripts/exgfs_wave_post_gridded_sbs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/exgfs_wave_post_gridded_sbs.sh b/scripts/exgfs_wave_post_gridded_sbs.sh index 55414b29d2..352f11afc1 100755 --- a/scripts/exgfs_wave_post_gridded_sbs.sh +++ b/scripts/exgfs_wave_post_gridded_sbs.sh @@ -230,7 +230,7 @@ source "${USHgfs}/preamble.sh" fi fhr=$((FORECAST_HOUR + FHINCG)) else - fhr=$FHMIN_WAV + fhr=$FORECAST_HOUR fi fhrg=$fhr sleep_interval=10 From b408e75728edb5685b752f648353968ee6a84ca7 Mon Sep 17 00:00:00 2001 From: AntonMFernando Date: Fri, 18 Oct 2024 20:01:00 -0400 Subject: [PATCH 20/41] corrected a typo --- scripts/exgfs_wave_post_gridded_sbs.sh | 2 +- workflow/rocoto/gefs_tasks.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/exgfs_wave_post_gridded_sbs.sh b/scripts/exgfs_wave_post_gridded_sbs.sh index 352f11afc1..fa90765127 100755 --- a/scripts/exgfs_wave_post_gridded_sbs.sh +++ b/scripts/exgfs_wave_post_gridded_sbs.sh @@ -222,7 +222,7 @@ source "${USHgfs}/preamble.sh" # When executed side-by-side, serial mode (cfp when run after the fcst step) # Contingency for RERUN=YES if [ "${RERUN:-NO}" = "YES" ]; then - fhr=$((FHRUN + FHMIN_WAV)) + fhr=$((FHRUN + FORECAST_HOUR + FHMIN_WAV)) if [ $FHMAX_HF_WAV -gt 0 ] && [ $FHOUT_HF_WAV -gt 0 ] && [ $fhr -lt $FHMAX_HF_WAV ]; then FHINCG=$FHOUT_HF_WAV else diff --git a/workflow/rocoto/gefs_tasks.py b/workflow/rocoto/gefs_tasks.py index 0e961672b8..4c77ed483b 100644 --- a/workflow/rocoto/gefs_tasks.py +++ b/workflow/rocoto/gefs_tasks.py @@ -478,7 +478,7 @@ def wavepostpnt(self): def extractvars(self): deps = [] if self.app_config.do_wave: - dep_dict = {'type': 'metatask', 'name': 'gefs_wave_post_grid_mem#member#'} + dep_dict = {'type': 'metatask', 'name': 'gefs_wave_post_grid_#member#'} deps.append(rocoto.add_dependency(dep_dict)) if self.app_config.do_ocean: dep_dict = {'type': 'metatask', 'name': 'gefs_ocean_prod_#member#'} From d96631ec7811669971d88a683c258a4295f40e58 Mon Sep 17 00:00:00 2001 From: AntonMFernando Date: Fri, 18 Oct 2024 20:02:22 -0400 Subject: [PATCH 21/41] mdified global-workflow\scripts\exgfs_wave_post_gridded_sbs.sh --- scripts/exgfs_wave_post_gridded_sbs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/exgfs_wave_post_gridded_sbs.sh b/scripts/exgfs_wave_post_gridded_sbs.sh index fa90765127..352f11afc1 100755 --- a/scripts/exgfs_wave_post_gridded_sbs.sh +++ b/scripts/exgfs_wave_post_gridded_sbs.sh @@ -222,7 +222,7 @@ source "${USHgfs}/preamble.sh" # When executed side-by-side, serial mode (cfp when run after the fcst step) # Contingency for RERUN=YES if [ "${RERUN:-NO}" = "YES" ]; then - fhr=$((FHRUN + FORECAST_HOUR + FHMIN_WAV)) + fhr=$((FHRUN + FHMIN_WAV)) if [ $FHMAX_HF_WAV -gt 0 ] && [ $FHOUT_HF_WAV -gt 0 ] && [ $fhr -lt $FHMAX_HF_WAV ]; then FHINCG=$FHOUT_HF_WAV else From 08c4f12517e3a5d72590743f6dd778f50c0f2f3e Mon Sep 17 00:00:00 2001 From: AntonMFernando Date: Fri, 18 Oct 2024 22:10:39 -0400 Subject: [PATCH 22/41] modified gefs_tasks.py --- workflow/rocoto/gefs_tasks.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/workflow/rocoto/gefs_tasks.py b/workflow/rocoto/gefs_tasks.py index 4c77ed483b..4ca1cc29d7 100644 --- a/workflow/rocoto/gefs_tasks.py +++ b/workflow/rocoto/gefs_tasks.py @@ -327,7 +327,7 @@ def wavepostsbs(self): for key, value in wave_post_dict.items(): wave_post_envars.append(rocoto.create_envar(name=key, value=str(value))) - task_name = f'gefs_wave_post_grid_#member#_f#fhr#' + task_name = f'gefs_wave_post_grid_mem#member#_f#fhr#' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, @@ -342,7 +342,7 @@ def wavepostsbs(self): fhrs = self._get_forecast_hours('gefs', self._configs['wavepostsbs']) fhr_var_dict = {'fhr': ' '.join([f"{fhr:03d}" for fhr in fhrs])} - fhr_metatask_dict = {'task_name': f'gefs_wave_post_grid_#member#', + fhr_metatask_dict = {'task_name': f'gefs_wave_post_grid_mem#member#', 'task_dict': task_dict, 'var_dict': fhr_var_dict} @@ -478,7 +478,7 @@ def wavepostpnt(self): def extractvars(self): deps = [] if self.app_config.do_wave: - dep_dict = {'type': 'metatask', 'name': 'gefs_wave_post_grid_#member#'} + dep_dict = {'type': 'metatask', 'name': 'gefs_wave_post_grid_mem#member#'} deps.append(rocoto.add_dependency(dep_dict)) if self.app_config.do_ocean: dep_dict = {'type': 'metatask', 'name': 'gefs_ocean_prod_#member#'} From bc74e4939c1d37aceeb1900bea1287a51ff429c5 Mon Sep 17 00:00:00 2001 From: AntonMFernando Date: Fri, 18 Oct 2024 22:35:39 -0400 Subject: [PATCH 23/41] modified gefs_tasks.py --- workflow/rocoto/gefs_tasks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/workflow/rocoto/gefs_tasks.py b/workflow/rocoto/gefs_tasks.py index 4ca1cc29d7..7a49a53cc1 100644 --- a/workflow/rocoto/gefs_tasks.py +++ b/workflow/rocoto/gefs_tasks.py @@ -342,7 +342,7 @@ def wavepostsbs(self): fhrs = self._get_forecast_hours('gefs', self._configs['wavepostsbs']) fhr_var_dict = {'fhr': ' '.join([f"{fhr:03d}" for fhr in fhrs])} - fhr_metatask_dict = {'task_name': f'gefs_wave_post_grid_mem#member#', + fhr_metatask_dict = {'task_name': f'gefs_wave_post_grid_#member#', 'task_dict': task_dict, 'var_dict': fhr_var_dict} @@ -478,7 +478,7 @@ def wavepostpnt(self): def extractvars(self): deps = [] if self.app_config.do_wave: - dep_dict = {'type': 'metatask', 'name': 'gefs_wave_post_grid_mem#member#'} + dep_dict = {'type': 'metatask', 'name': 'gefs_wave_post_grid_#member#'} deps.append(rocoto.add_dependency(dep_dict)) if self.app_config.do_ocean: dep_dict = {'type': 'metatask', 'name': 'gefs_ocean_prod_#member#'} From 99869eddda8840bf38ce0e57da77f475c848539a Mon Sep 17 00:00:00 2001 From: AntonMFernando Date: Sat, 19 Oct 2024 01:20:57 -0400 Subject: [PATCH 24/41] updated wavepostsbs.sh --- jobs/rocoto/wavepostsbs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jobs/rocoto/wavepostsbs.sh b/jobs/rocoto/wavepostsbs.sh index f4789210d8..793c233dd4 100755 --- a/jobs/rocoto/wavepostsbs.sh +++ b/jobs/rocoto/wavepostsbs.sh @@ -11,7 +11,7 @@ status=$? export job="wavepostsbs" export jobid="${job}.$$" - +export FORECAST_HOUR=$(( 10#${FHR3} )) ############################################################### # Execute the JJOB ${HOMEgfs}/jobs/JGLOBAL_WAVE_POST_SBS From f31c4c1d59c5f6d7a23e4b4626b100e499229f99 Mon Sep 17 00:00:00 2001 From: AntonMFernando Date: Tue, 22 Oct 2024 16:01:26 -0400 Subject: [PATCH 25/41] add changes --- workflow/rocoto/gefs_tasks.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/workflow/rocoto/gefs_tasks.py b/workflow/rocoto/gefs_tasks.py index 12e47b4453..7a49a53cc1 100644 --- a/workflow/rocoto/gefs_tasks.py +++ b/workflow/rocoto/gefs_tasks.py @@ -478,11 +478,7 @@ def wavepostpnt(self): def extractvars(self): deps = [] if self.app_config.do_wave: -<<<<<<< HEAD dep_dict = {'type': 'metatask', 'name': 'gefs_wave_post_grid_#member#'} -======= - dep_dict = {'type': 'task', 'name': 'gefs_wave_post_grid_mem#member#'} ->>>>>>> 720eb4c06c7ec325b2175ab5f85177225b81da87 deps.append(rocoto.add_dependency(dep_dict)) if self.app_config.do_ocean: dep_dict = {'type': 'metatask', 'name': 'gefs_ocean_prod_#member#'} From a0f6cfdcb19bd00aea3bb26a3470254aecaba081 Mon Sep 17 00:00:00 2001 From: AntonMFernando Date: Fri, 25 Oct 2024 21:02:18 -0400 Subject: [PATCH 26/41] shifted FORECAST_HOUR to scripts/ --- jobs/rocoto/wavepostsbs.sh | 1 - scripts/exgfs_wave_post_gridded_sbs.sh | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jobs/rocoto/wavepostsbs.sh b/jobs/rocoto/wavepostsbs.sh index 793c233dd4..22b8165c68 100755 --- a/jobs/rocoto/wavepostsbs.sh +++ b/jobs/rocoto/wavepostsbs.sh @@ -11,7 +11,6 @@ status=$? export job="wavepostsbs" export jobid="${job}.$$" -export FORECAST_HOUR=$(( 10#${FHR3} )) ############################################################### # Execute the JJOB ${HOMEgfs}/jobs/JGLOBAL_WAVE_POST_SBS diff --git a/scripts/exgfs_wave_post_gridded_sbs.sh b/scripts/exgfs_wave_post_gridded_sbs.sh index 352f11afc1..256b4fb4c2 100755 --- a/scripts/exgfs_wave_post_gridded_sbs.sh +++ b/scripts/exgfs_wave_post_gridded_sbs.sh @@ -33,7 +33,8 @@ # 0. Preparations source "${USHgfs}/preamble.sh" - +#set FORECAST_HOUR +export FORECAST_HOUR=$(( 10#${FHR3} )) # 0.a Basic modes of operation # Set wave model ID tag to include member number From 901a2992850bddaa8a1b0563fde256315cf0b8df Mon Sep 17 00:00:00 2001 From: AntonMFernando Date: Fri, 25 Oct 2024 21:03:16 -0400 Subject: [PATCH 27/41] modified jobs\rocoto\wavepostsbs.sh --- jobs/rocoto/wavepostsbs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jobs/rocoto/wavepostsbs.sh b/jobs/rocoto/wavepostsbs.sh index 22b8165c68..571bb01301 100755 --- a/jobs/rocoto/wavepostsbs.sh +++ b/jobs/rocoto/wavepostsbs.sh @@ -13,7 +13,7 @@ export job="wavepostsbs" export jobid="${job}.$$" ############################################################### # Execute the JJOB -${HOMEgfs}/jobs/JGLOBAL_WAVE_POST_SBS +${HOMEgfs}/jobs/JGLOBAL_WAVE_POST_SB status=$? [[ ${status} -ne 0 ]] && exit ${status} From 4fc487beb0da3a77076f4d2849efee31390a3308 Mon Sep 17 00:00:00 2001 From: AntonMFernando Date: Fri, 25 Oct 2024 21:04:06 -0400 Subject: [PATCH 28/41] modifed jobs\rocoto\wavepostsbs.sh --- jobs/rocoto/wavepostsbs.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/jobs/rocoto/wavepostsbs.sh b/jobs/rocoto/wavepostsbs.sh index 571bb01301..161b901cd4 100755 --- a/jobs/rocoto/wavepostsbs.sh +++ b/jobs/rocoto/wavepostsbs.sh @@ -11,6 +11,7 @@ status=$? export job="wavepostsbs" export jobid="${job}.$$" + ############################################################### # Execute the JJOB ${HOMEgfs}/jobs/JGLOBAL_WAVE_POST_SB From f9ed53ebef1b3e6c0e71de3efd1034ecc3d259e8 Mon Sep 17 00:00:00 2001 From: AntonMFernando Date: Fri, 25 Oct 2024 21:04:51 -0400 Subject: [PATCH 29/41] modified jobs\rocoto\wavepostsbs.sh --- jobs/rocoto/wavepostsbs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jobs/rocoto/wavepostsbs.sh b/jobs/rocoto/wavepostsbs.sh index 161b901cd4..f4789210d8 100755 --- a/jobs/rocoto/wavepostsbs.sh +++ b/jobs/rocoto/wavepostsbs.sh @@ -14,7 +14,7 @@ export jobid="${job}.$$" ############################################################### # Execute the JJOB -${HOMEgfs}/jobs/JGLOBAL_WAVE_POST_SB +${HOMEgfs}/jobs/JGLOBAL_WAVE_POST_SBS status=$? [[ ${status} -ne 0 ]] && exit ${status} From b78ea08331ed4c96bf8391ce461baa27466dd7af Mon Sep 17 00:00:00 2001 From: "Anton.Fernando" Date: Tue, 29 Oct 2024 14:09:10 -0400 Subject: [PATCH 30/41] modify scripts\exgfs_wave_post_gridded_sbs.sh --- scripts/exgfs_wave_post_gridded_sbs.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/exgfs_wave_post_gridded_sbs.sh b/scripts/exgfs_wave_post_gridded_sbs.sh index 256b4fb4c2..6b765ef323 100755 --- a/scripts/exgfs_wave_post_gridded_sbs.sh +++ b/scripts/exgfs_wave_post_gridded_sbs.sh @@ -344,11 +344,11 @@ export FORECAST_HOUR=$(( 10#${FHR3} )) if [ "$ifirst" = 'yes' ]; then echo "#!/bin/sh" > cmdmfile.$nfile echo "$nfile cmdmfile.$nfile" >> cmdmprog - chmod 744 cmdmfile.$nfile + chmod 744 "cmdmfile.$nfile" fi - echo $line >> cmdmfile.$nfile + echo $line >> "cmdmfile.$nfile" nfile=$(( nfile + 1 )) - if [ $nfile -eq $NTASKS ]; then + if [ $nfile -eq "$NTASKS" ]; then nfile=0 ifirst='no' fi @@ -392,7 +392,7 @@ export FORECAST_HOUR=$(( 10#${FHR3} )) echo ' ' set_trace err=4; export err;${errchk} - exit $err + exit "$err" fi rm -f out_grd.* # Remove large binary grid output files @@ -400,7 +400,7 @@ export FORECAST_HOUR=$(( 10#${FHR3} )) cd $DATA FHINCG=$(( DTFLD_WAV / 3600 )) - if [ $fhr = $fhrg ] + if [ "$fhr" = "$fhrg" ] then # Check if grib2 file created ENSTAG="" @@ -416,16 +416,16 @@ export FORECAST_HOUR=$(( 10#${FHR3} )) echo ' ' set_trace err=5; export err;${errchk} - exit $err + exit "$err" fi - if [ $FHMAX_HF_WAV -gt 0 ] && [ $FHOUT_HF_WAV -gt 0 ] && [ $fhr -lt $FHMAX_HF_WAV ]; then + if [ $FHMAX_HF_WAV -gt 0 ] && [ $FHOUT_HF_WAV -gt 0 ] && [ "$fhr" -lt $FHMAX_HF_WAV ]; then FHINCG=$FHOUT_HF_WAV else FHINCG=$FHOUT_WAV fi fhrg=$((fhr+FHINCG)) fi - echo $fhrg + echo "$fhrg" fhr=$fhrg #loop with out_grd stride From 232d438b0c08fde8b4e3fb6fc5c3da087004f96c Mon Sep 17 00:00:00 2001 From: "Anton.Fernando" Date: Tue, 29 Oct 2024 14:10:37 -0400 Subject: [PATCH 31/41] modified scripts\exgfs_wave_post_gridded_sbs.sh --- scripts/exgfs_wave_post_gridded_sbs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/exgfs_wave_post_gridded_sbs.sh b/scripts/exgfs_wave_post_gridded_sbs.sh index 6b765ef323..2b24021c0a 100755 --- a/scripts/exgfs_wave_post_gridded_sbs.sh +++ b/scripts/exgfs_wave_post_gridded_sbs.sh @@ -348,7 +348,7 @@ export FORECAST_HOUR=$(( 10#${FHR3} )) fi echo $line >> "cmdmfile.$nfile" nfile=$(( nfile + 1 )) - if [ $nfile -eq "$NTASKS" ]; then + if [ "$nfile" -eq "$NTASKS" ]; then nfile=0 ifirst='no' fi From 1028319587ff98df17200b13808b45f277cf8c17 Mon Sep 17 00:00:00 2001 From: AntonMFernando Date: Wed, 30 Oct 2024 19:48:04 -0400 Subject: [PATCH 32/41] modified scripts\exgfs_wave_post_gridded_sbs.sh --- scripts/exgfs_wave_post_gridded_sbs.sh | 42 +++++++++++++------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/scripts/exgfs_wave_post_gridded_sbs.sh b/scripts/exgfs_wave_post_gridded_sbs.sh index 2b24021c0a..1b463235f3 100755 --- a/scripts/exgfs_wave_post_gridded_sbs.sh +++ b/scripts/exgfs_wave_post_gridded_sbs.sh @@ -222,21 +222,21 @@ export FORECAST_HOUR=$(( 10#${FHR3} )) # 1.a.2 Loop over forecast time to generate post files # When executed side-by-side, serial mode (cfp when run after the fcst step) # Contingency for RERUN=YES - if [ "${RERUN:-NO}" = "YES" ]; then - fhr=$((FHRUN + FHMIN_WAV)) - if [ $FHMAX_HF_WAV -gt 0 ] && [ $FHOUT_HF_WAV -gt 0 ] && [ $fhr -lt $FHMAX_HF_WAV ]; then - FHINCG=$FHOUT_HF_WAV - else - FHINCG=$FHOUT_WAV - fi - fhr=$((FORECAST_HOUR + FHINCG)) - else - fhr=$FORECAST_HOUR - fi +# if [ "${RERUN:-NO}" = "YES" ]; then +# fhr=$((FHRUN + FHMIN_WAV)) +# if [ $FHMAX_HF_WAV -gt 0 ] && [ $FHOUT_HF_WAV -gt 0 ] && [ $fhr -lt $FHMAX_HF_WAV ]; then +# FHINCG=$FHOUT_HF_WAV +# else +# FHINCG=$FHOUT_WAV +# fi +# fhr=$((FORECAST_HOUR + FHINCG)) +# else +# fhr=$FORECAST_HOUR +# fi fhrg=$fhr sleep_interval=10 iwaitmax=120 # Maximum loop cycles for waiting until wave component output file is ready (fails after max) - if [ $fhr -le $FHMAX_WAV ]; then +# if [ $fhr -le $FHMAX_WAV ]; then ymdh=$($NDATE $fhr ${PDY}${cyc}) YMD=$(echo $ymdh | cut -c1-8) HMS="$(echo $ymdh | cut -c9-10)0000" @@ -418,18 +418,18 @@ export FORECAST_HOUR=$(( 10#${FHR3} )) err=5; export err;${errchk} exit "$err" fi - if [ $FHMAX_HF_WAV -gt 0 ] && [ $FHOUT_HF_WAV -gt 0 ] && [ "$fhr" -lt $FHMAX_HF_WAV ]; then - FHINCG=$FHOUT_HF_WAV - else - FHINCG=$FHOUT_WAV - fi - fhrg=$((fhr+FHINCG)) +# if [ $FHMAX_HF_WAV -gt 0 ] && [ $FHOUT_HF_WAV -gt 0 ] && [ "$fhr" -lt $FHMAX_HF_WAV ]; then +# FHINCG=$FHOUT_HF_WAV +# else +# FHINCG=$FHOUT_WAV +# fi +# fhrg=$((fhr+FHINCG)) fi - echo "$fhrg" +# echo "$fhrg" - fhr=$fhrg #loop with out_grd stride +# fhr=$fhrg #loop with out_grd stride - fi +# fi # --------------------------------------------------------------------------- # # 7. Ending output From 95d253262df1262d4d3e5e959861f3e6ae1de40a Mon Sep 17 00:00:00 2001 From: AntonMFernando Date: Wed, 30 Oct 2024 20:01:11 -0400 Subject: [PATCH 33/41] modified scripts\exgfs_wave_post_gridded_sbs.sh --- scripts/exgfs_wave_post_gridded_sbs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/exgfs_wave_post_gridded_sbs.sh b/scripts/exgfs_wave_post_gridded_sbs.sh index 1b463235f3..a3ef5d25fe 100755 --- a/scripts/exgfs_wave_post_gridded_sbs.sh +++ b/scripts/exgfs_wave_post_gridded_sbs.sh @@ -399,7 +399,7 @@ export FORECAST_HOUR=$(( 10#${FHR3} )) cd $DATA - FHINCG=$(( DTFLD_WAV / 3600 )) + # FHINCG=$(( DTFLD_WAV / 3600 )) if [ "$fhr" = "$fhrg" ] then # Check if grib2 file created From 8cbffe5a1d53825d718e370ec1ffc0e6dea07c93 Mon Sep 17 00:00:00 2001 From: AntonMFernando Date: Thu, 31 Oct 2024 12:20:54 -0400 Subject: [PATCH 34/41] modified gfs_tasks.py --- workflow/rocoto/gfs_tasks.py | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/workflow/rocoto/gfs_tasks.py b/workflow/rocoto/gfs_tasks.py index d3bb68a6b8..545b329182 100644 --- a/workflow/rocoto/gfs_tasks.py +++ b/workflow/rocoto/gfs_tasks.py @@ -1212,25 +1212,39 @@ def _atmosoceaniceprod(self, component: str): return task def wavepostsbs(self): + + resources = self.get_resource('wavepostsbs') deps = [] dep_dict = {'type': 'metatask', 'name': f'{self.run}_fcst'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) - resources = self.get_resource('wavepostsbs') - task_name = f'{self.run}_wavepostsbs' + wave_post_envars = self.envars.copy() + wave_post_dict = {'FHR3': '#fhr#'} + for key, value in wave_post_dict.items(): + wave_post_envars.append(rocoto.create_envar(name=key, value=str(value))) + + cycledef = 'gdas_half, gdas' if self.run in ['gdas'] else self.run + task_name = f'gfs_wave_post_grid_f#fhr#' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, - 'envars': self.envars, - 'cycledef': self.run.replace('enkf', ''), + 'envars': wave_post_envars, + 'cycledef': cycledef, 'command': f'{self.HOMEgfs}/jobs/rocoto/wavepostsbs.sh', 'job_name': f'{self.pslot}_{task_name}_@H', 'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log', 'maxtries': '&MAXTRIES;' } - task = rocoto.create_task(task_dict) + fhrs = self._get_forecast_hours('gefs', self._configs['wavepostsbs']) + + member_var_dict = {'fhr': ' '.join([f"{fhr:03d}" for fhr in fhrs])} + metatask_dict = {'task_name': f'gfs_wave_post_grid', + 'task_dict': task_dict, + 'var_dict': member_var_dict} + + task = rocoto.create_task(metatask_dict) return task From bad725039da0b604711df28a977a89becc904b2e Mon Sep 17 00:00:00 2001 From: AntonMFernando Date: Thu, 31 Oct 2024 13:00:50 -0400 Subject: [PATCH 35/41] modified gfs_tasks.py --- workflow/rocoto/gfs_tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflow/rocoto/gfs_tasks.py b/workflow/rocoto/gfs_tasks.py index 545b329182..a42a66aa2c 100644 --- a/workflow/rocoto/gfs_tasks.py +++ b/workflow/rocoto/gfs_tasks.py @@ -1224,7 +1224,7 @@ def wavepostsbs(self): for key, value in wave_post_dict.items(): wave_post_envars.append(rocoto.create_envar(name=key, value=str(value))) - cycledef = 'gdas_half, gdas' if self.run in ['gdas'] else self.run + cycledef = 'gdas_half,gdas' if self.run in ['gdas'] else self.run task_name = f'gfs_wave_post_grid_f#fhr#' task_dict = {'task_name': task_name, 'resources': resources, From 4db4b825dbf5adc183b2283294c5f9624832c520 Mon Sep 17 00:00:00 2001 From: AntonMFernando Date: Thu, 31 Oct 2024 13:07:37 -0400 Subject: [PATCH 36/41] modified workflow\rocoto\gfs_tasks.py --- workflow/rocoto/gfs_tasks.py | 1 - 1 file changed, 1 deletion(-) diff --git a/workflow/rocoto/gfs_tasks.py b/workflow/rocoto/gfs_tasks.py index a42a66aa2c..8ec2aa1475 100644 --- a/workflow/rocoto/gfs_tasks.py +++ b/workflow/rocoto/gfs_tasks.py @@ -1212,7 +1212,6 @@ def _atmosoceaniceprod(self, component: str): return task def wavepostsbs(self): - resources = self.get_resource('wavepostsbs') deps = [] dep_dict = {'type': 'metatask', 'name': f'{self.run}_fcst'} From 96934cac1e3bd0462b4733164b5576fc7b68829c Mon Sep 17 00:00:00 2001 From: AntonMFernando Date: Thu, 31 Oct 2024 15:13:06 -0400 Subject: [PATCH 37/41] modified gfs_tasks.py --- workflow/rocoto/gfs_tasks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/workflow/rocoto/gfs_tasks.py b/workflow/rocoto/gfs_tasks.py index 8ec2aa1475..ac3b7219da 100644 --- a/workflow/rocoto/gfs_tasks.py +++ b/workflow/rocoto/gfs_tasks.py @@ -1212,6 +1212,7 @@ def _atmosoceaniceprod(self, component: str): return task def wavepostsbs(self): + resources = self.get_resource('wavepostsbs') deps = [] dep_dict = {'type': 'metatask', 'name': f'{self.run}_fcst'} @@ -1237,7 +1238,7 @@ def wavepostsbs(self): } fhrs = self._get_forecast_hours('gefs', self._configs['wavepostsbs']) - + member_var_dict = {'fhr': ' '.join([f"{fhr:03d}" for fhr in fhrs])} metatask_dict = {'task_name': f'gfs_wave_post_grid', 'task_dict': task_dict, From cb6881da8c363411b528d8863704e64d216d4ebb Mon Sep 17 00:00:00 2001 From: AntonMFernando Date: Thu, 31 Oct 2024 15:14:58 -0400 Subject: [PATCH 38/41] modified workflow\rocoto\gfs_tasks.py --- workflow/rocoto/gfs_tasks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/workflow/rocoto/gfs_tasks.py b/workflow/rocoto/gfs_tasks.py index ac3b7219da..c21d990dc6 100644 --- a/workflow/rocoto/gfs_tasks.py +++ b/workflow/rocoto/gfs_tasks.py @@ -1241,8 +1241,8 @@ def wavepostsbs(self): member_var_dict = {'fhr': ' '.join([f"{fhr:03d}" for fhr in fhrs])} metatask_dict = {'task_name': f'gfs_wave_post_grid', - 'task_dict': task_dict, - 'var_dict': member_var_dict} + 'task_dict': task_dict, + 'var_dict': member_var_dict} task = rocoto.create_task(metatask_dict) From d378f80700de169bc3069637f943433d9bdb66e5 Mon Sep 17 00:00:00 2001 From: AntonMFernando Date: Thu, 31 Oct 2024 15:33:24 -0400 Subject: [PATCH 39/41] modified scripts\exgfs_wave_post_gridded_sbs.sh --- scripts/exgfs_wave_post_gridded_sbs.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/exgfs_wave_post_gridded_sbs.sh b/scripts/exgfs_wave_post_gridded_sbs.sh index a3ef5d25fe..ae4da67b9b 100755 --- a/scripts/exgfs_wave_post_gridded_sbs.sh +++ b/scripts/exgfs_wave_post_gridded_sbs.sh @@ -233,6 +233,7 @@ export FORECAST_HOUR=$(( 10#${FHR3} )) # else # fhr=$FORECAST_HOUR # fi + fhr=$FORECAST_HOUR fhrg=$fhr sleep_interval=10 iwaitmax=120 # Maximum loop cycles for waiting until wave component output file is ready (fails after max) From d279aa25dad012fa460fe2fbc8c38a6c844db986 Mon Sep 17 00:00:00 2001 From: AntonMFernando Date: Fri, 1 Nov 2024 12:13:27 -0400 Subject: [PATCH 40/41] modifed workflow\rocoto\gfs_tasks.py --- workflow/rocoto/gfs_tasks.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/workflow/rocoto/gfs_tasks.py b/workflow/rocoto/gfs_tasks.py index c21d990dc6..17edbb864d 100644 --- a/workflow/rocoto/gfs_tasks.py +++ b/workflow/rocoto/gfs_tasks.py @@ -1225,7 +1225,7 @@ def wavepostsbs(self): wave_post_envars.append(rocoto.create_envar(name=key, value=str(value))) cycledef = 'gdas_half,gdas' if self.run in ['gdas'] else self.run - task_name = f'gfs_wave_post_grid_f#fhr#' + task_name = f'{self.run}_wavepostsbs_f#fhr#' task_dict = {'task_name': task_name, 'resources': resources, 'dependency': dependencies, @@ -1240,7 +1240,7 @@ def wavepostsbs(self): fhrs = self._get_forecast_hours('gefs', self._configs['wavepostsbs']) member_var_dict = {'fhr': ' '.join([f"{fhr:03d}" for fhr in fhrs])} - metatask_dict = {'task_name': f'gfs_wave_post_grid', + metatask_dict = {'task_name': f'{self.run}_wavepostsbs', 'task_dict': task_dict, 'var_dict': member_var_dict} @@ -1328,7 +1328,7 @@ def wavepostpnt(self): def wavegempak(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.run}_wavepostsbs'} + dep_dict = {'type': 'task', 'name': f'{self.run}_wavepostsbs_f#fhr#'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) @@ -1351,7 +1351,7 @@ def wavegempak(self): def waveawipsbulls(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.run}_wavepostsbs'} + dep_dict = {'type': 'task', 'name': f'{self.run}_wavepostsbs_f#fhr#'} deps.append(rocoto.add_dependency(dep_dict)) dep_dict = {'type': 'task', 'name': f'{self.run}_wavepostpnt'} deps.append(rocoto.add_dependency(dep_dict)) @@ -1376,7 +1376,7 @@ def waveawipsbulls(self): def waveawipsgridded(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.run}_wavepostsbs'} + dep_dict = {'type': 'task', 'name': f'{self.run}_wavepostsbs_f#fhr#'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) @@ -2313,7 +2313,7 @@ def arch(self): dep_dict = {'type': 'metatask', 'name': f'{self.run}_atmos_prod'} deps.append(rocoto.add_dependency(dep_dict)) if self.app_config.do_wave: - dep_dict = {'type': 'task', 'name': f'{self.run}_wavepostsbs'} + dep_dict = {'type': 'task', 'name': f'{self.run}_wavepostsbs_f#fhr#'} deps.append(rocoto.add_dependency(dep_dict)) dep_dict = {'type': 'task', 'name': f'{self.run}_wavepostpnt'} deps.append(rocoto.add_dependency(dep_dict)) From a179f2b79bc17f99f0860a5a06b24f6295379858 Mon Sep 17 00:00:00 2001 From: AntonMFernando Date: Fri, 1 Nov 2024 19:13:01 -0400 Subject: [PATCH 41/41] modified workflow\rocoto\gfs_tasks.py --- workflow/rocoto/gfs_tasks.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/workflow/rocoto/gfs_tasks.py b/workflow/rocoto/gfs_tasks.py index 17edbb864d..b5fd21ee79 100644 --- a/workflow/rocoto/gfs_tasks.py +++ b/workflow/rocoto/gfs_tasks.py @@ -1328,7 +1328,7 @@ def wavepostpnt(self): def wavegempak(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.run}_wavepostsbs_f#fhr#'} + dep_dict = {'type': 'metatask', 'name': f'{self.run}_wavepostsbs'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) @@ -1351,7 +1351,7 @@ def wavegempak(self): def waveawipsbulls(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.run}_wavepostsbs_f#fhr#'} + dep_dict = {'type': 'metatask', 'name': f'{self.run}_wavepostsbs'} deps.append(rocoto.add_dependency(dep_dict)) dep_dict = {'type': 'task', 'name': f'{self.run}_wavepostpnt'} deps.append(rocoto.add_dependency(dep_dict)) @@ -1376,7 +1376,7 @@ def waveawipsbulls(self): def waveawipsgridded(self): deps = [] - dep_dict = {'type': 'task', 'name': f'{self.run}_wavepostsbs_f#fhr#'} + dep_dict = {'type': 'metatask', 'name': f'{self.run}_wavepostsbs'} deps.append(rocoto.add_dependency(dep_dict)) dependencies = rocoto.create_dependency(dep=deps) @@ -2313,7 +2313,7 @@ def arch(self): dep_dict = {'type': 'metatask', 'name': f'{self.run}_atmos_prod'} deps.append(rocoto.add_dependency(dep_dict)) if self.app_config.do_wave: - dep_dict = {'type': 'task', 'name': f'{self.run}_wavepostsbs_f#fhr#'} + dep_dict = {'type': 'metatask', 'name': f'{self.run}_wavepostsbs'} deps.append(rocoto.add_dependency(dep_dict)) dep_dict = {'type': 'task', 'name': f'{self.run}_wavepostpnt'} deps.append(rocoto.add_dependency(dep_dict))