Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated scripts gfs_v16.0 #224

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions scripts/exgfs_atmos_awips_20km_1p0deg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ export opt26=' -set_grib_max_bits 25 -fi -if '
export opt27=":(APCP|ACPCP|PRATE|CPRAT|DZDT):"
export opt28=' -new_grid_interpolation budget -fi '
export TRIMRH=${TRIMRH:-$USHgfs/trim_rh.sh}
export SCALEDEC=${SCALDEC:-$USHgfs/scale_dec.sh}

###############################################################
# Process GFS GRIB AWIP PRODUCTS IN GRIB2 #
Expand Down Expand Up @@ -161,6 +162,7 @@ do
;;
esac
$TRIMRH awps_file_f${fcsthrs}_${GRID}
$SCALEDEC awps_file_f${fcsthrs}_${GRID}
$GRB2INDEX awps_file_f${fcsthrs}_${GRID} awps_file_fi${fcsthrs}_${GRID}

###########################################################################
Expand Down
2 changes: 2 additions & 0 deletions scripts/exgfs_atmos_grib_awips.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ job_name=`echo $job|sed 's/[jpt]gfs/gfs/'`
typeset -Z3 fcsthrs

export PS4='gfs_grib_awips:f$fcsthrs:$SECONDS + '
export SCALEDEC=${SCALDEC:-$USHgfs/scale_dec.sh}

#if [ $fhcsthrs -t 100 ]; then
# fcsthrs=0$fcsthrs
Expand Down Expand Up @@ -91,6 +92,7 @@ set -x
cp $COMIN/gfs.t${cyc}z.pgrb2b.0p25.f${fcsthrs} tmpfile2b
cat tmpfile2 tmpfile2b > tmpfile
$WGRIB2 tmpfile | grep -F -f $PARMproduct/gfs_awips_parmlist_g2 | $WGRIB2 -i -grib masterfile tmpfile
$SCALEDEC masterfile
$CNVGRIB -g21 masterfile masterfile.grib1

ln -s masterfile.grib1 fort.11
Expand Down
25 changes: 25 additions & 0 deletions ush/scale_dec.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/ksh
#
# This script uses WGRIB2 to change binary scale factor
# and Decimal scale factor in GRIB2 file
#
# -set_scaling D B
# D = decimal scaling or the text 'same' with no quotes
# B = binary scaling or the text 'same' with no quotes
#
set -x

f=$1

export WGRIB2=${WGRIB2:-${NWROOT}/grib_util.v1.1.0/exec/wgrib2}

# export WGRIB2=/gpfs/dell1/nco/ops/nwprod/grib_util.v1.1.0/exec/wgrib2

$WGRIB2 $f -not_if ':(TMP|PWAT|WEASD):' -grib $f.new \
-if ':(TMP|PWAT):' -set_grib_type same \
-set_scaling -1 0 -grib_out $f.new \
-if ':(WEASD):' -set_grib_type same \
-set_scaling 0 0 -grib_out $f.new
export err=$?; err_chk
mv $f.new $f
exit 0