diff --git a/jobs/JGLOBAL_ATMOS_POST b/jobs/JGLOBAL_ATMOS_POST index a0cd8871e1..07890b9df5 100755 --- a/jobs/JGLOBAL_ATMOS_POST +++ b/jobs/JGLOBAL_ATMOS_POST @@ -17,18 +17,6 @@ export g2tmpl_ver=${g2tmpl_ver:-v1.5.0} ############################################## export CDUMP=${RUN/enkf} - -############################################## -# TODO: Remove this egregious HACK -############################################## -if [[ "${SDATE:-}" = "${PDY}${cyc}" ]]; then - if [[ ${post_times} = "anl" ]]; then - echo "No offline post-processing in the first half cycle for analysis" - exit 0 - fi -fi - - ############################################## # Begin JOB SPECIFIC work ############################################## diff --git a/jobs/rocoto/post.sh b/jobs/rocoto/post.sh index e84b2b7b71..c91b9d4679 100755 --- a/jobs/rocoto/post.sh +++ b/jobs/rocoto/post.sh @@ -4,7 +4,6 @@ source "${HOMEgfs}/ush/preamble.sh" ############################################################### ## NCEP post driver script -## FHRGRP : forecast hour group to post-process (e.g. 0, 1, 2 ...) ## FHRLST : forecast hourlist to be post-process (e.g. anl, f000, f000_f001_f002, ...) ############################################################### @@ -16,11 +15,7 @@ status=$? export job="post" export jobid="${job}.$$" -if [ ${FHRGRP} = 'anl' ]; then - fhrlst="anl" -else - fhrlst=$(echo ${FHRLST} | sed -e 's/_/ /g; s/f/ /g; s/,/ /g') -fi +fhrlst=$(echo ${FHRLST} | sed -e 's/_/ /g; s/f/ /g; s/,/ /g') #--------------------------------------------------------------- for fhr in ${fhrlst}; do diff --git a/jobs/rocoto/postanl.sh b/jobs/rocoto/postanl.sh new file mode 120000 index 0000000000..29e1fc721f --- /dev/null +++ b/jobs/rocoto/postanl.sh @@ -0,0 +1 @@ +post.sh \ No newline at end of file diff --git a/workflow/applications/gfs_cycled.py b/workflow/applications/gfs_cycled.py index 6eff929d5f..6edd6bc0d8 100644 --- a/workflow/applications/gfs_cycled.py +++ b/workflow/applications/gfs_cycled.py @@ -101,7 +101,7 @@ def get_task_names(self): """ gdas_gfs_common_tasks_before_fcst = ['prep'] - gdas_gfs_common_tasks_after_fcst = ['post'] + gdas_gfs_common_tasks_after_fcst = ['postanl', 'post'] # if self.do_ocean: # TODO: uncomment when ocnpost is fixed in cycled mode # gdas_gfs_common_tasks_after_fcst += ['ocnpost'] gdas_gfs_common_tasks_after_fcst += ['vrfy'] diff --git a/workflow/hosts/awspw.yaml b/workflow/hosts/awspw.yaml index ee4999d4f8..becb38e236 100644 --- a/workflow/hosts/awspw.yaml +++ b/workflow/hosts/awspw.yaml @@ -21,4 +21,4 @@ LOCALARCH: 'NO' ATARDIR: '/NCEPDEV/${HPSS_PROJECT}/1year/${USER}/${machine}/scratch/${PSLOT}' # TODO: This will not yet work from AWS. MAKE_NSSTBUFR: 'NO' MAKE_ACFTBUFR: 'NO' -SUPPORTED_RESOLUTIONS: ['C48'] # TODO: Test and support all cubed-sphere resolutions. +SUPPORTED_RESOLUTIONS: ['C48', 'C96'] # TODO: Test and support all cubed-sphere resolutions. diff --git a/workflow/rocoto/gfs_tasks.py b/workflow/rocoto/gfs_tasks.py index 55055a46ee..ca9af5af7d 100644 --- a/workflow/rocoto/gfs_tasks.py +++ b/workflow/rocoto/gfs_tasks.py @@ -549,24 +549,37 @@ def _fcst_cycled(self): return task def post(self): - add_anl_to_post = False - if self.app_config.mode in ['cycled']: - add_anl_to_post = True + return self._post_task('post') + + def postanl(self): + postenvars = self.envars.copy() + postenvar_dict = {'FHRLST': 'anl', + 'ROTDIR': self._base.get('ROTDIR')} + + for key, value in postenvar_dict.items(): + postenvars.append(rocoto.create_envar(name=key, value=str(value))) - return self._post_task('post', add_anl_to_post=add_anl_to_post) + deps = [] + atm_anl_path = self._template_to_rocoto_cycstring(self._base["COM_ATMOS_ANALYSIS_TMPL"]) + data = f'{atm_anl_path}/{self.cdump}.t@Hz.loganl.txt' + dep_dict = {'type': 'data', 'data': data} + deps.append(rocoto.add_dependency(dep_dict)) + dependencies = rocoto.create_dependency(dep=deps) + resources = self.get_resource('post') + task = create_wf_task('postanl', resources, cdump=self.cdump, envar=postenvars, dependency=dependencies, + cycledef=self.cdump) + + return task def ocnpost(self): if self.app_config.mode in ['forecast-only']: # TODO: fix ocnpost in cycled mode - return self._post_task('ocnpost', add_anl_to_post=False) + return self._post_task('ocnpost') - def _post_task(self, task_name, add_anl_to_post=False): + def _post_task(self, task_name): if task_name not in ['post', 'ocnpost']: raise KeyError(f'Invalid post-processing task: {task_name}') - if task_name in ['ocnpost']: - add_anl_to_post = False - - def _get_postgroups(cdump, config, add_anl=False): + def _get_postgroups(cdump, config): fhmin = config['FHMIN'] fhmax = config['FHMAX'] @@ -591,8 +604,6 @@ def _get_postgroups(cdump, config, add_anl=False): fhrs = [f'f{fhr:03d}' for fhr in fhrs] fhrs = np.array_split(fhrs, ngrps) fhrs = [fhr.tolist() for fhr in fhrs] - if add_anl: - fhrs.insert(0, ['anl']) grp = ' '.join(f'_{fhr[0]}-{fhr[-1]}' if len(fhr) > 1 else f'_{fhr[0]}' for fhr in fhrs) dep = ' '.join([fhr[-1] for fhr in fhrs]) @@ -610,14 +621,13 @@ def _get_postgroups(cdump, config, add_anl=False): dependencies = rocoto.create_dependency(dep_condition='or', dep=deps) postenvars = self.envars.copy() - postenvar_dict = {'FHRGRP': '#grp#', - 'FHRLST': '#lst#', + postenvar_dict = {'FHRLST': '#lst#', 'ROTDIR': self._base.get('ROTDIR')} for key, value in postenvar_dict.items(): postenvars.append(rocoto.create_envar(name=key, value=str(value))) varname1, varname2, varname3 = 'grp', 'dep', 'lst' - varval1, varval2, varval3 = _get_postgroups(self.cdump, self._configs[task_name], add_anl=add_anl_to_post) + varval1, varval2, varval3 = _get_postgroups(self.cdump, self._configs[task_name]) vardict = {varname2: varval2, varname3: varval3} cycledef = 'gdas_half,gdas' if self.cdump in ['gdas'] else self.cdump