Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 12 additions & 0 deletions jobs/rocoto/aeroanlfinal.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#! /usr/bin/env bash

source "$HOMEgfs/ush/preamble.sh"

###############################################################
# Source FV3GFS workflow modules
. $HOMEgfs/ush/load_fv3gfs_modules.sh
status=$?
[[ $status -ne 0 ]] && exit $status

###############################################################
echo "Do nothing for now"
12 changes: 12 additions & 0 deletions jobs/rocoto/aeroanlinit.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#! /usr/bin/env bash

source "$HOMEgfs/ush/preamble.sh"

###############################################################
# Source FV3GFS workflow modules
. $HOMEgfs/ush/load_fv3gfs_modules.sh
status=$?
[[ $status -ne 0 ]] && exit $status

###############################################################
echo "Do nothing for now"
12 changes: 12 additions & 0 deletions jobs/rocoto/aeroanlrun.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#! /usr/bin/env bash

source "$HOMEgfs/ush/preamble.sh"

###############################################################
# Source FV3GFS workflow modules
. $HOMEgfs/ush/load_fv3gfs_modules.sh
status=$?
[[ $status -ne 0 ]] && exit $status

###############################################################
echo "Do nothing for now"
4 changes: 3 additions & 1 deletion jobs/rocoto/atmanalpost.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/bash -x
#! /usr/bin/env bash

source "$HOMEgfs/ush/preamble.sh"

###############################################################
# Source FV3GFS workflow modules
Expand Down
4 changes: 3 additions & 1 deletion jobs/rocoto/atmanalprep.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/bash -x
#! /usr/bin/env bash

source "$HOMEgfs/ush/preamble.sh"

###############################################################
# Source FV3GFS workflow modules
Expand Down
4 changes: 3 additions & 1 deletion jobs/rocoto/atmanalrun.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/bash -x
#! /usr/bin/env bash

source "$HOMEgfs/ush/preamble.sh"

###############################################################
# Source FV3GFS workflow modules
Expand Down
4 changes: 3 additions & 1 deletion jobs/rocoto/atmensanalpost.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/bash -x
#! /usr/bin/env bash

source "$HOMEgfs/ush/preamble.sh"

###############################################################
# Source FV3GFS workflow modules
Expand Down
4 changes: 3 additions & 1 deletion jobs/rocoto/atmensanalprep.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/bash -x
#! /usr/bin/env bash

source "$HOMEgfs/ush/preamble.sh"

###############################################################
# Source FV3GFS workflow modules
Expand Down
4 changes: 3 additions & 1 deletion jobs/rocoto/atmensanalrun.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/bash -x
#! /usr/bin/env bash

source "$HOMEgfs/ush/preamble.sh"

###############################################################
# Source FV3GFS workflow modules
Expand Down
6 changes: 6 additions & 0 deletions workflow/applications.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,9 @@ def _cycled_configs(self):
if self.do_wafs:
configs += ['wafs', 'wafsgrib2', 'wafsblending', 'wafsgcip', 'wafsgrib20p25', 'wafsblending0p25']

if self.do_aero:
configs += ['aeroanlinit', 'aeroanlrun', 'aeroanlfinal']

return configs

@property
Expand Down Expand Up @@ -348,6 +351,9 @@ def _get_cycled_task_names(self):

gdas_gfs_common_tasks_before_fcst += ['sfcanl', 'analcalc']

if self.do_aero:
gdas_gfs_common_tasks_before_fcst += ['aeroanlinit', 'aeroanlrun', 'aeroanlfinal']

gldas_tasks = ['gldas']
wave_prep_tasks = ['waveinit', 'waveprep']
wave_bndpnt_tasks = ['wavepostbndpnt', 'wavepostbndpntbll']
Expand Down
53 changes: 50 additions & 3 deletions workflow/rocoto/workflow_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class Tasks:
'earc', 'ecen', 'echgres', 'ediag', 'efcs',
'eobs', 'eomg', 'epos', 'esfc', 'eupd',
'atmensanalprep', 'atmensanalrun', 'atmensanalpost',
'aeroanlinit', 'aeroanlrun', 'aeroanlfinal',
'fcst', 'post', 'ocnpost', 'vrfy', 'metp',
'postsnd', 'awips', 'gempak',
'wafs', 'wafsblending', 'wafsblending0p25',
Expand Down Expand Up @@ -450,6 +451,54 @@ def atmanalpost(self):

