Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

Gen_be Namelist options causes error

This post was from a previous version of the WRF&MPAS-A Support Forum. New replies have been disabled and if you have follow up questions related to this post, then please start a new thread from the forum home page.

wrfguy

New member
Hello,

I can successfully run 'gen_be' with the original "gen_be_wrapper.ksh". However, when I add all of the options described in "Generalized background error covariance matrix model (GEN_BE v2.0)" (doi:10.5194/gmd-8-669-2015) I see the following error in 'gen_be_stage3.ps_u.log':

PGFIO-F-217/unformatted read/unit=21/attempt to read past end of file.
File name = ps_u/2006072600.ps_u.e001 unformatted, sequential access record = 1
In source file gen_be_stage3.f, at line number 285

Am I using the new options incorrectly? Is there a namelist template available containing all possible options?

Below are the original and new script (with all of the options)

Thank you,

ORIGINAL:

#! /bin/ksh
#-----------------------------------------------------------------------
# Script gen_be_wrapper.ksh
#
# Purpose: Calculates background error statistics for WRF-Var.
#-----------------------------------------------------------------------

#[1] Define job by overriding default environment variables:
###############################./WRFDA/WRFDA/var/gen_be/gen_be_stage0_gsi.f90
export RUN_GEN_BE_STAGE0=true
export RUN_GEN_BE_STAGE1=true
export RUN_GEN_BE_STAGE2=true
export RUN_GEN_BE_STAGE2A=true
export RUN_GEN_BE_STAGE3=true
export RUN_GEN_BE_STAGE4=true
export RUN_GEN_BE_DIAGS=true
export RUN_GEN_BE_DIAGS_READ=true
export RUN_GEN_BE_MULTICOV=true

export WRFVAR_DIR=/local/home/name/WRFDA/WRFDA

export START_DATE=2006072600 # the first perturbation valid date
export END_DATE=2006083100 # the last perturbation valid date
export NUM_LEVELS=29 # = bottom_top = e_vert - 1
export NL_CV_OPTIONS=5 # Specify control variable options
# NL_CV_OPTIONS = 5: default wind control variables (psi and chi_u)
# 7: u/v wind control variables

export BIN_TYPE=5 # How data is binned for calculating statistics
# BIN_TYPE = 5 (default, recommended): Average over all horizontal points;
# i.e. only one bin per vertical level
# 0: No binning
# 1: X-direction mean
# 2: Bin by latitude and height
# 3: Bin by latitude and vertical level
# 4: Fixed number of horizontal bins and by vertical level
# 6: Average over all points (only 1 bin)
#export DATA_ON_LEVELS=.true. # "False if fields projected onto modes."

export BE_METHOD=NMC
export FCST_RANGE=12
#Example of changes required for "be_method=ENS":
#export BE_METHOD=ENS
#export NE=2 # 30

export FC_DIR=/data/DATA/Month # where wrf forecasts are
export RUN_DIR=`pwd`/gen_be${BIN_TYPE}
export DOMAIN=01
export FCST_RANGE1=24
export FCST_RANGE2=12
export INTERVAL=12
export STRIDE=1
export USE_RFi=true # use recursive filters?
#ADDED OPTIONS
#export APPLICATION=GSI
#export CUT= #to subset domain
#export LAT_MIN #for binnning options
#export LAT_MAX #for binnning options
#export BINDWIDTH_LAT #for binnning options
#export HGT_MIN #for binnning options
#export BINWIDTH_HGT #for binnning options
export NB_CV=5
export CV_LIST='psi','chi','t','ps','rh',
export FFT_METHOD=1
#export COVAR1 #covariance options
export USE_CHOL_REG=FALSE
export DATA_ON_LEVELS=TRUE
export VERT_LS_METHOD=1
export LS_METHOD=2
export USE_MED_LS=false
#export N_SMTH_LS=2
#export USE_GLOBAL_BIN=false



