diff --git a/.gitignore b/.gitignore index c2e98c210d..9ac9ece1dd 100644 --- a/.gitignore +++ b/.gitignore @@ -144,6 +144,7 @@ ush/make_tif.sh ush/month_name.sh ush/imsfv3_scf2ioda.py ush/atparse.bash +ush/run_bufr2ioda.py # version files versions/build.ver diff --git a/Externals.cfg b/Externals.cfg index fee84e957a..159432fda7 100644 --- a/Externals.cfg +++ b/Externals.cfg @@ -57,7 +57,7 @@ protocol = git required = False [GDASApp] -hash = f614cc2 +hash = ac8fdb1 local_path = sorc/gdas.cd repo_url = https://github.com/NOAA-EMC/GDASApp.git protocol = git diff --git a/jobs/JGLOBAL_ATM_PREP_IODA_OBS b/jobs/JGLOBAL_ATM_PREP_IODA_OBS new file mode 100755 index 0000000000..ef0e682468 --- /dev/null +++ b/jobs/JGLOBAL_ATM_PREP_IODA_OBS @@ -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.py} +${EXSCRIPT} "${PDY}${cyc}" "${RUN}" "${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 diff --git a/jobs/rocoto/prepatmiodaobs.sh b/jobs/rocoto/prepatmiodaobs.sh new file mode 100755 index 0000000000..d424df9261 --- /dev/null +++ b/jobs/rocoto/prepatmiodaobs.sh @@ -0,0 +1,25 @@ +#! /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}.$$" + +############################################################### +# setup python path for workflow and ioda utilities +wxflowPATH="${HOMEgfs}/ush/python:${HOMEgfs}/ush/python/wxflow/src" +PYIODALIB="${HOMEgfs}/sorc/gdas.cd/build/lib/python3.7" +PYTHONPATH="${PYIODALIB}:${wxflowPATH}:${PYTHONPATH}" +export PYTHONPATH + +############################################################### +# Execute the JJOB +"${HOMEgfs}/jobs/JGLOBAL_ATM_PREP_IODA_OBS" +status=$? +exit "${status}" diff --git a/parm/config/gfs/config.prepatmiodaobs b/parm/config/gfs/config.prepatmiodaobs new file mode 100644 index 0000000000..ed9b246120 --- /dev/null +++ b/parm/config/gfs/config.prepatmiodaobs @@ -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.py" +export IODAPARM="${HOMEgfs}/sorc/gdas.cd/parm/ioda/bufr2ioda" + +echo "END: config.prepatmiodaobs" diff --git a/parm/config/gfs/config.resources b/parm/config/gfs/config.resources index 40b87a4a53..624155671e 100644 --- a/parm/config/gfs/config.resources +++ b/parm/config/gfs/config.resources @@ -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" @@ -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 diff --git a/sorc/checkout.sh b/sorc/checkout.sh index 98873ea6f1..d69cfec208 100755 --- a/sorc/checkout.sh +++ b/sorc/checkout.sh @@ -160,7 +160,7 @@ if [[ ${checkout_gsi} == "YES" ]]; then fi if [[ ${checkout_gdas} == "YES" ]]; then - checkout "gdas.cd" "https://github.com/NOAA-EMC/GDASApp.git" "f614cc2"; errs=$((errs + $?)) + checkout "gdas.cd" "https://github.com/NOAA-EMC/GDASApp.git" "ac8fdb1"; errs=$((errs + $?)) fi if [[ ${checkout_gsi} == "YES" || ${checkout_gdas} == "YES" ]]; then diff --git a/sorc/link_workflow.sh b/sorc/link_workflow.sh index 3c1d19f740..0e2cdf5edd 100755 --- a/sorc/link_workflow.sh +++ b/sorc/link_workflow.sh @@ -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.py" . ${LINK_OR_COPY} "${HOMEgfs}/sorc/gdas.cd/build/bin/imsfv3_scf2ioda.py" . fi diff --git a/workflow/applications/gfs_cycled.py b/workflow/applications/gfs_cycled.py index 3478d563a3..633e93bac0 100644 --- a/workflow/applications/gfs_cycled.py +++ b/workflow/applications/gfs_cycled.py @@ -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'] @@ -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'] diff --git a/workflow/rocoto/gfs_tasks.py b/workflow/rocoto/gfs_tasks.py index 726f7e67fb..8f91abae75 100644 --- a/workflow/rocoto/gfs_tasks.py +++ b/workflow/rocoto/gfs_tasks.py @@ -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)) @@ -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)) diff --git a/workflow/rocoto/tasks.py b/workflow/rocoto/tasks.py index 2a1ac1842b..1eba5a2652 100644 --- a/workflow/rocoto/tasks.py +++ b/workflow/rocoto/tasks.py @@ -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',