[Met_help] [rt.rap.ucar.edu #58534] History for about accumulated precipitation

John Halley Gotway via RT met_help at ucar.edu
Mon Oct 15 08:29:21 MDT 2012


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

Hello,
I run WRF model for 72-hours. How can I modify WRF outputs that it has accumulated precipitation for 0-12hours, 12-24hours, 24-36hours and 36-48hours in grib format and my new files only include accumulated precipitation?
I would like my new outputs to be in grib format. How can I do that?
Please help me,
Thanks,

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

Subject: Re: [rt.rap.ucar.edu #58534] about accumulated precipitation
From: John Halley Gotway
Time: Mon Oct 01 07:52:52 2012

Hello,

Since your output contains a runtime accumulation of precipitation, I
assume that you're running the WRF-ARW model.  It sounds like you'd
like to break that runtime accumulation down into smaller
accumulations intervals.  There are a few pieces of information that
may be helpful.

First, when you run WRF-ARW, you could configure it to dump out
precipitation every 12-hours.  By default, precipitation is
accumulated over the entire model run, but you can set the "bucket_mm"
namelist option to specify a shorter time interval if you'd like.
Take a look at page 5-34 of the WRF-ARW users guide for more
information
(www.mmm.ucar.edu/wrf/users/docs/user_guide_V3/ARWUsersGuideV3.pdf).

Second, you could use the pcp_combine tool within MET
(http://www.dtcenter.org/met/users/support/online_tutorial/METv4.0/pcp_combine/index.php)
to perform addition and subtraction operations for
precipitation.  MET works best when dealing with gridded data files in
GRIB format.  We recommend that WRF users post-process their model
output using the Unified Post-Processor (UPP).  The output of
UPP is in GRIB format.  Then, when you run the GRIB files through the
MET pcp_combine tool, it's output is in NetCDF format.  The NetCDF
output of pcp_combine can then be used as input to the other
MET verification tools.  Here's an example of using pcp_combine to
perform a subtraction operation:

    pcp_combine -subtract file1.grb 36 file2.grb 24 apcp_36_24.nc

It will look in file1.grb and file2.grb for 36-hour and 24-hour
accumulations of precipitation and then take their difference.

Lastly, there's a set of tools out there called the NetCDF Operators,
or NCO (http://nco.sourceforge.net).  It's a set of command-line tools
for performing operations on NetCDF files.  I have very
little experience using them, but you might be able to use them to
take a difference if you wanted to operate on the raw NetCDF output of
WRF.

Hope that helps lay out some options for you.

Thanks,
John Halley Gotway
met_help at ucar.edu

On 09/30/2012 02:16 AM, M M via RT wrote:
>
> Sun Sep 30 02:16:25 2012: Request 58534 was acted upon.
> Transaction: Ticket created by weather1388 at yahoo.com
>         Queue: met_help
>       Subject: about accumulated precipitation
>         Owner: Nobody
>    Requestors: weather1388 at yahoo.com
>        Status: new
>   Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=58534 >
>
>
> Hello,
> I run WRF model for 72-hours. How can I modify WRF outputs that it
has accumulated precipitation for 0-12hours, 12-24hours, 24-36hours
and 36-48hours in grib format and my new files only include
accumulated precipitation?
> I would like my new outputs to be in grib format. How can I do that?
> Please help me,
> Thanks,
>

------------------------------------------------
Subject: about accumulated precipitation 
From: M M
Time: Tue Oct 09 03:55:05 2012

No, I still have a problem.
 I don't know how subtract 00-06precipitation from 00-24 and get grib
format file. Then sum 06-24and 24-30 precipitation in grib format.
Finally I want 06-30 precipitation in grib format.
How can I get 06-30 precipitation in grib format from output of wrf?
 
Thanks,



________________________________
From: John Halley Gotway via RT <met_help at ucar.edu>
To: weather1388 at yahoo.com
Sent: Monday, October 8, 2012 6:18 PM
Subject: [rt.rap.ucar.edu #58534] Resolved: about accumulated
precipitation

According to our records, your request has been resolved. If you have
any
further questions or concerns, please respond to this message.

------------------------------------------------
Subject: Re: [rt.rap.ucar.edu #58534] Resolved: about accumulated precipitation
From: John Halley Gotway
Time: Tue Oct 09 07:46:05 2012

MET cannot handle the direct output from WRF.  You must first post-
process your WRF output.  We recommend running the Unified Post
Processor (UPP) on your WRF output files.  The output of UPP is in
GRIB format.  Then you can use the MET pcp_combine tool to do the
subtraction (30 hour forecast - 6 hour forecast) that you'd like.
However, the output of pcp_combine is in NetCDF format, not GRIB.
But it is a NetCDF format that the rest of the MET tools can read.  I
assume that you want a 6-30 hour accumulation in GRIB format to use
for the MET tools.

Do those step make sense?

Thanks,
John Halley Gotway
met_help at ucar.edu



On 10/09/2012 03:55 AM, M M via RT wrote:
>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=58534 >
>
> No, I still have a problem.
>   I don't know how subtract 00-06precipitation from 00-24 and get
grib format file. Then sum 06-24and 24-30 precipitation in grib
format. Finally I want 06-30 precipitation in grib format.
> How can I get 06-30 precipitation in grib format from output of wrf?
>
> Thanks,
>
>
>
> ________________________________
> From: John Halley Gotway via RT <met_help at ucar.edu>
> To: weather1388 at yahoo.com
> Sent: Monday, October 8, 2012 6:18 PM
> Subject: [rt.rap.ucar.edu #58534] Resolved: about accumulated
precipitation
>
> According to our records, your request has been resolved. If you
have any
> further questions or concerns, please respond to this message.
>

------------------------------------------------
Subject: about accumulated precipitation 
From: M M
Time: Wed Oct 10 00:06:19 2012

Thanks,
I used UPP on my WRF output. But it gets me 0-06, 00-24, 24-48
accumulation in grib format and don't give me 06-30 accumulation. I
want 06-30 accumulation in grib or nc format for using in MET. How can
I sum 0-24 & 24-30 for getting 0-30 then subtract 0-06 from 00-30 for
getting 06-30 in grib or nc format? How can I have 06-30 accumulation
in grib or nc format?
Because of My observations for accumulated precipitation are from 06
to 06 next day I want to get 06-30 accumulation in grib or nc format
from WRF for verification by MET. please help me?
Thanks a lot,
 



________________________________
From: John Halley Gotway via RT <met_help at ucar.edu>
To: weather1388 at yahoo.com
Sent: Tuesday, October 9, 2012 5:16 PM
Subject: Re: [rt.rap.ucar.edu #58534] Resolved: about accumulated
precipitation

MET cannot handle the direct output from WRF.  You must first post-
process your WRF output.  We recommend running the Unified Post
Processor (UPP) on your WRF output files.  The output of UPP is in
GRIB format.  Then you can use the MET pcp_combine tool to do the
subtraction (30 hour forecast - 6 hour forecast) that you'd like.
However, the output of pcp_combine is in NetCDF format, not GRIB.
But it is a NetCDF format that the rest of the MET tools can read.  I
assume that you want a 6-30 hour accumulation in GRIB format to use
for the MET tools.

Do those step make sense?

Thanks,
John Halley Gotway
met_help at ucar.edu



On 10/09/2012 03:55 AM, M M via RT wrote:
>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=58534 >
>
> No, I still have a problem.
>  I don't know how subtract 00-06precipitation from 00-24 and get
grib format file. Then sum 06-24and 24-30 precipitation in grib
format. Finally I want 06-30 precipitation in grib format.
> How can I get 06-30 precipitation in grib format from output of wrf?
>
> Thanks,
>
>
>
> ________________________________
> From: John Halley Gotway via RT <met_help at ucar.edu>
> To: weather1388 at yahoo.com
> Sent: Monday, October 8, 2012 6:18 PM
> Subject: [rt.rap.ucar.edu #58534] Resolved: about accumulated
precipitation
>
> According to our records, your request has been resolved. If you
have any
> further questions or concerns, please respond to this message.
>

------------------------------------------------
Subject: Re: [rt.rap.ucar.edu #58534] Resolved: about accumulated precipitation
From: John Halley Gotway
Time: Wed Oct 10 10:13:16 2012

OK, I understand now.  Based on the accumulation intervals you have in
your output, it looks like the precipitation bucket is being dumped
every 24 hours.  But you would like to compute a 24-hour
accumulation between 6 and 30 hours.  It should be possible to do this
but it will be a bit clumsy two-step process which I'll describe
below.

However, if you have control over the WRF model being run, I would
suggest reconfiguring it to control the precipitation accumulations
being written.  The way to do this differs depending on whether
you're running WRF-ARW or WRF-NMM.  For WRF-NMM, you'd set the "tprec"
namelist option to the number of hours of accumulation you'd like.
For WRF-ARW, you'd set the "prec_acc_dt" namelist option to
the number of minutes of accumulation you'd like.  See the
corresponding user's guide for more details on this.  It's up to you
to decide what accumulations you'd like, but I would suggest using
6-hour accumulations.

Now, for the data you currently have, here are the 2 steps that would
get you to a 6-30 hour accumulation:

# Add the 24-hour forecast (0 - 24 hour accumulation) to the 30-hour
forecast (24 - 30 hour accumulation) to get a 0 - 30 hour accumulation
pcp_combine -add wrf_24hr.grib 24 wrf_30hr.grib 30 apcp_0_to_30.nc

# Subtract the 6-hour forecast (0 - 6 hour accumulation) from the 0 -
30 hour accumulation
pcp_combine -subtract apcp_0_to_30.nc 'name="APCP_30"; level="(*,*)";'
wrf_6hr.grib 6 apcp_6_to_30.nc

The weird option for the first argument tells the pcp_combine tool
which field you'd like to use from that NetCDF file.

Hope that helps.

Thanks,
John

On 10/10/2012 12:06 AM, M M via RT wrote:
>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=58534 >
>
> Thanks,
> I used UPP on my WRF output. But it gets me 0-06, 00-24, 24-48
accumulation in grib format and don't give me 06-30 accumulation. I
want 06-30 accumulation in grib or nc format for using in MET. How can
I sum 0-24 & 24-30 for getting 0-30 then subtract 0-06 from 00-30 for
getting 06-30 in grib or nc format? How can I have 06-30 accumulation
in grib or nc format?
> Because of My observations for accumulated precipitation are from 06
to 06 next day I want to get 06-30 accumulation in grib or nc format
from WRF for verification by MET. please help me?
> Thanks a lot,
>
>
>
>
> ________________________________
> From: John Halley Gotway via RT <met_help at ucar.edu>
> To: weather1388 at yahoo.com
> Sent: Tuesday, October 9, 2012 5:16 PM
> Subject: Re: [rt.rap.ucar.edu #58534] Resolved: about accumulated
precipitation
>
> MET cannot handle the direct output from WRF.  You must first post-
process your WRF output.  We recommend running the Unified Post
Processor (UPP) on your WRF output files.  The output of UPP is in
> GRIB format.  Then you can use the MET pcp_combine tool to do the
subtraction (30 hour forecast - 6 hour forecast) that you'd like.
However, the output of pcp_combine is in NetCDF format, not GRIB.
> But it is a NetCDF format that the rest of the MET tools can read.
I assume that you want a 6-30 hour accumulation in GRIB format to use
for the MET tools.
>
> Do those step make sense?
>
> Thanks,
> John Halley Gotway
> met_help at ucar.edu
>
>
>
> On 10/09/2012 03:55 AM, M M via RT wrote:
>>
>> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=58534 >
>>
>> No, I still have a problem.
>>    I don't know how subtract 00-06precipitation from 00-24 and get
grib format file. Then sum 06-24and 24-30 precipitation in grib
format. Finally I want 06-30 precipitation in grib format.
>> How can I get 06-30 precipitation in grib format from output of
wrf?
>>
>> Thanks,
>>
>>
>>
>> ________________________________
>> From: John Halley Gotway via RT <met_help at ucar.edu>
>> To: weather1388 at yahoo.com
>> Sent: Monday, October 8, 2012 6:18 PM
>> Subject: [rt.rap.ucar.edu #58534] Resolved: about accumulated
precipitation
>>
>> According to our records, your request has been resolved. If you
have any
>> further questions or concerns, please respond to this message.
>>

------------------------------------------------
Subject: about accumulated precipitation 
From: M M
Time: Sat Oct 13 04:45:10 2012

Thanks, that was a good help for me.
 
I did those 2 steps for getting 6-30 hour accumulation. First I ran
pcp_combine -add wrf_d01_024.grb 24 wrf_d01_030.grb 6 apcp_0_30.nc it
give the 0-30 hour accumulation.  It was correct. Then I ran
pcp_combine -add apcp_6_24.nc 'name="APCP_30"; level="(*,*)";'
wrf_d01_030.grb 30 apcp_0_30.nc  .
 But it gives the following error:
Readinginput file: apcp_6_24.nc
 
 
  GribFile::skip_header() -> can't find "GRIB" magic cookie
 
 
 
ERROR: get_field() -> can't open grib file: apcp_6_24.nc
 
 
How can I fix it? How do I have 6-30 or 0-30 accumulation in grib
format?
How do I convert nc to grib?
 
In MET package there are some sample forecast files. Some of them
are wrf outputs. They are in grib format and have for example sfc: 0-
24hr and: sfc: 21-24hr accumulation precipitation. How does it do to
have 0-24 and 21-24 in one file in grib format?
 
I ran again model for testing "tprec" option. I set "tprec"=6. Then
I used UPP on my WRF output. But it give me 0-6, 6-12,12-18,18-24,24-
30,30-36 accumulation not 6-30 accumulation. How does it set for
giving 6-30 accumulation?
Because I ran model before and now have wrfout I had to add 0-24 & 24-
30 and then subtract 0-6 from 0-30.
Please help me,
Thanks,



________________________________
From: John Halley Gotway via RT <met_help at ucar.edu>
To: weather1388 at yahoo.com
Sent: Wednesday, October 10, 2012 7:43 PM
Subject: Re: [rt.rap.ucar.edu #58534] Resolved: about accumulated
precipitation

OK, I understand now.  Based on the accumulation intervals you have in
your output, it looks like the precipitation bucket is being dumped
every 24 hours.  But you would like to compute a 24-hour
accumulation between 6 and 30 hours.  It should be possible to do this
but it will be a bit clumsy two-step process which I'll describe
below.

However, if you have control over the WRF model being run, I would
suggest reconfiguring it to control the precipitation accumulations
being written.  The way to do this differs depending on whether
you're running WRF-ARW or WRF-NMM.  For WRF-NMM, you'd set the "tprec"
namelist option to the number of hours of accumulation you'd like.
For WRF-ARW, you'd set the "prec_acc_dt" namelist option to
the number of minutes of accumulation you'd like.  See the
corresponding user's guide for more details on this.  It's up to you
to decide what accumulations you'd like, but I would suggest using
6-hour accumulations.

Now, for the data you currently have, here are the 2 steps that would
get you to a 6-30 hour accumulation:

# Add the 24-hour forecast (0 - 24 hour accumulation) to the 30-hour
forecast (24 - 30 hour accumulation) to get a 0 - 30 hour accumulation
pcp_combine -add wrf_24hr.grib 24 wrf_30hr.grib 30 apcp_0_to_30.nc

# Subtract the 6-hour forecast (0 - 6 hour accumulation) from the 0 -
30 hour accumulation
pcp_combine -subtract apcp_0_to_30.nc 'name="APCP_30"; level="(*,*)";'
wrf_6hr.grib 6 apcp_6_to_30.nc

The weird option for the first argument tells the pcp_combine tool
which field you'd like to use from that NetCDF file.

Hope that helps.

Thanks,
John

On 10/10/2012 12:06 AM, M M via RT wrote:
>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=58534 >
>
> Thanks,
> I used UPP on my WRF output. But it gets me 0-06, 00-24, 24-48
accumulation in grib format and don't give me 06-30 accumulation. I
want 06-30 accumulation in grib or nc format for using in MET. How can
I sum 0-24 & 24-30 for getting 0-30 then subtract 0-06 from 00-30 for
getting 06-30 in grib or nc format? How can I have 06-30 accumulation
in grib or nc format?
> Because of My observations for accumulated precipitation are from 06
to 06 next day I want to get 06-30 accumulation in grib or nc format
from WRF for verification by MET. please help me?
> Thanks a lot,
>
>
>
>
> ________________________________
> From: John Halley Gotway via RT <met_help at ucar.edu>
> To: weather1388 at yahoo.com
> Sent: Tuesday, October 9, 2012 5:16 PM
> Subject: Re: [rt.rap.ucar.edu #58534] Resolved: about accumulated
precipitation
>
> MET cannot handle the direct output from WRF.  You must first post-
process your WRF output.  We recommend running the Unified Post
Processor (UPP) on your WRF output files.  The output of UPP is in
> GRIB format.  Then you can use the MET pcp_combine tool to do the
subtraction (30 hour forecast - 6 hour forecast) that you'd like.
However, the output of pcp_combine is in NetCDF format, not GRIB.
> But it is a NetCDF format that the rest of the MET tools can read.
I assume that you want a 6-30 hour accumulation in GRIB format to use
for the MET tools.
>
> Do those step make sense?
>
> Thanks,
> John Halley Gotway
> met_help at ucar.edu
>
>
>
> On 10/09/2012 03:55 AM, M M via RT wrote:
>>
>> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=58534 >
>>
>> No, I still have a problem.
>>    I don't know how subtract 00-06precipitation from 00-24 and get
grib format file. Then sum 06-24and 24-30 precipitation in grib
format. Finally I want 06-30 precipitation in grib format.
>> How can I get 06-30 precipitation in grib format from output of
wrf?
>>
>> Thanks,
>>
>>
>>
>> ________________________________
>> From: John Halley Gotway via RT <met_help at ucar.edu>
>> To: weather1388 at yahoo.com
>> Sent: Monday, October 8, 2012 6:18 PM
>> Subject: [rt.rap.ucar.edu #58534] Resolved: about accumulated
precipitation
>>
>> According to our records, your request has been resolved. If you
have any
>> further questions or concerns, please respond to this message.
>>

------------------------------------------------
Subject: about accumulated precipitation 
From: M M
Time: Sat Oct 13 04:49:28 2012

Excuse me last email was wrong .this is correct.
Thanks, that was a good help for me.
 
I did those 2 steps for getting 6-30 hour accumulation. First I ran
pcp_combine -add wrf_d01_024.grb 24 wrf_d01_030.grb 6 apcp_0_30.nc it
give the 0-30 hour accumulation.  It was correct. Then I ran
pcp_combine -subtract apcp_0_30.nc 'name="APCP_30";level="(*,*)";'
wrf_d01_006.grb 6 apcp_6_30.nc  .
 But it gives the following error:
Readinginput file: apcp_6_24.nc
 
 
  GribFile::skip_header() -> can't find "GRIB" magic cookie
 
 
 
ERROR: get_field() -> can't open grib file: apcp_6_24.nc
 
 
How can I fix it? How do I have 6-30 or 0-30 accumulation in grib
format?
How do I convert nc to grib?
 
In MET package there are some sample forecast files. Some of them
are wrf outputs. They are in grib format and have for example sfc: 0-
24hr and: sfc: 21-24hr accumulation precipitation. How does it do to
have 0-24 and 21-24 in one file in grib format?
 
I ran again model for testing "tprec" option. I set "tprec"=6. Then
I used UPP on my WRF output. But it give me 0-6, 6-12,12-18,18-24,24-
30,30-36 accumulation not 6-30 accumulation. How does it set for
giving 6-30 accumulation?
Because I ran model before and now have wrfout I had to add 0-24 & 24-
30 and then subtract 0-6 from 0-30.
Please help me,
Thanks,
 



________________________________
From: John Halley Gotway via RT <met_help at ucar.edu>
To: weather1388 at yahoo.com
Sent: Wednesday, October 10, 2012 7:43 PM
Subject: Re: [rt.rap.ucar.edu #58534] Resolved: about accumulated
precipitation

OK, I understand now.  Based on the accumulation intervals you have in
your output, it looks like the precipitation bucket is being dumped
every 24 hours.  But you would like to compute a 24-hour
accumulation between 6 and 30 hours.  It should be possible to do this
but it will be a bit clumsy two-step process which I'll describe
below.

However, if you have control over the WRF model being run, I would
suggest reconfiguring it to control the precipitation accumulations
being written.  The way to do this differs depending on whether
you're running WRF-ARW or WRF-NMM.  For WRF-NMM, you'd set the "tprec"
namelist option to the number of hours of accumulation you'd like.
For WRF-ARW, you'd set the "prec_acc_dt" namelist option to
the number of minutes of accumulation you'd like.  See the
corresponding user's guide for more details on this.  It's up to you
to decide what accumulations you'd like, but I would suggest using
6-hour accumulations.

Now, for the data you currently have, here are the 2 steps that would
get you to a 6-30 hour accumulation:

# Add the 24-hour forecast (0 - 24 hour accumulation) to the 30-hour
forecast (24 - 30 hour accumulation) to get a 0 - 30 hour accumulation
pcp_combine -add wrf_24hr.grib 24 wrf_30hr.grib 30 apcp_0_to_30.nc

# Subtract the 6-hour forecast (0 - 6 hour accumulation) from the 0 -
30 hour accumulation
pcp_combine -subtract apcp_0_to_30.nc 'name="APCP_30"; level="(*,*)";'
wrf_6hr.grib 6 apcp_6_to_30.nc

The weird option for the first argument tells the pcp_combine tool
which field you'd like to use from that NetCDF file.

Hope that helps.

Thanks,
John

On 10/10/2012 12:06 AM, M M via RT wrote:
>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=58534 >
>
> Thanks,
> I used UPP on my WRF output. But it gets me 0-06, 00-24, 24-48
accumulation in grib format and don't give me 06-30 accumulation. I
want 06-30 accumulation in grib or nc format for using in MET. How can
I sum 0-24 & 24-30 for getting 0-30 then subtract 0-06 from 00-30 for
getting 06-30 in grib or nc format? How can I have 06-30 accumulation
in grib or nc format?
> Because of My observations for accumulated precipitation are from 06
to 06 next day I want to get 06-30 accumulation in grib or nc format
from WRF for verification by MET. please help me?
> Thanks a lot,
>
>
>
>
> ________________________________
> From: John Halley Gotway via RT <met_help at ucar.edu>
> To: weather1388 at yahoo.com
> Sent: Tuesday, October 9, 2012 5:16 PM
> Subject: Re: [rt.rap.ucar.edu #58534] Resolved: about accumulated
precipitation
>
> MET cannot handle the direct output from WRF.  You must first post-
process your WRF output.  We recommend running the Unified Post
Processor (UPP) on your WRF output files.  The output of UPP is in
> GRIB format.  Then you can use the MET pcp_combine tool to do the
subtraction (30 hour forecast - 6 hour forecast) that you'd like.
However, the output of pcp_combine is in NetCDF format, not GRIB.
> But it is a NetCDF format that the rest of the MET tools can read.
I assume that you want a 6-30 hour accumulation in GRIB format to use
for the MET tools.
>
> Do those step make sense?
>
> Thanks,
> John Halley Gotway
> met_help at ucar.edu
>
>
>
> On 10/09/2012 03:55 AM, M M via RT wrote:
>>
>> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=58534 >
>>
>> No, I still have a problem.
>>    I don't know how subtract 00-06precipitation from 00-24 and get
grib format file. Then sum 06-24and 24-30 precipitation in grib
format. Finally I want 06-30 precipitation in grib format.
>> How can I get 06-30 precipitation in grib format from output of
wrf?
>>
>> Thanks,
>>
>>
>>
>> ________________________________
>> From: John Halley Gotway via RT <met_help at ucar.edu>
>> To: weather1388 at yahoo.com
>> Sent: Monday, October 8, 2012 6:18 PM
>> Subject: [rt.rap.ucar.edu #58534] Resolved: about accumulated
precipitation
>>
>> According to our records, your request has been resolved. If you
have any
>> further questions or concerns, please respond to this message.
>>

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


More information about the Met_help mailing list