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 oceanalecn to workflow generator #2409

Merged
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
49c25e1
adding ocnanalecen to workflow
AndrewEichmann-NOAA Mar 18, 2024
2d858ce
key running ocnanalecen to number of members
AndrewEichmann-NOAA Mar 18, 2024
e608a8c
fun with linking
AndrewEichmann-NOAA Mar 18, 2024
276aad8
style points
AndrewEichmann-NOAA Mar 18, 2024
064805b
disable spellcheck
AndrewEichmann-NOAA Mar 18, 2024
5b43c72
Changed nens threshold to run ocnanalecen
AndrewEichmann-NOAA Mar 19, 2024
80cd5f5
Merge branch 'develop' into feature/ocnanalecenworkflow
AndrewEichmann-NOAA Mar 19, 2024
93b9bd5
Replace do_ocnanalecen with do_hybvar
AndrewEichmann-NOAA Mar 19, 2024
7a1d953
replace do_ocnanalecen with do_hybvar
AndrewEichmann-NOAA Mar 19, 2024
9cebf48
Merge branch 'develop' into feature/ocnanalecenworkflow
AndrewEichmann-NOAA Mar 19, 2024
9eacb72
Merge branch 'develop' into feature/ocnanalecenworkflow
AndrewEichmann-NOAA Mar 21, 2024
aa33534
Merge branch 'develop' into feature/ocnanalecenworkflow
AndrewEichmann-NOAA Apr 8, 2024
bf4d69d
Merge branch 'develop' into feature/ocnanalecenworkflow
AndrewEichmann-NOAA Apr 9, 2024
d7b348f
Merge branch 'develop' into feature/ocnanalecenworkflow
AndrewEichmann-NOAA Apr 10, 2024
42fde67
linking tweaks
AndrewEichmann-NOAA Apr 10, 2024
e069c67
Merge branch 'feature/ocnanalecenworkflow' of github.com:AndrewEichma…
AndrewEichmann-NOAA Apr 10, 2024
ee18546
restoring sfc prep link
AndrewEichmann-NOAA Apr 10, 2024
2fbd2aa
swap out generate_com
AndrewEichmann-NOAA Apr 10, 2024
595813b
Update sorc/link_workflow.sh
AndrewEichmann-NOAA Apr 11, 2024
ce4d1af
Merge branch 'develop' into feature/ocnanalecenworkflow
AndrewEichmann-NOAA Apr 12, 2024
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ scripts/exgfs_atmos_wafs_grib2_0p25.sh
ush/chgres_cube.sh
ush/emcsfc_ice_blend.sh
ush/emcsfc_snow.sh
ush/exgdas_global_marine_analysis_ecen.py
ush/exglobal_prep_ocean_obs.py
AndrewEichmann-NOAA marked this conversation as resolved.
Show resolved Hide resolved
ush/fix_precip.sh
ush/fv3gfs_driver_grid.sh
Expand Down
11 changes: 10 additions & 1 deletion jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_ECEN
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ source "${HOMEgfs}/ush/jjob_header.sh" -e "ocnanalecen" -c "base ocnanal ocnanal
##############################################
# Set variables used in the script
##############################################
# Ignore possible spelling error (nothing is misspelled)
# shellcheck disable=SC2153
GDATE=$(date --utc +%Y%m%d%H -d "${PDY} ${cyc} - ${assim_freq} hours")
Fixed Show fixed Hide fixed
export gPDY=${GDATE:0:8}
export gcyc=${GDATE:8:2}

YMD=${gPDY} HH=${gcyc} generate_com -rx \
AndrewEichmann-NOAA marked this conversation as resolved.
Show resolved Hide resolved
COM_OCEAN_HISTORY_PREV:COM_OCEAN_HISTORY_TMPL \
COM_ICE_HISTORY_PREV:COM_ICE_HISTORY_TMPL

##############################################
# Begin JOB SPECIFIC work
Expand All @@ -13,7 +22,7 @@ source "${HOMEgfs}/ush/jjob_header.sh" -e "ocnanalecen" -c "base ocnanal ocnanal
###############################################################
# Run relevant script

EXSCRIPT=${GDASOCNCENPY:-${HOMEgfs}/scripts/exgdas_global_marine_analysis_ecen.py}
EXSCRIPT=${GDASOCNCENPY:-${HOMEgfs}/ush/exgdas_global_marine_analysis_ecen.py}
AndrewEichmann-NOAA marked this conversation as resolved.
Show resolved Hide resolved
${EXSCRIPT}
status=$?
[[ ${status} -ne 0 ]] && exit "${status}"
Expand Down
1 change: 1 addition & 0 deletions sorc/link_workflow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ if [[ -d "${HOMEgfs}/sorc/gdas.cd/build" ]]; then
${LINK_OR_COPY} "${HOMEgfs}/sorc/gdas.cd/ush/ioda/bufr2ioda/run_bufr2ioda.py" .
${LINK_OR_COPY} "${HOMEgfs}/sorc/gdas.cd/build/bin/imsfv3_scf2ioda.py" .
${LINK_OR_COPY} "${HOMEgfs}/sorc/gdas.cd/scripts/exglobal_prep_ocean_obs.py" .
${LINK_OR_COPY} "${HOMEgfs}/sorc/gdas.cd/scripts/exgdas_global_marine_analysis_ecen.py" .
AndrewEichmann-NOAA marked this conversation as resolved.
Show resolved Hide resolved
fi


