[Met_help] [rt.rap.ucar.edu #83171] History for question about pcp_combine -subtract

John Halley Gotway via RT met_help at ucar.edu
Tue Jul 9 12:04:04 MDT 2019


----------------------------------------------------------------
  Initial Request
----------------------------------------------------------------

To whom it may concern,

I was trying to build a simple script to do the following: take a hrrr 12
hour forecast of 12 hr precip accumulation then subtract the 06 hr forecast
of 6 hr precip accumulation in order to get a 6 hour precip accumulation
for the 12 hour forecast.

I run the script, shown below, with two hrrr grib2 files, with ...qpfff12
and ...qpff06 being the 12 hr and 06 hr qpf accumulations, respectively,
with the script arguments shown below. I tried running the script two
differnent ways as shown below, with the script returning the pcp_combine
usage, thus not rurring.

Any help would be much appreciated............Brad Diehl

./pcp_hrrr.sh hrcogb3p017113019qpfff12 hrcogb3p017113019qpfff06


#!/bin/sh
###
### source environment file for MET6.0
###
source /u/Brad.Diehl/met_env/tut_env
###
###
###
############
      pcp_combine -subtract $in_file1 060000 $in_file2 060000 out.nc
name="APCP"; level="A6";
      pcp_combine -subtract $in_file1 060000 $in_file2 060000 out.nc


----------------------------------------------------------------
  Complete Ticket History
----------------------------------------------------------------

Subject: question about pcp_combine -subtract
From: John Halley Gotway
Time: Fri Dec 01 09:26:13 2017

Hi Brad,

When pcp_combine has problems parsing the arguments, it prints out an
error
message and then prints the usage statement to the screen.

Looks like you're pretty close, but if you're doing a subtraction, you
want
12 hours of precip from the first file and 6 hours from the 2nd file:

   pcp_combine -subtract $in_file1 120000 $in_file2 060000 out.nc

And I don't know why you have this extra info in the example you sent:
name="APCP"; level="A6";
Perhaps including that extra stuff in the calls to pcp_combine is
causing a
parsing error?  The pcp_combine tool by default looks for GRIB records
containing accumulated precip (i.e. APCP).  When doing the "-add" or
"-subtract" options, you can specify the fields you want to read in
one of
3 ways:

(1) Accumulation hours for accumulated precip: 12
(2) Accumulation hours/minutes/seconds for accumulated precip: 120000
(3) Using a config file string to describe the data you want:
'name="APCP";
level="A12";'

So all three of the following are equivalent:

   pcp_combine -subtract $in_file1 12          $in_file2 06
out.nc
   pcp_combine -subtract $in_file1 120000 $in_file2 060000 out.nc
   pcp_combine -subtract $in_file1 'name="APCP"; level="A12";'
$in_file2
'name="APCP"; level="A6";' out.nc

<http://out.nc>
Hope that helps clarify.

Thanks,
John Halley Gotway


On Thu, Nov 30, 2017 at 3:36 PM, Brad Diehl - NOAA Federal via RT <
met_help at ucar.edu> wrote:

>
> Thu Nov 30 15:36:57 2017: Request 83171 was acted upon.
> Transaction: Ticket created by brad.diehl at noaa.gov
>        Queue: met_help
>      Subject: question about pcp_combine -subtract
>        Owner: Nobody
>   Requestors: brad.diehl at noaa.gov
>       Status: new
>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=83171 >
>
>
> To whom it may concern,
>
> I was trying to build a simple script to do the following: take a
hrrr 12
> hour forecast of 12 hr precip accumulation then subtract the 06 hr
forecast
> of 6 hr precip accumulation in order to get a 6 hour precip
accumulation
> for the 12 hour forecast.
>
> I run the script, shown below, with two hrrr grib2 files, with
...qpfff12
> and ...qpff06 being the 12 hr and 06 hr qpf accumulations,
respectively,
> with the script arguments shown below. I tried running the script
two
> differnent ways as shown below, with the script returning the
pcp_combine
> usage, thus not rurring.
>
> Any help would be much appreciated............Brad Diehl
>
> ./pcp_hrrr.sh hrcogb3p017113019qpfff12 hrcogb3p017113019qpfff06
>
>
> #!/bin/sh
> ###
> ### source environment file for MET6.0
> ###
> source /u/Brad.Diehl/met_env/tut_env
> ###
> ###
> ###
> ############
>       pcp_combine -subtract $in_file1 060000 $in_file2 060000 out.nc
> name="APCP"; level="A6";
>       pcp_combine -subtract $in_file1 060000 $in_file2 060000 out.nc
>
>

------------------------------------------------


More information about the Met_help mailing list