Skip to content

Commit

Permalink
Change YAML and add jjob CTest for new "atmensanlfv3inc" job in Globa…
Browse files Browse the repository at this point in the history
…l Workflow (#1104)

This PR is a companion to Global Workflow PR
#[2593](NOAA-EMC/global-workflow#2592), which
adds the "atmensanlfv3inc" job to Global Workflow. That job converts the
JEDI ensemble increments into FV3 readable increments. This JCB-GDAS
companion PR is #[3](NOAA-EMC/jcb-gdas#3), which
updates the input YAMLs for the FV3 increment converter

This PR does two things:
1. It adds a jjob CTest to GDASApp to test this new job.
2. It modifies the LETKF input YAML to write out cubed-sphere history
increments, rather than Gaussian increments, so the FV3 increment
converter can read the resulting increment off the native grid and then
itself write out a Gaussian increment.

---------

Co-authored-by: Cory Martin <cory.r.martin@noaa.gov>
  • Loading branch information
DavidNew-NOAA and CoryMartin-NOAA committed May 13, 2024
1 parent ce12190 commit a1c5cca
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 4 deletions.
2 changes: 1 addition & 1 deletion parm/atm/jcb-base.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ app_path_observation_chronicle: "{{PARMgfs}}/gdas/jcb-gdas/observation_chronicle
# ------------------------------------------------------------
#final_increment_file: final_increment_gaussian
final_increment_file: final_increment_cubed_sphere
output_ensemble_increments_file: output_ensemble_increments_gaussian
output_ensemble_increments_file: output_ensemble_increments_cubed_sphere
model_file: model_pseudo
initial_condition_file: background # Initial conditions for 4D apps is background

Expand Down
5 changes: 5 additions & 0 deletions test/atm/global-workflow/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ add_test(NAME test_gdasapp_atm_jjob_ens_init
add_test(NAME test_gdasapp_atm_jjob_ens_run
COMMAND ${PROJECT_SOURCE_DIR}/test/atm/global-workflow/jjob_ens_run.sh
${PROJECT_BINARY_DIR} ${PROJECT_SOURCE_DIR}
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/test/atm/global-workflow/testrun)

add_test(NAME test_gdasapp_atm_jjob_ens_inc
COMMAND ${PROJECT_SOURCE_DIR}/test/atm/global-workflow/jjob_ens_inc.sh
${PROJECT_BINARY_DIR} ${PROJECT_SOURCE_DIR}
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/test/atm/global-workflow/testrun)

add_test(NAME test_gdasapp_atm_jjob_ens_final
Expand Down
55 changes: 55 additions & 0 deletions test/atm/global-workflow/jjob_ens_inc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#! /usr/bin/env bash

set -x
bindir=$1
srcdir=$2

# Set g-w HOMEgfs
topdir=$(cd "$(dirname "$(readlink -f -n "${bindir}" )" )/../../.." && pwd -P)
export HOMEgfs=$topdir

# Set variables for ctest
export PSLOT=gdas_test
export EXPDIR=$bindir/test/atm/global-workflow/testrun/experiments/$PSLOT
export PDY=20210323
export cyc=18
export CDATE=${PDY}${cyc}
export ROTDIR=$bindir/test/atm/global-workflow/testrun/ROTDIRS/$PSLOT
export RUN=enkfgdas
export CDUMP=enkfgdas
export DATAROOT=$bindir/test/atm/global-workflow/testrun/RUNDIRS/$PSLOT
export COMIN_GES=${bindir}/test/atm/bkg
export pid=${pid:-$$}
export jobid=$pid
export COMROOT=$DATAROOT
export NMEM_ENS=3
export ACCOUNT=da-cpu

# Set python path for workflow utilities and tasks
wxflowPATH="${HOMEgfs}/ush/python:${HOMEgfs}/ush/python/wxflow"
PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}${wxflowPATH}"
export PYTHONPATH

# Detemine machine from config.base
machine=$(echo `grep 'machine=' $EXPDIR/config.base | cut -d"=" -f2` | tr -d '"')

# Set NETCDF and UTILROOT variables (used in config.base)
if [[ $machine = 'HERA' ]]; then
NETCDF=$( which ncdump )
export NETCDF
export UTILROOT="/scratch2/NCEPDEV/ensemble/save/Walter.Kolczynski/hpc-stack/intel-18.0.5.274/prod_util/1.2.2"
elif [[ $machine = 'ORION' || $machine = 'HERCULES' ]]; then
ncdump=$( which ncdump )
NETCDF=$( echo "${ncdump}" | cut -d " " -f 3 )
export NETCDF
export UTILROOT=/work2/noaa/da/python/opt/intel-2022.1.2/prod_util/1.2.2
fi

# Execute j-job
if [[ $machine = 'HERA' ]]; then
sbatch --nodes=1 --ntasks=36 --account=$ACCOUNT --qos=batch --time=00:30:00 --export=ALL --wait ${HOMEgfs}/jobs/JGLOBAL_ATMENS_ANALYSIS_FV3_INCREMENT
elif [[ $machine = 'ORION' || $machine = 'HERCULES' ]]; then
sbatch --nodes=1 --ntasks=36 --account=$ACCOUNT --qos=batch --time=00:30:00 --export=ALL --wait ${HOMEgfs}/jobs/JGLOBAL_ATMENS_ANALYSIS_FV3_INCREMENT
else
${HOMEgfs}/jobs/JGLOBAL_ATMENS_ANALYSIS_FV3_INCREMENT
fi
6 changes: 3 additions & 3 deletions test/atm/global-workflow/jjob_ens_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ fi

# Execute j-job
if [[ $machine = 'HERA' ]]; then
sbatch --nodes=1 --ntasks=36 --account=$ACCOUNT --qos=batch --time=00:30:00 --export=ALL --wait ${HOMEgfs}/jobs/JGLOBAL_ATMENS_ANALYSIS_RUN
sbatch --nodes=1 --ntasks=36 --account=$ACCOUNT --qos=batch --time=00:30:00 --export=ALL --wait ${HOMEgfs}/jobs/JGLOBAL_ATMENS_ANALYSIS_LETKF
elif [[ $machine = 'ORION' || $machine = 'HERCULES' ]]; then
sbatch --nodes=1 --ntasks=36 --account=$ACCOUNT --qos=batch --time=00:30:00 --export=ALL --wait ${HOMEgfs}/jobs/JGLOBAL_ATMENS_ANALYSIS_RUN
sbatch --nodes=1 --ntasks=36 --account=$ACCOUNT --qos=batch --time=00:30:00 --export=ALL --wait ${HOMEgfs}/jobs/JGLOBAL_ATMENS_ANALYSIS_LETKF
else
${HOMEgfs}/jobs/JGLOBAL_ATMENS_ANALYSIS_RUN
${HOMEgfs}/jobs/JGLOBAL_ATMENS_ANALYSIS_LETKF
fi

0 comments on commit a1c5cca

Please sign in to comment.