#[2] Run gen_be:
if ${USE_RFi}; then
${WRFVAR_DIR}/var/scripts/gen_be/gen_be.ksh
else # loop over wavelet filter lengths:
export DO_NORMALIZE=.false. # normalize before wavelet transform?
NEW_SUF=
export RUN_DIR=${RUN_DIR}.
for L in 7;do
export WAVELET_NBAND=$L
for N in C;do # possible WAVELET_NAME values: B C D V
export WAVELET_NAME=$N
if [[ $WAVELET_NAME == B ]];then
export ISTRT=18
export IINC=1
export IFIN=$ISTRT
elif [[ $WAVELET_NAME == C ]];then
export ISTRT=30
export IINC=6
export IFIN=30
elif [[ $WAVELET_NAME == D ]];then
export ISTRT=6
export IINC=2
export IFIN=20
elif [[ $WAVELET_NAME == V ]];then
export ISTRT=24
export IINC=1
export IFIN=$ISTRT
fi
for I in `seq ${ISTRT} ${IINC} ${IFIN}`; do
export WAVELET_FILT_LEN=$I
OLD_SUF=${NEW_SUF}
NEW_SUF=${WAVELET_NBAND}${WAVELET_NAME}${WAVELET_FILT_LEN}n
export RUN_DIR=${RUN_DIR%${OLD_SUF}}${NEW_SUF}
${WRFVAR_DIR}/var/scripts/gen_be/gen_be.ksh
done
done
done
fi





NEW:

#! /bin/ksh
#-----------------------------------------------------------------------
# Script gen_be_wrapper.ksh
#
# Purpose: Calculates background error statistics for WRF-Var.
#-----------------------------------------------------------------------

#[1] Define job by overriding default environment variables:

export RUN_GEN_BE_STAGE0=true
export RUN_GEN_BE_STAGE1=true
export RUN_GEN_BE_STAGE2=true
export RUN_GEN_BE_STAGE2A=true
export RUN_GEN_BE_STAGE3=true
export RUN_GEN_BE_STAGE4=true
export RUN_GEN_BE_DIAGS=true
export RUN_GEN_BE_DIAGS_READ=true
export RUN_GEN_BE_MULTICOV=true

export WRFVAR_DIR=/local/home/name/WRFDA/WRFDA

export START_DATE=2006072600 # the first perturbation valid date
export END_DATE=2006083100 # the last perturbation valid date
export NUM_LEVELS=29 # = bottom_top = e_vert - 1
export BIN_TYPE=5
#export DATA_ON_LEVELS=.true. # "False if fields projected onto modes."

export BE_METHOD=NMC
export FCST_RANGE=12
#Example of changes required for "be_method=ENS":
#export BE_METHOD=ENS
#export NE=2 # 30

export FC_DIR=/data/DATA/Month # where wrf forecasts are
export RUN_DIR=`pwd`/gen_be${BIN_TYPE}
export DOMAIN=01
export FCST_RANGE1=24
export FCST_RANGE2=12
export INTERVAL=12
export STRIDE=1
export USE_RFi=true # use recursive filters?
#[2] Run gen_be:
if ${USE_RFi}; then
${WRFVAR_DIR}/var/scripts/gen_be/gen_be.ksh
else # loop over wavelet filter lengths:
export DO_NORMALIZE=.false. # normalize before wavelet transform?
NEW_SUF=
export RUN_DIR=${RUN_DIR}.
for L in 7;do
export WAVELET_NBAND=$L
for N in C;do # possible WAVELET_NAME values: B C D V
export WAVELET_NAME=$N
if [[ $WAVELET_NAME == B ]];then
export ISTRT=18
export IINC=1
export IFIN=$ISTRT
elif [[ $WAVELET_NAME == C ]];then
export ISTRT=30
export IINC=6
export IFIN=30
elif [[ $WAVELET_NAME == D ]];then
export ISTRT=6
export IINC=2
export IFIN=20
elif [[ $WAVELET_NAME == V ]];then
export ISTRT=24
export IINC=1
export IFIN=$ISTRT
fi
for I in `seq ${ISTRT} ${IINC} ${IFIN}`; do
export WAVELET_FILT_LEN=$I
OLD_SUF=${NEW_SUF}
NEW_SUF=${WAVELET_NBAND}${WAVELET_NAME}${WAVELET_FILT_LEN}n
export RUN_DIR=${RUN_DIR%${OLD_SUF}}${NEW_SUF}
${WRFVAR_DIR}/var/scripts/gen_be/gen_be.ksh
done
done
done
fi
 
In my post above I labeled the namelists "ORIGINAL" and "NEW" incorrectly. The first one is NEW and the second one is the ORIGINAL.
 
Top