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 a job to prepare ioda format dumps for use in atmospheric UFS-DA #1826

Merged
Merged
Show file tree
Hide file tree
Changes from 6 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
36 changes: 36 additions & 0 deletions jobs/JGLOBAL_PREP_IODA_OBS
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#! /usr/bin/env bash

source "${HOMEgfs}/ush/preamble.sh"
source "${HOMEgfs}/ush/jjob_header.sh" -e "prepiodaobs" -c "base prepiodaobs"

##############################################
# Set variables used in the script
##############################################


##############################################
# Begin JOB SPECIFIC work
##############################################
# Generate COM variables from templates
YMD=${PDY} HH=${cyc} generate_com -rx COM_OBS


###############################################################
# Run relevant script
EXSCRIPT=${BUFR2IODASH:-${HOMEgfs}/ush/ioda/bufr2ioda/run_bufr2ioda.sh}
RussTreadon-NOAA marked this conversation as resolved.
Show resolved Hide resolved
${EXSCRIPT} "${PDY}${cyc}" "${CDUMP}" "${DMPDIR}" "${IODAPARM}" "${COM_OBS}/"
status=$?
[[ ${status} -ne 0 ]] && (echo "FATAL ERROR: Error executing ${EXSCRIPT}, ABORT!"; exit "${status}")

##############################################
# End JOB SPECIFIC work
##############################################

##############################################
# Final processing
##############################################
if [[ -e "${pgmout}" ]] ; then
cat "${pgmout}"
fi

exit 0
18 changes: 18 additions & 0 deletions jobs/rocoto/prepiodaobs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#! /usr/bin/env bash

source "${HOMEgfs}/ush/preamble.sh"

###############################################################
# Source UFSDA workflow modules
. "${HOMEgfs}/ush/load_ufsda_modules.sh"
status=$?
[[ ${status} -ne 0 ]] && exit "${status}"

export job="prepatmobs"
export jobid="${job}.$$"

###############################################################
# Execute the JJOB
"${HOMEgfs}/jobs/JGLOBAL_PREP_IODA_OBS"
status=$?
exit "${status}"
14 changes: 14 additions & 0 deletions parm/config/gfs/config.prepiodaobs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#! /usr/bin/env bash

########## config.prepiodaobs ##########
# Atm Obs Prep specific

echo "BEGIN: config.prepiodaobs"

# Get task specific resources
. "${EXPDIR}/config.resources" prepiodaobs

export BUFR2IODASH="${HOMEgfs}/sorc/gdas.cd/ush/ioda/bufr2ioda/run_bufr2ioda.sh"
RussTreadon-NOAA marked this conversation as resolved.
Show resolved Hide resolved
export IODAPARM="${HOMEgfs}/sorc/gdas.cd/parm/ioda/bufr2ioda"
RussTreadon-NOAA marked this conversation as resolved.
Show resolved Hide resolved

echo "END: config.prepiodaobs"
9 changes: 8 additions & 1 deletion parm/config/gfs/config.resources
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if [[ $# -ne 1 ]]; then
echo "Must specify an input task argument to set resource variables!"
echo "argument can be any one of the following:"
echo "coupled_ic aerosol_init"
echo "prep preplandobs"
echo "prep preplandobs prepiodaobs"
RussTreadon-NOAA marked this conversation as resolved.
Show resolved Hide resolved
echo "atmanlinit atmanlrun atmanlfinal"
echo "atmensanlinit atmensanlrun atmensanlfinal"
echo "landanl"
Expand Down Expand Up @@ -73,6 +73,13 @@ elif [[ "${step}" = "preplandobs" ]]; then
npe_node_preplandobs=1
export npe_node_preplandobs

elif [[ "${step}" = "prepiodaobs" ]]; then
RussTreadon-NOAA marked this conversation as resolved.
Show resolved Hide resolved
export wtime_prepiodaobs="00:10:00"
export npe_prepiodaobs=1
export nth_prepiodaobs=1
npe_node_prepiodaobs=$(echo "${npe_node_max} / ${nth_prepiodaobs}" | bc)
export npe_node_prepiodaobs

elif [[ "${step}" = "aerosol_init" ]]; then
export wtime_aerosol_init="00:05:00"
export npe_aerosol_init=1
Expand Down
4 changes: 2 additions & 2 deletions workflow/applications/gfs_cycled.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def _get_app_configs(self):
configs = ['prep']

if self.do_jediatmvar:
configs += ['atmanlinit', 'atmanlrun', 'atmanlfinal']
configs += ['prepiodaobs', 'atmanlinit', 'atmanlrun', 'atmanlfinal']
else:
configs += ['anal', 'analdiag']

Expand Down Expand Up @@ -109,7 +109,7 @@ def get_task_names(self):
gdas_gfs_common_cleanup_tasks = ['arch']

if self.do_jediatmvar:
gdas_gfs_common_tasks_before_fcst += ['atmanlinit', 'atmanlrun', 'atmanlfinal']
gdas_gfs_common_tasks_before_fcst += ['prepiodaobs', 'atmanlinit', 'atmanlrun', 'atmanlfinal']
else:
gdas_gfs_common_tasks_before_fcst += ['anal']

Expand Down
16 changes: 14 additions & 2 deletions workflow/rocoto/gfs_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,11 +245,23 @@ def analdiag(self):

return task

def atmanlinit(self):
def prepiodaobs(self):

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

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

return task

def atmanlinit(self):

deps = []
dep_dict = {'type': 'task', 'name': f'{self.cdump}prepiodaobs'}
deps.append(rocoto.add_dependency(dep_dict))
if self.app_config.do_hybvar:
dep_dict = {'type': 'metatask', 'name': 'enkfgdasepmn', 'offset': '-06:00:00'}
deps.append(rocoto.add_dependency(dep_dict))
Expand Down Expand Up @@ -993,7 +1005,7 @@ def eupd(self):

def atmensanlinit(self):
deps = []
dep_dict = {'type': 'task', 'name': f'{self.cdump.replace("enkf","")}prep'}
dep_dict = {'type': 'task', 'name': f'{self.cdump.replace("enkf","")}prepiodaobs'}
deps.append(rocoto.add_dependency(dep_dict))
dep_dict = {'type': 'metatask', 'name': 'enkfgdasepmn', 'offset': '-06:00:00'}
deps.append(rocoto.add_dependency(dep_dict))
Expand Down
2 changes: 1 addition & 1 deletion workflow/rocoto/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Tasks:
SERVICE_TASKS = ['arch', 'earc']
VALID_TASKS = ['aerosol_init', 'coupled_ic',
'prep', 'anal', 'sfcanl', 'analcalc', 'analdiag', 'arch',
'atmanlinit', 'atmanlrun', 'atmanlfinal',
'prepiodaobs', 'atmanlinit', 'atmanlrun', 'atmanlfinal',
'ocnanalprep', 'ocnanalbmat', 'ocnanalrun', 'ocnanalchkpt', 'ocnanalpost', 'ocnanalvrfy',
'earc', 'ecen', 'echgres', 'ediag', 'efcs',
'eobs', 'eomg', 'epos', 'esfc', 'eupd',
Expand Down