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 10 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_ATM_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 "prepatmiodaobs" -c "base prepatmiodaobs"

##############################################
# 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/run_bufr2ioda.sh}
${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/prepatmiodaobs.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_ATM_PREP_IODA_OBS"
status=$?
exit "${status}"
14 changes: 14 additions & 0 deletions parm/config/gfs/config.prepatmiodaobs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#! /usr/bin/env bash

########## config.prepatmiodaobs ##########
# Atm Obs Prep specific

echo "BEGIN: config.prepatmiodaobs"

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

export BUFR2IODASH="${HOMEgfs}/ush/run_bufr2ioda.sh"
export IODAPARM="${HOMEgfs}/sorc/gdas.cd/parm/ioda/bufr2ioda"

echo "END: config.prepatmiodaobs"
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 prepatmiodaobs"
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}" = "prepatmiodaobs" ]]; then
export wtime_prepatmiodaobs="00:10:00"
export npe_prepatmiodaobs=1
export nth_prepatmiodaobs=1
npe_node_prepatmiodaobs=$(echo "${npe_node_max} / ${nth_prepatmiodaobs}" | bc)
export npe_node_prepatmiodaobs

elif [[ "${step}" = "aerosol_init" ]]; then
export wtime_aerosol_init="00:05:00"
export npe_aerosol_init=1
Expand Down
1 change: 1 addition & 0 deletions sorc/link_workflow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ if [[ -d "${HOMEgfs}/sorc/gdas.cd" ]]; then
cd "${HOMEgfs}/ush" || exit 1
${LINK_OR_COPY} "${HOMEgfs}/sorc/gdas.cd/ush/ufsda" .
${LINK_OR_COPY} "${HOMEgfs}/sorc/gdas.cd/ush/jediinc2fv3.py" .
${LINK_OR_COPY} "${HOMEgfs}/sorc/gdas.cd/ush/ioda/bufr2ioda/run_bufr2ioda.sh" .
${LINK_OR_COPY} "${HOMEgfs}/sorc/gdas.cd/build/bin/imsfv3_scf2ioda.py" .
fi

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 += ['prepatmiodaobs', '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 += ['prepatmiodaobs', '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 prepatmiodaobs(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('prepatmiodaobs')
task = create_wf_task('prepatmiodaobs', resources, cdump=self.cdump, envar=self.envars, dependency=dependencies)

return task

def atmanlinit(self):

deps = []
dep_dict = {'type': 'task', 'name': f'{self.cdump}prepatmiodaobs'}
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","")}prepatmiodaobs'}
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',
'prepatmiodaobs', 'atmanlinit', 'atmanlrun', 'atmanlfinal',
'ocnanalprep', 'ocnanalbmat', 'ocnanalrun', 'ocnanalchkpt', 'ocnanalpost', 'ocnanalvrfy',
'earc', 'ecen', 'echgres', 'ediag', 'efcs',
'eobs', 'eomg', 'epos', 'esfc', 'eupd',
Expand Down