From 8d95a41b998df5ee80cd95b8892966e93c34902b Mon Sep 17 00:00:00 2001 From: "Walter.Kolczynski" Date: Thu, 28 Sep 2023 19:36:31 +0000 Subject: [PATCH] Add description for scale_dec --- ush/product_functions.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/ush/product_functions.sh b/ush/product_functions.sh index 346022f8e88..46d37fc8ea8 100755 --- a/ush/product_functions.sh +++ b/ush/product_functions.sh @@ -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 \ + -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}"