[Met_help] The GRIB file

John Halley Gotway johnhg at rap.ucar.edu
Thu May 7 06:58:04 MDT 2009

You are correct that when comparing a gridded forecast to point observations, you should use the Point-Stat tool.

And the PCP-Combine you're running looks to me like it would be correct.

But when you try to compare your gridded forecast to your point observations, you are getting 0 matched pairs.

There are three likely reasons why that might be happening:
(1) Perhaps none of the observations actually fall within your verification region.  Are the lat/lon values for the observations defined in "degrees_east" and "degrees_west"?  Do they fall within your
forecast domain?

(2) Perhaps none of the observation points are close enough in time to the forecast valid time.  You can set the "beg_ds" and "end_ds" parameters in the Point-Stat configuration file to define the
matching time window, or use the "-valid_beg" and "-valid_end" Point-Stat command line options set it manually.

(3) Are the "level" values set correctly for these observations.  Since you're verifying a precipitation accumulation, the observation level value should actually be the accumulation interval, in your
case "6" for 6 hours.  So when you run ASCII2NC for accumulated precipitation, the "Grib_Code" should be set to 61 and the "Level" should be set to 6.

If none of those suggestions enable you to get matched pairs, can you please send me your three input files for Point-Stat so I can take a closer look at this?
(1) The gridded forecast file "sample_fcst_6L_2007070712V_06A.nc".
(2) The NetCDF point observation file "sample_ascii2.nc".
(3) The PointStatConfig configuration file you're using.

Again, you could try posting them to our anonymous FTP site.  Here's an example of how you'd post to it:
ftp ftp.rap.ucar.edu
username = anonymous
password = zhxubinchaoshan at 163.com
cd /incoming/irap/johnhg
put sample_fcst_6L_2007070712V_06A.nc
put sample_ascii2.nc
put PointStatConfig


