Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Early Cycle EnKF workflow #1022

Merged
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
fe6f07f
Fix a bug to exclude the unsued tasks for cycled gfs
XianwuXue-NOAA Sep 19, 2022
39ad8dd
Merge branch 'develop' into feature/dev_early_enkf
XianwuXue-NOAA Sep 26, 2022
fa542cb
Modify to add task for cycled gfs
XianwuXue-NOAA Sep 27, 2022
c5bcede
Merge branch 'develop' into feature/dev_early_enkf
XianwuXue-NOAA Sep 27, 2022
f4b0732
Remove echgres for cycled gfs
XianwuXue-NOAA Sep 28, 2022
837931d
Change eupd_cdump to cdump and change hard coded gdas to cdump
XianwuXue-NOAA Sep 28, 2022
05b362a
Change back for echgres funtion because cycled gfs doesn't run it
XianwuXue-NOAA Sep 28, 2022
3d43242
Merge branch 'develop' into feature/dev_early_enkf
XianwuXue-NOAA Oct 6, 2022
0a29772
Merge branch 'develop' into feature/dev_early_enkf
XianwuXue-NOAA Oct 8, 2022
201fa98
Improve to run early enkf
XianwuXue-NOAA Oct 11, 2022
3bc3245
Merge branch 'develop' into feature/dev_early_enkf
XianwuXue-NOAA Oct 11, 2022
830b374
Merge branch 'develop' into feature/dev_early_enkf
XianwuXue-NOAA Oct 18, 2022
cc81ee2
Delete the unused statements
XianwuXue-NOAA Oct 20, 2022
ce13ea9
Update to GDUMP to point the early-cycle to the correct directory
XianwuXue-NOAA Oct 20, 2022
33a1f0d
Modify to run gfsefcsN for early cycle enkf
XianwuXue-NOAA Oct 20, 2022
554d1a5
Merge branch 'develop' into feature/dev_early_enkf
XianwuXue-NOAA Oct 20, 2022
ed556b8
To fix lint error
XianwuXue-NOAA Oct 22, 2022
8eef956
To fix the lint error Error: SHELLCHECK_WARNING
XianwuXue-NOAA Oct 22, 2022
1e31cf7
Merge branch 'develop' into feature/dev_early_enkf
XianwuXue-NOAA Oct 26, 2022
2e58e0a
Remove the dead code
XianwuXue-NOAA Oct 26, 2022
3db80e3
Delete the unused codes
XianwuXue-NOAA Oct 26, 2022
2f089d7
Merge branch 'develop' into feature/dev_early_enkf
XianwuXue-NOAA Oct 28, 2022
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
4 changes: 2 additions & 2 deletions jobs/JGDAS_ENKF_ECEN
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ fi
export OPREFIX="${CDUMP}.t${cyc}z."
export APREFIX="${CDUMP}.t${cyc}z."
export APREFIX_ENKF="${CDUMP_ENKF}.t${cyc}z."
export GPREFIX="${CDUMP}.t${gcyc}z."
WalterKolczynski-NOAA marked this conversation as resolved.
Show resolved Hide resolved
export GPREFIX="${GDUMP}.t${gcyc}z."
export GSUFFIX=${GSUFFIX:-$SUFFIX}
export ASUFFIX=${ASUFFIX:-$SUFFIX}

Expand All @@ -96,7 +96,7 @@ fi
export COMIN="$ROTDIR/$CDUMP.$PDY/$cyc/$COMPONENT"
export COMIN_ENS="$ROTDIR/enkf$CDUMP_ENKF.$PDY/$cyc/$COMPONENT"
export COMOUT_ENS="$ROTDIR/enkf$CDUMP.$PDY/$cyc/$COMPONENT"
export COMIN_GES_ENS="$ROTDIR/enkf$CDUMP.$gPDY/$gcyc/$COMPONENT"
WalterKolczynski-NOAA marked this conversation as resolved.
Show resolved Hide resolved
export COMIN_GES_ENS="$ROTDIR/enkf$GDUMP.$gPDY/$gcyc/$COMPONENT"


###############################################################
Expand Down
2 changes: 1 addition & 1 deletion jobs/JGDAS_ENKF_SFC
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export COMIN="$ROTDIR/$CDUMP.$PDY/$cyc/$COMPONENT"
export COMIN_GES="$ROTDIR/$CDUMP.$gPDY/$gcyc/$COMPONENT"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure $CDUMP here in line 97 and in line 83 are also updated to $GDUMP to point the early-cycle to the correct directory

