[Met_help] The GRIB file

John Halley Gotway johnhg at rap.ucar.edu
Tue May 5 08:19:21 MDT 2009


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