Skip to content

Commit

Permalink
Feature/sref split prepbufr (NOAA-EMC#477)
Browse files Browse the repository at this point in the history
* Add split prepbufr files before run PN2NC in ush/mesoscale/evs_prepare_sref.sh

* Add fix the mising data issue for  href PB2NC over Hawaii

* move export bufr_ver=12.0.0 in alphabetical order in run.ver

* Remove bufr_ver=12.0.0 from build.ver
  • Loading branch information
BinbinZhou-NOAA authored May 17, 2024
1 parent e091a54 commit 3d94ae9
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 7 deletions.
1 change: 1 addition & 0 deletions dev/modulefiles/mesoscale/mesoscale_stats.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@ module load grib_util/${grib_util_ver}
module load wgrib2/${wgrib2_ver}
module load met/${met_ver}
module load metplus/${metplus_ver}
module load bufr/${bufr_ver}

module list
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ PB2NC_WINDOW_END = 1800
PB2NC_GRID = {ENV[verif_grid]}
PB2NC_POLY =
PB2NC_STATION_ID =
PB2NC_MESSAGE_TYPE = ADPUPA
PB2NC_MESSAGE_TYPE = ADPUPA, ADPSFC

PB2NC_LEVEL_RANGE_BEG = -1000
PB2NC_LEVEL_RANGE_END = 100000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ PB2NC_OBS_BUFR_MAP = { key = "ZOB"; val = "HGT"; },{ key = "TOB"; val = "TMP";
CONFIG_DIR = {PARM_BASE}/met_config

# directory containing input to PB2NC
PB2NC_INPUT_DIR = {ENV[COMINobsproc]}
PB2NC_INPUT_DIR = {ENV[bufrpath]}

# directory to write output from PB2NC
PB2NC_OUTPUT_DIR = {OUTPUT_BASE}/prepbufr_nc
Expand All @@ -123,7 +123,7 @@ METPLUS_CONF = {OUTPUT_BASE}/final_pb2nc_{ENV[vbeg]}.conf
# End of [dir] section and start of [filename_templates] section
[filename_templates]
# Template to look for forecast input to PB2NC relative to PB2NC_INPUT_DIR
PB2NC_INPUT_TEMPLATE = gfs.{da_init?fmt=%Y%m%d}/{da_init?fmt=%H}/atmos/gfs.t{da_init?fmt=%H}z.prepbufr
PB2NC_INPUT_TEMPLATE = prepbufr.{da_init?fmt=%Y%m%d}/gdas.t{da_init?fmt=%H}z.prepbufr

# Template to use to write output from PB2NC
PB2NC_OUTPUT_TEMPLATE = prepbufr.t{da_init?fmt=%H}z.grid212.nc
20 changes: 16 additions & 4 deletions ush/mesoscale/evs_prepare_sref.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
#**************************************************************************
# Purpose: Get required input forecast and validation data files
# for sref stat jobs
# Last update: 10/30/2023, by Binbin Zhou Lynker@EMC/NCEP
# Last update:
# 05/04/2024, (1) change gfs to gdas for prepbufr files
# (2) split the prepbufr files before running METplus PB2NC
# to save walltime
# by Binbin Zhou Lynker@EMC/NCEP
# 10/30/2023, by Binbin Zhou Lynker@EMC/NCEP
#************************************************************************
set -x

Expand Down Expand Up @@ -201,13 +206,20 @@ if [ $modnam = prepbufr ] && [ ! -e $DATA/prepbufr.missing ] ; then

export output_base=${WORK}/pb2nc

if [ -s ${COMINobsproc}/gfs.${vday}/??/atmos/gfs.t??z.prepbufr ] ; then
if [ -s ${COMINobsproc}/gdas.${vday}/??/atmos/gdas.t??z.prepbufr ] ; then

for vhr in 00 06 12 18 ; do

export vbeg=${vhr}
export vend=${vhr}

#Split the prepbufr data files into specifiically required data types to reduce
#the walltime
>$WORK/prepbufr.$vday/gdas.t${vhr}z.prepbufr
split_by_subset ${COMINobsproc}/gdas.${vday}/$vhr/atmos/gdas.t${vhr}z.prepbufr
cat $WORK/ADPSFC $WORK/SFCSHP $WORK/ADPUPA >> $WORK/prepbufr.$vday/gdas.t${vhr}z.prepbufr

export bufrpath=$WORK
${METPLUS_PATH}/ush/run_metplus.py -c ${PARMevs}/metplus_config/machine.conf -c ${GRID2OBS_CONF}/Pb2nc_obsGFS_Prepbufr.conf
export err=$?; err_chk
if [ -s ${WORK}/pb2nc/prepbufr_nc/*.nc ] ; then
Expand All @@ -216,11 +228,11 @@ export output_base=${WORK}/pb2nc
done

else
echo "WARNING: Missing file is ${COMINobsproc}/gfs.${vday}/??/atmos/gfs.t??z.prepbufr"
echo "WARNING: Missing file is ${COMINobsproc}/gdas.${vday}/??/atmos/gdas.t??z.prepbufr"
if [ $SENDMAIL = YES ] ; then
export subject="Prepbufr Data Missing for EVS ${COMPONENT}"
echo "WARNING: No Prepbufr data available for ${VDATE}" > mailmsg
echo "Missing file is ${COMINobsproc}/gfs.${vday}/??/atmos/gfs.t??z.prepbufr" >> mailmsg
echo "Missing file is ${COMINobsproc}/gdas.${vday}/??/atmos/gdas.t??z.prepbufr" >> mailmsg
echo "Job ID: $jobid" >> mailmsg
cat mailmsg | mail -s "$subject" $MAILTO
fi
Expand Down
1 change: 1 addition & 0 deletions versions/run.ver
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export evs_ver=v1.0.8

export bacio_ver=2.4.1
export bufr_ver=12.0.0
export cdo_ver=1.9.8
export cfp_ver=2.0.4
export craympich_ver=8.1.19
Expand Down

0 comments on commit 3d94ae9

Please sign in to comment.