Expand Down
17 changes: 12 additions & 5 deletions workflow/applications/gfs_cycled.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ def __init__(self, conf: Configuration):
elif eupd_cdump in ['gfs', 'gdas']:
self.eupd_cdumps = [eupd_cdump]

self.do_ocnanalecen = False
if self.nens > 0:
AndrewEichmann-NOAA marked this conversation as resolved.
Show resolved Hide resolved
self.do_ocnanalecen = True

def _get_app_configs(self):
"""
Returns the config_files that are involved in the cycled app
Expand All @@ -43,8 +47,10 @@ def _get_app_configs(self):
configs += ['anal', 'analdiag']

if self.do_jediocnvar:
configs += ['prepoceanobs', 'ocnanalprep', 'ocnanalbmat',
'ocnanalrun', 'ocnanalchkpt', 'ocnanalpost']
configs += ['prepoceanobs', 'ocnanalprep', 'ocnanalbmat', 'ocnanalrun']
if self.do_ocnanalecen:
AndrewEichmann-NOAA marked this conversation as resolved.
Show resolved Hide resolved
configs += ['ocnanalecen']
configs += ['ocnanalchkpt', 'ocnanalpost']
if self.do_vrfy_oceanda:
configs += ['ocnanalvrfy']

Expand Down Expand Up @@ -137,9 +143,10 @@ def get_task_names(self):
gdas_gfs_common_tasks_before_fcst += ['anal']

if self.do_jediocnvar:
gdas_gfs_common_tasks_before_fcst += ['prepoceanobs', 'ocnanalprep',
'ocnanalbmat', 'ocnanalrun',
'ocnanalchkpt', 'ocnanalpost']
gdas_gfs_common_tasks_before_fcst += ['prepoceanobs', 'ocnanalprep', 'ocnanalbmat', 'ocnanalrun']
if self.do_ocnanalecen:
AndrewEichmann-NOAA marked this conversation as resolved.
Show resolved Hide resolved
gdas_gfs_common_tasks_before_fcst += ['ocnanalecen']
gdas_gfs_common_tasks_before_fcst += ['ocnanalchkpt', 'ocnanalpost']
if self.do_vrfy_oceanda:
gdas_gfs_common_tasks_before_fcst += ['ocnanalvrfy']

Expand Down
29 changes: 28 additions & 1 deletion workflow/rocoto/gfs_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -677,11 +677,38 @@ def ocnanalrun(self):

return task

def ocnanalchkpt(self):
def ocnanalecen(self):

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

resources = self.get_resource('ocnanalecen')
task_name = f'{self.cdump}ocnanalecen'
task_dict = {'task_name': task_name,
'resources': resources,
'dependency': dependencies,
'envars': self.envars,
'cycledef': self.cdump.replace('enkf', ''),
'command': f'{self.HOMEgfs}/jobs/rocoto/ocnanalecen.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)

return task

def ocnanalchkpt(self):

deps = []
if self.app_config.do_ocnanalecen:
AndrewEichmann-NOAA marked this conversation as resolved.
Show resolved Hide resolved
dep_dict = {'type': 'task', 'name': f'{self.cdump}ocnanalecen'}
else:
dep_dict = {'type': 'task', 'name': f'{self.cdump}ocnanalrun'}
deps.append(rocoto.add_dependency(dep_dict))
if self.app_config.do_mergensst:
data = f'&ROTDIR;/{self.cdump}.@Y@m@d/@H/atmos/{self.cdump}.t@Hz.sfcanl.nc'
dep_dict = {'type': 'data', 'data': data}
Expand Down
2 changes: 1 addition & 1 deletion workflow/rocoto/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Tasks:
'prep', 'anal', 'sfcanl', 'analcalc', 'analdiag', 'arch', "cleanup",
'prepatmiodaobs', 'atmanlinit', 'atmanlrun', 'atmanlfinal',
'prepoceanobs',
'ocnanalprep', 'ocnanalbmat', 'ocnanalrun', 'ocnanalchkpt', 'ocnanalpost', 'ocnanalvrfy',
'ocnanalprep', 'ocnanalbmat', 'ocnanalrun', 'ocnanalecen', 'ocnanalchkpt', 'ocnanalpost', 'ocnanalvrfy',
'earc', 'ecen', 'echgres', 'ediag', 'efcs',
'eobs', 'eomg', 'epos', 'esfc', 'eupd',
'atmensanlinit', 'atmensanlrun', 'atmensanlfinal',
Expand Down
Loading