Skip to content

Commit

Permalink
Fix some bugs and make other changes so ctest in GDASApp works (#1172)
Browse files Browse the repository at this point in the history
Fix some bugs and make other changes so ctest in GDASApp works.

`$CDATE` is used instead of `$cyc` for the time being, since `cyc` isn't defined before that point in the scripts.

Fix some lines where multiple arguments were enclosed in quotation marks when they should be separate.

Update `config.ocnanal` to template out some variables and add them to the defaults yaml.

Fixes #1164 
Fixes #1173
Companion PR to [GDASApp/PR234](NOAA-EMC/GDASApp#234)
See also [GDASApp/232](NOAA-EMC/GDASApp#232)
  • Loading branch information
guillaumevernieres authored Dec 13, 2022
1 parent 5a748ee commit 3e53e06
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 15 deletions.
2 changes: 1 addition & 1 deletion env/ORION.env
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ elif [ ${step} = "ocnanalrun" ]; then

export NTHREADS_OCNANAL=${nth_ocnanalrun:-${nth_max}}
[[ $NTHREADS_OCNANAL -gt ${nth_max} ]] && export NTHREADS_OCNANAL=${nth_max}
export APRUN_OCNANAL="${launcher} -n ${npe_aeroanlrun}"
export APRUN_OCNANAL="${launcher} -n ${npe_ocnanalrun}"

elif [[ "${step}" = "anal" ]] || [[ "${step}" = "analcalc" ]]; then

Expand Down
2 changes: 1 addition & 1 deletion jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_POST
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ source "${HOMEgfs}/ush/preamble.sh"
##############################################
# make temp directory
##############################################
export DATA=${DATA:-${DATAROOT}/ocnanal_${cyc}}
export DATA=${DATA:-${DATAROOT}/ocnanal_${CDATE}} # TODO (G): Switch to {cyc} when the downstream code is ready
mkdir -p "${DATA}"
cd "${DATA}" || (echo "${DATA} does not exist. ABORT!"; exit 1)

Expand Down
4 changes: 2 additions & 2 deletions jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_PREP
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ source "${HOMEgfs}/ush/preamble.sh"
##############################################
# make temp directory
##############################################
export DATA=${DATA:-${DATAROOT}/ocnanal_${cyc}}
export DATA=${DATA:-${DATAROOT}/ocnanal_${CDATE}} # TODO (G): Switch to {cyc} when the downstream code is ready
rm -rf "${DATA}" # Ensure starting with a clean DATA
mkdir -p "${DATA}"
cd "${DATA}" || (echo "${DATA} does not exist. ABORT!"; exit 1)
Expand Down Expand Up @@ -42,7 +42,7 @@ done
##########################################
# Source machine runtime environment
##########################################
. "${HOMEgfs}/env/${machine}.env ocnanalprep"
. "${HOMEgfs}/env/${machine}.env" ocnanalprep
status=$?
[[ ${status} -ne 0 ]] && exit "${status}"

Expand Down
4 changes: 2 additions & 2 deletions jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_RUN
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ source "${HOMEgfs}/ush/preamble.sh"
##############################################
# make temp directory
##############################################
export DATA=${DATA:-${DATAROOT}/ocnanal_${cyc}}
export DATA=${DATA:-${DATAROOT}/ocnanal_${CDATE}} # TODO (G): Switch to {cyc} when the downstream code is ready
mkdir -p "${DATA}"
cd "${DATA}" || (echo "${DATA} does not exist. ABORT!"; exit 1)

Expand Down Expand Up @@ -42,7 +42,7 @@ done
##########################################
# Source machine runtime environment
##########################################
. "${HOMEgfs}/env/${machine}.env ocnanalrun"
. "${HOMEgfs}/env/${machine}.env" ocnanalrun
status=$?
[[ ${status} -ne 0 ]] && exit "${status}"

Expand Down
12 changes: 6 additions & 6 deletions parm/config/config.ocnanal
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ export OBS_YAML_DIR=${HOMEgfs}/sorc/gdas.cd/parm/soca/obs/config
export OBS_YAML=${HOMEgfs}/sorc/gdas.cd/parm/soca/obs/obs_list.yaml
export OBS_LIST=${OBS_YAML_DIR}/obs_list.yaml
export FV3JEDI_STAGE_YAML=${HOMEgfs}/sorc/gdas.cd/test/soca/testinput/dumy.yaml
export SOCA_INPUT_FIX_DIR=/scratch2/NCEPDEV/ocean/Guillaume.Vernieres/data/static/72x35x25/soca # TODO: Should be moved somewhere else
export SOCA_INPUT_FIX_DIR=@SOCA_INPUT_FIX_DIR@
export SOCA_VARS=tocn,socn,ssh
export SOCA_NINNER=50
export CASE_ANL="C48"
export SOCA_NINNER=@SOCA_NINNER@
export CASE_ANL=@CASE_ANL@
export DOMAIN_STACK_SIZE=2000000
export JEDI_BIN=${HOMEgfs}/sorc/gdas.cd/build/bin

# TODO: Move the R2D2 configuration to a common space
export R2D2_OBS_DB=shared
export R2D2_OBS_DUMP=s2s_v1
export R2D2_OBS_SRC=gdas_marine
export R2D2_OBS_DUMP=@R2D2_OBS_DUMP@
export R2D2_OBS_SRC=@R2D2_OBS_SRC@
export R2D2_OBS_WINDOW=24 # TODO: Check if the R2D2 sampling DB window is still needed
export COMIN_OBS=/scratch2/NCEPDEV/marineda/r2d2
export COMIN_OBS=@COMIN_OBS@
echo "END: config.ocnanal"
2 changes: 1 addition & 1 deletion parm/config/config.ocnanalpost
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
echo "BEGIN: config.ocnanalpost"

# Get task specific resources
. "${EXPDIR}/config.resources ocnanalpost"
. "${EXPDIR}/config.resources" ocnanalpost
echo "END: config.ocnanalpost"
2 changes: 1 addition & 1 deletion parm/config/config.ocnanalprep
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
echo "BEGIN: config.ocnanalprep"

# Get task specific resources
. "${EXPDIR}/config.resources ocnanalprep"
. "${EXPDIR}/config.resources" ocnanalprep
echo "END: config.ocnanalprep"
2 changes: 1 addition & 1 deletion parm/config/config.ocnanalrun
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
echo "BEGIN: config.ocnanalrun"

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

echo "END: config.ocnanalrun"
8 changes: 8 additions & 0 deletions parm/config/yaml/defaults.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
aeroanl:
IO_LAYOUT_X: 1
IO_LAYOUT_Y: 1

ocnanal:
SOCA_INPUT_FIX_DIR: '/scratch2/NCEPDEV/ocean/Guillaume.Vernieres/data/static/72x35x25'
CASE_ANL: 'C48'
COMIN_OBS: '/scratch2/NCEPDEV/marineda/r2d2'
SOCA_NINNER: 50
R2D2_OBS_SRC: 'gdas_marine'
R2D2_OBS_DUMP: 's2s_v1'

0 comments on commit 3e53e06

Please sign in to comment.