Skip to content

Commit

Permalink
Changes for running EnKF updates (NOAA-EMC#244)
Browse files Browse the repository at this point in the history
* Changes for running EnKF updates

* Adding anavinfo for enkf

* Use variables for EnKF cores and walltime

* Cosmetic changes to exregional_run_enkf.sh, add some descriptions
  • Loading branch information
chunhuazhou authored Oct 29, 2021
1 parent 1e0dce2 commit da1fb44
Show file tree
Hide file tree
Showing 7 changed files with 688 additions and 2 deletions.
67 changes: 67 additions & 0 deletions fix/gsi/anavinfo.enkf_fv3lam_hrrr
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
met_guess::
!var level crtm_use desc orig_name
ps 1 -1 surface_pressure ps
z 1 -1 geopotential_height phis
u 65 2 zonal_wind u
v 65 2 meridional_wind v
tv 65 2 virtual_temperature tv
q 65 2 specific_humidity sphu
oz 65 2 ozone ozone
delp 65 -1 fv3 del pressure delp
::

state_derivatives::
!var level src
ps 1 met_guess
u 65 met_guess
v 65 met_guess
tv 65 met_guess
q 65 met_guess
oz 65 met_guess
cw 65 met_guess
prse 66 met_guess
::

state_tendencies::
!var levels source
u 65 met_guess
v 65 met_guess
tv 65 met_guess
q 65 met_guess
oz 65 met_guess
prse 66 met_guess
::

state_vector::
!var level itracer source funcof
u 65 0 met_guess u
v 65 0 met_guess v
tv 65 0 met_guess tv
tsen 65 0 met_guess tv,q
q 65 1 met_guess q
oz 65 1 met_guess oz
prse 66 0 met_guess prse
ps 1 0 met_guess prse
sst 1 0 met_guess sst
::
control_vector_enkf::
!var level itracer as/tsfc_sdv an_amp0 source funcof
u 65 0 1.00 -1.0 state u,v
v 65 0 1.00 -1.0 state u,v
ps 1 0 0.50 -1.0 state prse
t 65 0 0.70 -1.0 state tv
oz 65 0 0.70 -1.0 state oz
q 65 1 0.70 -1.0 state q
::

control_vector::
!var level itracer as/tsfc_sdv an_amp0 source funcof
sf 65 0 1.00 -1.0 state u,v
vp 65 0 1.00 -1.0 state u,v
ps 1 0 0.50 -1.0 state prse
t 65 0 0.70 -1.0 state tv
q 65 1 0.70 -1.0 state q
sst 1 0 1.00 -1.0 state sst
stl 1 0 1.00 -1.0 motley sst
sti 1 0 1.00 -1.0 motley sst
::
110 changes: 110 additions & 0 deletions jobs/JREGIONAL_RUN_ENKF
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
#!/bin/bash

#
#-----------------------------------------------------------------------
#
# This J-JOB script runs the EnKF updates
# for the FV3-LAM model
#
#-----------------------------------------------------------------------

#
#-----------------------------------------------------------------------
#
# Source the variable definitions file and the bash utility functions.
#
#-----------------------------------------------------------------------
#
. ${GLOBAL_VAR_DEFNS_FP}
. $USHDIR/source_util_funcs.sh
#
#-----------------------------------------------------------------------
#
# Save current shell options (in a global array). Then set new options
# for this script/function.
#
#-----------------------------------------------------------------------
#
{ save_shell_opts; set -u +x; } > /dev/null 2>&1
#
#-----------------------------------------------------------------------
#
# Get the full path to the file in which this script/function is located
# (scrfunc_fp), the name of that file (scrfunc_fn), and the directory in
# which the file is located (scrfunc_dir).
#
#-----------------------------------------------------------------------
#
scrfunc_fp=$( readlink -f "${BASH_SOURCE[0]}" )
scrfunc_fn=$( basename "${scrfunc_fp}" )
scrfunc_dir=$( dirname "${scrfunc_fp}" )
#
#-----------------------------------------------------------------------
#
# Print message indicating entry into script.
#
#-----------------------------------------------------------------------
#
print_info_msg "
========================================================================
Entering script: \"${scrfunc_fn}\"
In directory: \"${scrfunc_dir}\"
This is the J-job script for the task that runs a analysis with FV3 for
the specified cycle.
========================================================================"
#
#-----------------------------------------------------------------------
#
# Create the working directory under the cycle directory.
#
#-----------------------------------------------------------------------
# CYCLE_TYPE is to indicate which type of cycle this job for:
# spinup: this job is for spin-up cycles
# others(prod): this job is for product cycle
#
CYCLE_TYPE=${CYCLE_TYPE:-prod}
if [ ${CYCLE_TYPE} == "spinup" ]; then
enkfworkdir="${CYCLE_DIR}/enkfupdt_spinup"
else
enkfworkdir="${CYCLE_DIR}/enkfupdt"
fi
rm -fr ${enkfworkdir}
mkdir_vrfy -p ${enkfworkdir}
#
#-----------------------------------------------------------------------
#
# Call the ex-script for this J-job and pass to it the necessary varia-
# bles.
#
#-----------------------------------------------------------------------
#
$SCRIPTSDIR/exregional_run_enkf.sh \
cycle_dir="${CYCLE_DIR}" \
cycle_type="${CYCLE_TYPE}" \
enkfworkdir="${enkfworkdir}" \
NWGES_DIR="${NWGES_DIR}" || \
print_err_msg_exit "\
Call to ex-script corresponding to J-job \"${scrfunc_fn}\" failed."
#
#-----------------------------------------------------------------------
#
# Print exit message.
#
#-----------------------------------------------------------------------
#
print_info_msg "
========================================================================
Exiting script: \"${scrfunc_fn}\"
In directory: \"${scrfunc_dir}\"
========================================================================"
#
#-----------------------------------------------------------------------
#
# Restore the shell options saved at the beginning of this script/func-
# tion.
#
#-----------------------------------------------------------------------
#
{ restore_shell_opts; } > /dev/null 2>&1

Loading

0 comments on commit da1fb44

Please sign in to comment.