Skip to content

Commit

Permalink
Add description for scale_dec
Browse files Browse the repository at this point in the history
  • Loading branch information
WalterKolczynski-NOAA committed Sep 28, 2023
1 parent a566e29 commit 8d95a41
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions ush/product_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,13 @@ function mod_icec() {
}

function scale_dec() {
local filename=$1
${WGRIB2} "${filename}" -not_if ':(TMP|PWAT|WEASD):' -grib "${filename}.new" \
-if ':(TMP|PWAT):' -set_grib_type same \
-set_scaling -1 0 -grib_out "${filename}.new" \
-if ':(WEASD):' -set_grib_type same \
-set_scaling 0 0 -grib_out "${filename}.new"
# change the scaling for temperature, precipitable water, and water-equivalent accumlated snow depth
local filename=$1
${WGRIB2} "${filename}" -not_if ':(TMP|PWAT|WEASD):' -grib "${filename}.new"
-if ':(TMP|PWAT):' -set_grib_type same \

Check warning

Code scanning / shellcheck

This flag is used as a command name. Bad line break or missing [ .. ]? Warning

This flag is used as a command name. Bad line break or missing [ .. ]?
-set_scaling -1 0 -grib_out "${filename}.new" \
-if ':(WEASD):' -set_grib_type same \
-set_scaling 0 0 -grib_out "${filename}.new"
rc=$?
if (( rc == 0 )); then mv "${filename}.new" "${filename}"; fi
return "${rc}"
Expand Down

0 comments on commit 8d95a41

Please sign in to comment.