return task

def aeroanlinit(self):

suffix = self._base["SUFFIX"]
dump_suffix = self._base["DUMP_SUFFIX"]
gfs_cyc = self._base["gfs_cyc"]
dmpdir = self._base["DMPDIR"]

deps = []
dep_dict = {'type': 'metatask', 'name': 'gdaspost', 'offset': '-06:00:00'}
deps.append(rocoto.add_dependency(dep_dict))
data = f'&ROTDIR;/gdas.@Y@m@d/@H/atmos/gdas.t@Hz.atmf009{suffix}'
dep_dict = {'type': 'data', 'data': data, 'offset': '-06:00:00'}
deps.append(rocoto.add_dependency(dep_dict))
data = f'{dmpdir}/{self.cdump}{dump_suffix}.@Y@m@d/@H/{self.cdump}.t@Hz.updated.status.tm00.bufr_d'
dep_dict = {'type': 'data', 'data': data}
deps.append(rocoto.add_dependency(dep_dict))
dependencies = rocoto.create_dependency(dep_condition='and', dep=deps)

resources = self.get_resource('aeroanlinit')
task = create_wf_task('aeroanlinit', resources, cdump=self.cdump, envar=self.envars, dependency=dependencies)
return task

def aeroanlrun(self):

deps = []
dep_dict = {'type': 'task', 'name': f'{self.cdump}aeroanlinit'}
deps.append(rocoto.add_dependency(dep_dict))
dependencies = rocoto.create_dependency(dep=deps)

resources = self.get_resource('aeroanlrun')
task = create_wf_task('aeroanlrun', resources, cdump=self.cdump, envar=self.envars, dependency=dependencies)

return task

def aeroanlfinal(self):

deps = []
dep_dict = {'type': 'task', 'name': f'{self.cdump}aeroanlrun'}
deps.append(rocoto.add_dependency(dep_dict))
dep_dict = {'type': 'cycleexist', 'offset': '-06:00:00'}
deps.append(rocoto.add_dependency(dep_dict))
dependencies = rocoto.create_dependency(dep_condition='and', dep=deps)

resources = self.get_resource('aeroanlfinal')
task = create_wf_task('aeroanlfinal', resources, cdump=self.cdump, envar=self.envars, dependency=dependencies)

return task

def gldas(self):

deps = []
Expand All @@ -470,15 +519,14 @@ def fcst(self):
'cycled': self._fcst_cycled}

try:
task = fcst_map[self.app_config.mode]
task = fcst_map[self.app_config.mode]()
except KeyError:
raise NotImplementedError(f'{self.app_config.mode} is not a valid type.\n' +
'Currently supported forecast types are:\n' +
f'{" | ".join(fcst_map.keys())}')

return task

@property
def _fcst_forecast_only(self):
dependencies = []

Expand Down Expand Up @@ -531,7 +579,6 @@ def _fcst_forecast_only(self):

return task

@property
def _fcst_cycled(self):

dep_dict = {'type': 'task', 'name': f'{self.cdump}sfcanl'}
Expand Down
2 changes: 1 addition & 1 deletion workflow/rocoto/workflow_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def _get_cycledefs_cycled(self):
sdate = self._base['SDATE'].strftime('%Y%m%d%H%M')
edate = self._base['EDATE'].strftime('%Y%m%d%H%M')
interval = self._base.get('INTERVAL', '06:00:00')
strings = [f'\t<cycledef group="gdas" >{sdate} {edate} {interval}</cycledef>']
strings = [f'\t<cycledef group="gdas" >{sdate} {edate} {interval}</cycledef>\n']

if self._app_config.gfs_cyc != 0:
sdate_gfs = self._base['SDATE_GFS'].strftime('%Y%m%d%H%M')
Expand Down
2 changes: 1 addition & 1 deletion workflow/setup_expt.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def input_args():
cycled.add_argument('--nens', help='number of ensemble members',
type=int, required=False, default=20)
cycled.add_argument('--app', help='UFS application', type=str,
choices=['ATM', 'ATMW'], required=False, default='ATM')
choices=['ATM', 'ATMW', 'ATMA'], required=False, default='ATM')
Comment thread
aerorahul marked this conversation as resolved.

# forecast only mode additional arguments
forecasts.add_argument('--app', help='UFS application', type=str, choices=[
Expand Down