zhxubinchaoshan wrote:
> In MET, the only tool that I can use to compare a gridded forecast to point observations is the Point-Stat tool.And now I have processed the gridded forecast file using the PCP-Combine tool.
> The command I used is 
> ../bin/pcp_combine -subtract wrfprs_d01.012 12 wrfprs_d01.006 6 sample_fcst_6L_2007070712V_06A.nc
> So I think I get the accumulation of 6 hour precipitation from 06 UTC to 12 UTC, is that right?
> My precipitation observation data is the accumulation of 6 hour precipitation from 06 UTC to 12 UTC,and it is processed using the Ascii2nc.
> The command I used is
> ../bin/ascii2nc ./obsprocess/obs_07070712 ./sample_ascii.nc
> Then I run the Point-Stat tool, and the command I used is
> ../bin/point_stat sample_fcst_6L_2007070712V_06A.nc ./sample_ascii.nc ./PointStatConfig_07 -outdir ./out
> But there are some errors:
> ----------------------------------------
> Reading records for APCP_06/A6.
> For APCP_06/A6 found 1 forecast levels and 0 climatology levels.
> ----------------------------------------
> Searching 2340 observations from 2340 PrepBufr messages.
> ----------------------------------------
> Processing APCP_06/A6 versus APCP_06/A6, for observation type ADPSFC, over region FULL, for interpolation method LS_FIT(25), using 0 pairs.
> So I am confused that if the Point-Stat tool can not be used to do the verification of precipitation of station. Or is there something wrong I have made in the above processing?
> Thank you very much!
> 在2009-05-07,"John Halley Gotway" <johnhg at rap.ucar.edu> 写道:
>> I don't have much advice to offer about how to convert a network of point
>> observations into a gridded dataset.  I would guess that you could choose
>>from a variety of interpolation techniques, but I'd recommend that you be
>> careful.
>> There are gridded analysis fields of precipitation available within the
>> continental United States referred to as StageII and StageIV.  These are a
>> combination of precipitation gauge data and radar data that are mapped to
>> a grid, but I believe there's a good amount of work that goes into those
>> products.
>> So while interpolating point data onto a grid may not be that difficult,
>> I'd guess that it would be difficult to do a good job of it!  I'd worry
>> that you may be introducing errors into the gridded observation field in
>> the interpolation process.
>> That being said, you're welcome to use the MET tools however you like. 
>> And feel free to reuse any of the MET library code if you find it helpful.
>> It's all open source.
>> I've copied Tressa Fowler, the statistician who leads the MET development,
>> on this message.  She may be able to offer more advice on the statistical
>> implications of interpolating from points to a grid.
>> Good luck,
>> John
>>> Thank you! I think I know the format now.
>>> And I want to know that if I need to write the program myself when I am
>>> processing the station data to grided data.
>>> As you know, I need to do the interpolation form station to grided. And in
>>> the Point-Stat Tool, there are some interpolation methods, but they are
>>> used to process grided data to station data. So is there any program can
>>> help me do the interpolation or I need to do it with my own program?
>>> ÔÚ2009-05-05£¬"John Halley Gotway" <johnhg at rap.ucar.edu> дµÀ£º
>>>> Just look in the output of the test scripts that you ran after building
>>>> MET.  The files in METv2.0/out/pcp_combine provide a good example.  Just
>>>> run "ncdump -h" on them to see how the dimensions and
>>>> variables are defined.  Your dimensions, variables, and variable
>>>> attributes should be named the same as in the example.  The variable name
>>>> "APCP_12" means 12 hour of accumulation.  If for example, you
>>>> only have 6 hours of accumulation, it should be named "APCP_6".  Also,
>>>> the attributes ending with "_ut" are for unixtime, the number of seconds
>>>> since Jan 1, 1970.
>>>> dimensions:
>>>>        lat = 129 ;
>>>>        lon = 185 ;
>>>> variables:
>>>>        float APCP_12(lat, lon) ;
>>>>                APCP_12:grib_code = 61 ;
>>>>                APCP_12:units = "kg/m^2" ;
>>>>                APCP_12:long_name = "Total precipitation" ;
>>>>                APCP_12:level = "SFC" ;
>>>>                APCP_12:_FillValue = -9999.f ;
>>>>                APCP_12:init_time = "20050807_000000" ;
>>>>                APCP_12:init_time_ut = 1123372800 ;
>>>>                APCP_12:valid_time = "20050807_120000" ;
>>>>                APCP_12:valid_time_ut = 1123416000 ;
>>>>                APCP_12:accum_time = "12 hours" ;
>>>>                APCP_12:accum_time_sec = 43200 ;
>>>> The one area you may need some help is writing the projection information
>>>> to the NetCDF file.  Your forecast grid is a "Lambert Conformal" one.
>>>> Listed below is how you should set the projection
>>>> information in the global attributes section for the forecast domain
>>>> defined in the sample GRIB file you sent:
>>>>                :Projection = "Lambert Conformal" ;
>>>>                :p1_deg = "60.0 degrees_north" ;
>>>>                :p2_deg = "30.0 degrees_north" ;
>>>>                :p0_deg = "24.796 degrees_north" ;
>>>>                :l0_deg = "101.408 degrees_east" ;
>>>>                :lcen_deg = "105.0 degrees_east" ;
>>>>                :d_km = "12.0 km" ;
>>>>                :r_km = "6367.470000 km" ;
>>>>                :nx = "195 grid_points" ;
>>>>                :ny = "159 grid_points" ;
>>>> Good luck.
>>>> John
>>>> zhxubinchaoshan wrote:
>>>>> Thank you for your reply!
>>>>> I think I will write the output in specialized format of NetCDF like
>>>>> PCP-Combine tool.But what is the format of output of PCP-Combine tool?
>>>>> Can you give me an example?
>>>>> Thank you!
>>>>> ÔÚ2009-05-05£¬"John Halley Gotway" <johnhg at rap.ucar.edu> дµÀ£º
>>>>>> Let me make sure I understand.  Your forecast files are the gridded
>>>>>> output of WRF Post-Processor in GRIB format.  And your observations
>>>>>> are GTS SYNOP point observations that you've processed using
>>>>>> ASCII2NC.  In MET, the only tool that enables you to compare a gridded
>>>>>> forecast to point observations is the Point-Stat tool.
>>>>>> Now if you'd like to and are able to process your point observations
>>>>>> in some way onto a grid, then you'd be able to use Grid-Stat, MODE,
>>>>>> and the Wavelet-Stat tools.  And yes, you're correct, that
>>>>>> they'd need to be on the same domain as the gridded forecast before
>>>>>> you could run Grid-Stat, MODE, or Wavelet-Stat.  If you do try to
>>>>>> process the point observations onto a grid, you could either write
>>>>>> the output in GRIB format or a specialized format of NetCDF.
>>>>>> Basically, you could make the NetCDF file look like the output of the
>>>>>> PCP-Combine tool, and the other MET tools should be able to read that.
>>>>>> Thanks,
>>>>>> John
>>>>>> zhxubinchaoshan wrote:
>>>>>>> Thank you for your hints!
>>>>>>> But now my server can not connect, there is some problem on my
>>>>>>> laboratory network. I will try it tomorrow!
>>>>>>> I still have a question.If I want to use the MODE Tool and
>>>>>>> Wavelet-Stat Tool, and the precipitation data I have is the GTS data,
>>>>>>> must I transform the GTS data to the grid data in GRIB format?
>>>>>>> ÔÚ2009-05-05£¬"John Halley Gotway" <johnhg at rap.ucar.edu> дµÀ£º
>>>>>>>> Using the actual filename or a link to a file should both work fine
>>>>>>>> - unless there's some problem with how the link is set up.
>>>>>>>> I did set up a link and tried running PCP-Combine on the link and
>>>>>>>> the actual file name.  And both of them worked fine.
>>>>>>>> Can you try running a simple PCP-Combine command to see if it works:
>>>>>>>> METv2.0/bin/pcp_combine -add WRFPRS_d01.006 6 WRFPRS_d01.006 6
>>>>>>>> tmp.nc
>>>>>>>> Are you still getting that same error message?
>>>>>>>> John
>>>>>>>> zhxubinchaoshan wrote:
>>>>>>>>> Thank you for your reply!
>>>>>>>>> But the file wrfprs_d01.006 is linking to WRFPRS_d01.006, so I
>>>>>>>>> think they are the same.
>>>>>>>>> wrfprs_d01.006  -> WRFPRS_d01.006
>>>>>>>>> Is that right ?
>>>>>>>>> ÔÚ2009-05-05£¬"John Halley Gotway" <johnhg at rap.ucar.edu> дµÀ£º
>>>>>>>>>> Xubin,
>>>>>>>>>> I received the file and was able to run it through PCP-Combine
>>>>>>>>>> without any problems.
>>>>>>>>>> It appears that the problem is just that you're passing the wrong
>>>>>>>>>> file name to the tool.  The file you sent me is named
>>>>>>>>>> "WRFPRS_d01.006" in all capital letters.  However, the error
>>>>>>>>>> message you're
>>>>>>>>>> seeing is about this file name "wrfprs_d01.006" in all lower-case
>>>>>>>>>> letters.  Since filenames in Linux are case sensitive, that won't
>>>>>>>>>> work.  You need to pass the correct filename on the command line
>>>>>>>>>> to
>>>>>>>>>> the MET tools.
>>>>>>>>>> Try correcting the filename by using "WRFPRS_d01.006" and
>>>>>>>>>> hopefully that'll do the trick for you.
>>>>>>>>>> Thanks,
>>>>>>>>>> John Halley-Gotway
>>>>>>>>>> johnhg at ucar.edu
>>>>>>>>>> zhxubinchaoshan wrote:
>>>>>>>>>>> I have check the hints you gave, but neither of those is the
>>>>>>>>>>> problem!
>>>>>>>>>>> And when I connect to the FTP you gave, I found there was not the
>>>>>>>>>>> irap/johnhg directory in the incoming directory. Also, I can not
>>>>>>>>>>> upload the grib file.
>>>>>>>>>>> So I want to sent the file to you by e-mail! Thank you very much!
>>>>>>>>>>> ------------------------------------------------------------------------
>>>>>>>>>>> _______________________________________________
>>>>>>>>>>> Met_help mailing list
>>>>>>>>>>> Met_help at mailman.ucar.edu
>>>>>>>>>>> http://mailman.ucar.edu/mailman/listinfo/met_help

More information about the Met_help mailing list