Skip to content

Commit

Permalink
SDATE_GFS in the context of metp is the first date that METP was run …
Browse files Browse the repository at this point in the history
…and started generating statistics. This is different when doing cycled (gfs_cyc determines SDATE_GFS). In the case of forecast-only, SDATE_GFS is always the first free-forecast
  • Loading branch information
aerorahul committed Jul 17, 2023
1 parent 653a897 commit a62f37a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions workflow/rocoto/gfs_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -890,9 +890,11 @@ def metp(self):
dependencies = rocoto.create_dependency(dep_condition='and', dep=deps)

metpenvars = self.envars.copy()
metpenvar_dict = {'SDATE_GFS': self._base.get('SDATE_GFS'),
# TODO - in Forecast-only, this is `SDATE` on the RHS
'METPCASE': '#metpcase#'}
if self.app_config.mode in ['cycled']:
metpenvar_dict = {'SDATE_GFS': self._base.get('SDATE_GFS').strftime("%Y%m%d%H")}
elif self.app_config.mode in ['forecast-only']:
metpenvar_dict = {'SDATE_GFS': self._base.get('SDATE').strftime("%Y%m%d%H")}
metpenvar_dict['METPCASE'] = '#metpcase#'
for key, value in metpenvar_dict.items():
metpenvars.append(rocoto.create_envar(name=key, value=str(value)))

Expand Down

0 comments on commit a62f37a

Please sign in to comment.