[Met_help] [rt.rap.ucar.edu #38892] History for Issue with reading GRIB files in pcp_combine

RAL HelpDesk {for John Halley Gotway} met_help at ucar.edu
Mon Jun 28 14:32:40 MDT 2010


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

Hi,

I recently compiled MET to do statistical analysis comparing multiple data assimilation forecasts to a truth simulation.  After installing the WRF post processor to convert NETCDF to GRIB, I am having issues running pcp_combine.  My grib files have the following name format:  wrfprs.d01.048 and are initialized at 12z 20080107.  I am using the following shell script but it keeps telling me it cannot open the grib files.  The precip field in the grib files is cummulative so I need to subtract files 3 hours apart to get a 3hr accumulated precip forecast at the later time.  I'm not sure what to use for the forecast interval for the first time in this case.  Any help would be appreciated since I have run out of ideas as to the problem.

#!/bin/sh

echo
echo "*** Running PCP-Combine to extract 3-hourly APCP accumulation forecasts from total model accum precip forecast for 06z 0108 ***"
../bin/pcp_combine \
   -subtract 20080108_060000 42 20080108_030000 3 \
   ..obs/out/pcp_combine/truth_3L_2008010806V_3A.nc \
   -pcpdir /data/NoN/TRUTH/TRUTH_18KM/postprd/


echo
echo "*** Running PCP-Combine to extract 3-hourly APCP accumulation forecasts from total model accum precip forecast for 12z 0108 ***"
../bin/pcp_combine \
   -subtract 20080108_120000 48 20080108_090000 3 \
   ..obs/out/pcp_combine/truth_3L_2008010812V_3A.nc \
   -pcpdir /data/NoN/TRUTH/TRUTH_18KM/postprd


echo
echo "*** Running PCP-Combine to extract 3-hourly APCP accumulation forecasts from total model accum precip forecast for 12z 0108 ***"
../bin/pcp_combine \
   -subtract 20080108_180000 54 20080108_150000 3 \
   ..obs/out/pcp_combine/truth_3L_2008010818V_3A.nc \
   -pcpdir /data/NoN/TRUTH/TRUTH_18KM/postprd

Thanks,
Dan Hartung



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

Subject: Re: [rt.rap.ucar.edu #38892] Issue with reading GRIB files in pcp_combine
From: John Halley Gotway
Time: Mon Jun 28 14:24:13 2010

Don,

We're happy to help you with this problem.

I think the problem here is how you're passing arguments to the PCP-
Combine tool.  I've listed below the rather LONG usage statement for
PCP-Combine.  In it, you'll notice that there are separate
required arguments for doing sums as opposed to addition and
subtraction.  Since you're performing subtraction, you should use
those arguments which are pretty simple... you just pass it the first
filename and accumulation interval followed by the second file name
and accumulation interval.  For example, suppose you want to subtract
6 hours of accumulation away from a 12-hour accumulation file.
 You'd do the following:
   pcp_combine -subtract in_file1.grb 12 in_file2.grb 6 out_file.nc

In the example you sent, it looks like you're specifying timestrings
and using the "-pcpdir" argument.  Those only apply when summing up
multiple files.  You just need to pass the actual filenames and
accumulation intervals you'd like to use.

Please let us know if you continue to experience problems.

Thanks,
John Halley Gotway
met_help at ucar.edu

Usage: pcp_combine
        [[-sum] sum_args] | [-add add_args] | [-subtract
subtract_args]
        [-gc code]
        [-ptv number]
        [-v level]

        where   "-sum sum_args" indicates that accumulations from
multiple files should be summed up using the arguments provided.
                "-add add_args" indicates that accumulations from two
files should be added together using the arguments provided.
                "-subtract subtract_args" indicates that accumulations
from two files should be subtracted using the arguments provided.
                "-gc code" overrides the default GRIB code (61) to be
used (optional).
                "-ptv number" overrides the default GRIB parameter
table version number (2) to be used (optional).
                "-v level" overrides the default level of logging (1)
(optional).

                Note: Specifying "-sum" is not required since it is
the default behavior.

        SUM_ARGS:
                init_time
                in_accum
                valid_time
                out_accum
                out_file
                [-pcpdir path]
                [-pcprx reg_exp]

                where   "init_time" indicates the initialization time
of the input Grib files in YYYYMMDD_HHMMSS format (required).
                        "in_accum" indicates the accumulation interval
of the input Grib files in HH format (required).
                        "valid_time" indicates the desired valid time
in YYYYMMDD_HHMMSS format (required).
                        "out_accum" indicates the desired accumulation
interval for the output NetCDF file in HH format (required).
                        "out_file" indicates the name of the output
NetCDF file to be written consisting of the sum of the accumulation
intervals (required).
                        "-pcpdir path" overrides the default
precipitation directory
(/d1/johnhg/MET/MET_releases/METv2.0_patch/data/sample_obs/ST2ml)
(optional).
                        "-pcprx reg_exp" overrides the default regular
expression for precipitation file naming convention (.*) (optional).

                        Note: Set init_time to 00000000_000000 when
summing observation files.

        ADD_ARGS and SUBTRACT_ARGS:
                in_file1
                accum1
                in_file2
                accum2
                out_file

                where   "in_file1" indicates the name of the first
input Grib file to be used (required).
                        "accum1" indicates the accumulation interval
to be used from in_file1 in HH format (required).
                        "in_file2" indicates the name of the second
input Grib file to be added to or subtracted from in_file1 (required).
                        "accum2" indicates the accumulation interval
to be used from in_file2 in HH format (required).
                        "out_file" indicates the name of the output
NetCDF file to be written (required).


RAL HelpDesk {for Dan Hartung} wrote:
> Mon Jun 28 13:09:28 2010: Request 38892 was acted upon.
> Transaction: Ticket created by daniel.hartung at ssec.wisc.edu
>        Queue: met_help
>      Subject: Issue with reading GRIB files in pcp_combine
>        Owner: Nobody
>   Requestors: daniel.hartung at ssec.wisc.edu
>       Status: new
>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=38892 >
>
>
> Hi,
>
> I recently compiled MET to do statistical analysis comparing
multiple data assimilation forecasts to a truth simulation.  After
installing the WRF post processor to convert NETCDF to GRIB, I am
having issues running pcp_combine.  My grib files have the following
name format:  wrfprs.d01.048 and are initialized at 12z 20080107.  I
am using the following shell script but it keeps telling me it cannot
open the grib files.  The precip field in the grib files is
cummulative so I need to subtract files 3 hours apart to get a 3hr
accumulated precip forecast at the later time.  I'm not sure what to
use for the forecast interval for the first time in this case.  Any
help would be appreciated since I have run out of ideas as to the
problem.
>
> #!/bin/sh
>
> echo
> echo "*** Running PCP-Combine to extract 3-hourly APCP accumulation
forecasts from total model accum precip forecast for 06z 0108 ***"
> ../bin/pcp_combine \
>    -subtract 20080108_060000 42 20080108_030000 3 \
>    ..obs/out/pcp_combine/truth_3L_2008010806V_3A.nc \
>    -pcpdir /data/NoN/TRUTH/TRUTH_18KM/postprd/
>
>
> echo
> echo "*** Running PCP-Combine to extract 3-hourly APCP accumulation
forecasts from total model accum precip forecast for 12z 0108 ***"
> ../bin/pcp_combine \
>    -subtract 20080108_120000 48 20080108_090000 3 \
>    ..obs/out/pcp_combine/truth_3L_2008010812V_3A.nc \
>    -pcpdir /data/NoN/TRUTH/TRUTH_18KM/postprd
>
>
> echo
> echo "*** Running PCP-Combine to extract 3-hourly APCP accumulation
forecasts from total model accum precip forecast for 12z 0108 ***"
> ../bin/pcp_combine \
>    -subtract 20080108_180000 54 20080108_150000 3 \
>    ..obs/out/pcp_combine/truth_3L_2008010818V_3A.nc \
>    -pcpdir /data/NoN/TRUTH/TRUTH_18KM/postprd
>
> Thanks,
> Dan Hartung
>

------------------------------------------------
Subject: Re: [rt.rap.ucar.edu #38892] Issue with reading GRIB files in pcp_combine
From: Dan Hartung
Time: Mon Jun 28 14:30:39 2010

Thanks so much for your help John!  I moved the bash script to the
directory with my data and reran with your suggestions.  Success!

-Dan


On Jun 28, 2010, at 3:24 PM, RAL HelpDesk {for John Halley Gotway}
wrote:

> Don,
>
> We're happy to help you with this problem.
>
> I think the problem here is how you're passing arguments to the PCP-
Combine tool.  I've listed below the rather LONG usage statement for
PCP-Combine.  In it, you'll notice that there are separate
> required arguments for doing sums as opposed to addition and
subtraction.  Since you're performing subtraction, you should use
those arguments which are pretty simple... you just pass it the first
> filename and accumulation interval followed by the second file name
and accumulation interval.  For example, suppose you want to subtract
6 hours of accumulation away from a 12-hour accumulation file.
> You'd do the following:
>   pcp_combine -subtract in_file1.grb 12 in_file2.grb 6 out_file.nc
>
> In the example you sent, it looks like you're specifying timestrings
and using the "-pcpdir" argument.  Those only apply when summing up
multiple files.  You just need to pass the actual filenames and
> accumulation intervals you'd like to use.
>
> Please let us know if you continue to experience problems.
>
> Thanks,
> John Halley Gotway
> met_help at ucar.edu
>
> Usage: pcp_combine
>        [[-sum] sum_args] | [-add add_args] | [-subtract
subtract_args]
>        [-gc code]
>        [-ptv number]
>        [-v level]
>
>        where   "-sum sum_args" indicates that accumulations from
multiple files should be summed up using the arguments provided.
>                "-add add_args" indicates that accumulations from two
files should be added together using the arguments provided.
>                "-subtract subtract_args" indicates that
accumulations from two files should be subtracted using the arguments
provided.
>                "-gc code" overrides the default GRIB code (61) to be
used (optional).
>                "-ptv number" overrides the default GRIB parameter
table version number (2) to be used (optional).
>                "-v level" overrides the default level of logging (1)
(optional).
>
>                Note: Specifying "-sum" is not required since it is
the default behavior.
>
>        SUM_ARGS:
>                init_time
>                in_accum
>                valid_time
>                out_accum
>                out_file
>                [-pcpdir path]
>                [-pcprx reg_exp]
>
>                where   "init_time" indicates the initialization time
of the input Grib files in YYYYMMDD_HHMMSS format (required).
>                        "in_accum" indicates the accumulation
interval of the input Grib files in HH format (required).
>                        "valid_time" indicates the desired valid time
in YYYYMMDD_HHMMSS format (required).
>                        "out_accum" indicates the desired
accumulation interval for the output NetCDF file in HH format
(required).
>                        "out_file" indicates the name of the output
NetCDF file to be written consisting of the sum of the accumulation
intervals (required).
>                        "-pcpdir path" overrides the default
precipitation directory
(/d1/johnhg/MET/MET_releases/METv2.0_patch/data/sample_obs/ST2ml)
(optional).
>                        "-pcprx reg_exp" overrides the default
regular expression for precipitation file naming convention (.*)
(optional).
>
>                        Note: Set init_time to 00000000_000000 when
summing observation files.
>
>        ADD_ARGS and SUBTRACT_ARGS:
>                in_file1
>                accum1
>                in_file2
>                accum2
>                out_file
>
>                where   "in_file1" indicates the name of the first
input Grib file to be used (required).
>                        "accum1" indicates the accumulation interval
to be used from in_file1 in HH format (required).
>                        "in_file2" indicates the name of the second
input Grib file to be added to or subtracted from in_file1 (required).
>                        "accum2" indicates the accumulation interval
to be used from in_file2 in HH format (required).
>                        "out_file" indicates the name of the output
NetCDF file to be written (required).
>
>
> RAL HelpDesk {for Dan Hartung} wrote:
>> Mon Jun 28 13:09:28 2010: Request 38892 was acted upon.
>> Transaction: Ticket created by daniel.hartung at ssec.wisc.edu
>>       Queue: met_help
>>     Subject: Issue with reading GRIB files in pcp_combine
>>       Owner: Nobody
>>  Requestors: daniel.hartung at ssec.wisc.edu
>>      Status: new
>> Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=38892 >
>>
>>
>> Hi,
>>
>> I recently compiled MET to do statistical analysis comparing
multiple data assimilation forecasts to a truth simulation.  After
installing the WRF post processor to convert NETCDF to GRIB, I am
having issues running pcp_combine.  My grib files have the following
name format:  wrfprs.d01.048 and are initialized at 12z 20080107.  I
am using the following shell script but it keeps telling me it cannot
open the grib files.  The precip field in the grib files is
cummulative so I need to subtract files 3 hours apart to get a 3hr
accumulated precip forecast at the later time.  I'm not sure what to
use for the forecast interval for the first time in this case.  Any
help would be appreciated since I have run out of ideas as to the
problem.
>>
>> #!/bin/sh
>>
>> echo
>> echo "*** Running PCP-Combine to extract 3-hourly APCP accumulation
forecasts from total model accum precip forecast for 06z 0108 ***"
>> ../bin/pcp_combine \
>>   -subtract 20080108_060000 42 20080108_030000 3 \
>>   ..obs/out/pcp_combine/truth_3L_2008010806V_3A.nc \
>>   -pcpdir /data/NoN/TRUTH/TRUTH_18KM/postprd/
>>
>>
>> echo
>> echo "*** Running PCP-Combine to extract 3-hourly APCP accumulation
forecasts from total model accum precip forecast for 12z 0108 ***"
>> ../bin/pcp_combine \
>>   -subtract 20080108_120000 48 20080108_090000 3 \
>>   ..obs/out/pcp_combine/truth_3L_2008010812V_3A.nc \
>>   -pcpdir /data/NoN/TRUTH/TRUTH_18KM/postprd
>>
>>
>> echo
>> echo "*** Running PCP-Combine to extract 3-hourly APCP accumulation
forecasts from total model accum precip forecast for 12z 0108 ***"
>> ../bin/pcp_combine \
>>   -subtract 20080108_180000 54 20080108_150000 3 \
>>   ..obs/out/pcp_combine/truth_3L_2008010818V_3A.nc \
>>   -pcpdir /data/NoN/TRUTH/TRUTH_18KM/postprd
>>
>> Thanks,
>> Dan Hartung
>>
>


------------------------------------------------
Subject: Issue with reading GRIB files in pcp_combine
From: John Halley Gotway
Time: Mon Jun 28 14:32:39 2010

Glad that did the trick.  Just let us know if any more questions come
up in your use of MET.

Thanks,
John

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


More information about the Met_help mailing list