export COMIN_ENS="$ROTDIR/enkf$CDUMP_ENKF.$PDY/$cyc/$COMPONENT"
export COMOUT_ENS="$ROTDIR/enkf$CDUMP.$PDY/$cyc/$COMPONENT"
export COMIN_GES_ENS="$ROTDIR/enkf$CDUMP.$gPDY/$gcyc/$COMPONENT"
WalterKolczynski-NOAA marked this conversation as resolved.
Show resolved Hide resolved
export COMIN_GES_ENS="$ROTDIR/enkf$GDUMP.$gPDY/$gcyc/$COMPONENT"


###############################################################
Expand Down
2 changes: 1 addition & 1 deletion parm/config/config.anal
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ if [[ "$CDUMP" = "gfs" ]] ; then
export USE_RADSTAT="NO" # This can be only used when bias correction is not-zero.
export GENDIAG="NO"
export SETUP='diag_rad=.false.,diag_pcp=.false.,diag_conv=.false.,diag_ozone=.false.,write_diag(3)=.false.,niter(2)=100,'
export DIAG_TARBALL="NO"
export DIAG_TARBALL="YES"
fi

export npe_gsi=$npe_anal
Expand Down
7 changes: 4 additions & 3 deletions ush/calcanl_gfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ def calcanl_gfs(DoIAU, l4DEnsVar, Write4Danl, ComOut, APrefix, ASuffix,

IAUHH = IAUHrs
if Cdump == "gfs":
IAUHH = list(map(int,'6'))
#IAUHH = list(map(int,'6'))
WalterKolczynski-NOAA marked this conversation as resolved.
Show resolved Hide resolved
IAUHH = IAUHrs
else:
IAUHH = IAUHrs

Expand All @@ -40,7 +41,7 @@ def calcanl_gfs(DoIAU, l4DEnsVar, Write4Danl, ComOut, APrefix, ASuffix,
gsi_utils.link_file(RunDir+'/siganl', CalcAnlDir+'/anl.06')
gsi_utils.copy_file(ExecChgresInc, CalcAnlDir+'/chgres_inc.x')
# for ensemble res analysis
if Cdump == "gdas":
if Cdump in ["gdas", "gfs"]:
CalcAnlDir = RunDir+'/calcanl_ensres_'+format(fh, '02')
if not os.path.exists(CalcAnlDir):
gsi_utils.make_dir(CalcAnlDir)
Expand Down Expand Up @@ -304,7 +305,7 @@ def calcanl_gfs(DoIAU, l4DEnsVar, Write4Danl, ComOut, APrefix, ASuffix,


######## compute determinstic analysis on ensemble resolution
if Cdump == "gdas":
if Cdump in ["gdas", "gfs"]:
chgres_jobs = []
for fh in IAUHH:
# first check to see if guess file exists
Expand Down
21 changes: 11 additions & 10 deletions workflow/applications.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,15 +359,15 @@ def _get_cycled_task_names(self):
wave_bndpnt_tasks = ['wavepostbndpnt', 'wavepostbndpntbll']
wave_post_tasks = ['wavepostsbs', 'wavepostpnt']

hybrid_gdas_or_gfs_tasks = []
hybrid_gdas_tasks = []
hybrid_tasks = []
hybrid_after_eupd_tasks = []
if self.do_hybvar:
if self.do_jediens:
hybrid_gdas_or_gfs_tasks += ['atmensanalprep', 'atmensanalrun', 'atmensanalpost', 'echgres']
hybrid_tasks += ['atmensanalprep', 'atmensanalrun', 'atmensanalpost', 'echgres']
else:
hybrid_gdas_or_gfs_tasks += ['eobs', 'eupd', 'echgres']
hybrid_gdas_or_gfs_tasks += ['ediag'] if self.lobsdiag_forenkf else ['eomg']
hybrid_gdas_tasks += ['ecen', 'esfc', 'efcs', 'epos', 'earc']
hybrid_tasks += ['eobs', 'eupd', 'echgres']
hybrid_tasks += ['ediag'] if self.lobsdiag_forenkf else ['eomg']
hybrid_after_eupd_tasks += ['ecen', 'esfc', 'efcs', 'epos', 'earc']

# Collect all "gdas" cycle tasks
gdas_tasks = gdas_gfs_common_tasks_before_fcst.copy()
Expand All @@ -386,8 +386,8 @@ def _get_cycled_task_names(self):

if self.do_hybvar:
if 'gdas' in self.eupd_cdumps:
gdas_tasks += hybrid_gdas_or_gfs_tasks
gdas_tasks += hybrid_gdas_tasks
gdas_tasks += hybrid_tasks
gdas_tasks += hybrid_after_eupd_tasks

if self.do_wave and 'gdas' in self.wave_cdumps:
if self.do_wave_bnd:
Expand All @@ -408,9 +408,10 @@ def _get_cycled_task_names(self):

if self.do_metp:
gfs_tasks += ['metp']

if self.do_hybvar and 'gfs' in self.eupd_cdumps:
WalterKolczynski-NOAA marked this conversation as resolved.
Show resolved Hide resolved
gfs_tasks += hybrid_gdas_or_gfs_tasks
gfs_tasks += hybrid_tasks
gfs_tasks += hybrid_after_eupd_tasks
gfs_tasks.remove("echgres")

if self.do_wave and 'gfs' in self.wave_cdumps:
if self.do_wave_bnd:
Expand Down
24 changes: 7 additions & 17 deletions workflow/rocoto/workflow_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1079,8 +1079,6 @@ def atmensanalpost(self):

def ecen(self):

self._is_this_a_gdas_task(self.cdump, 'ecen')

def _get_ecengroups():

if self._base.get('DOIAU_ENKF', False):
Expand All @@ -1104,15 +1102,15 @@ def _get_ecengroups():

return grp, dep, lst

eupd_cdump = 'gdas' if 'gdas' in self.app_config.eupd_cdumps else 'gfs'
#eupd_cdump = 'gdas' if 'gdas' in self.app_config.eupd_cdumps else 'gfs'
WalterKolczynski-NOAA marked this conversation as resolved.
Show resolved Hide resolved

deps = []
dep_dict = {'type': 'task', 'name': f'{self.cdump}analcalc'}
deps.append(rocoto.add_dependency(dep_dict))
if self.app_config.do_jediens:
dep_dict = {'type': 'task', 'name': f'{eupd_cdump}atmensanalrun'}
dep_dict = {'type': 'task', 'name': f'{self.cdump}atmensanalrun'}
else:
dep_dict = {'type': 'task', 'name': f'{eupd_cdump}eupd'}
dep_dict = {'type': 'task', 'name': f'{self.cdump}eupd'}
deps.append(rocoto.add_dependency(dep_dict))
dependencies = rocoto.create_dependency(dep_condition='and', dep=deps)

Expand All @@ -1133,29 +1131,25 @@ def _get_ecengroups():

def esfc(self):

self._is_this_a_gdas_task(self.cdump, 'esfc')

eupd_cdump = 'gdas' if 'gdas' in self.app_config.eupd_cdumps else 'gfs'
#eupd_cdump = 'gdas' if 'gdas' in self.app_config.eupd_cdumps else 'gfs'

deps = []
dep_dict = {'type': 'task', 'name': f'{self.cdump}analcalc'}
deps.append(rocoto.add_dependency(dep_dict))
if self.app_config.do_jediens:
dep_dict = {'type': 'task', 'name': f'{eupd_cdump}atmensanalrun'}
dep_dict = {'type': 'task', 'name': f'{self.cdump}atmensanalrun'}
else:
dep_dict = {'type': 'task', 'name': f'{eupd_cdump}eupd'}
dep_dict = {'type': 'task', 'name': f'{self.cdump}eupd'}
deps.append(rocoto.add_dependency(dep_dict))
dependencies = rocoto.create_dependency(dep_condition='and', dep=deps)

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

return task

def efcs(self):

self._is_this_a_gdas_task(self.cdump, 'efcs')

deps = []
dep_dict = {'type': 'metatask', 'name': f'{self.cdump}ecmn'}
deps.append(rocoto.add_dependency(dep_dict))
Expand Down Expand Up @@ -1195,8 +1189,6 @@ def echgres(self):

def epos(self):

self._is_this_a_gdas_task(self.cdump, 'epos')

def _get_eposgroups(epos):
fhmin = epos['FHMIN_ENKF']
fhmax = epos['FHMAX_ENKF']
Expand Down Expand Up @@ -1239,8 +1231,6 @@ def _get_eposgroups(epos):

def earc(self):

self._is_this_a_gdas_task(self.cdump, 'earc')

deps = []
dep_dict = {'type': 'metatask', 'name': f'{self.cdump}epmn'}
deps.append(rocoto.add_dependency(dep_dict))
Expand Down