[Met_help] Point_stat problem reading wrf data?

John Halley Gotway johnhg at rap.ucar.edu
Tue Oct 14 16:07:39 MDT 2008


Steve,

We did find a couple of bugs in the routine that rotates the winds from grid relative to earth relative.  The rotation angle value was being computed incorrectly, and a minus sign was dropped out of
the formula leading to the spurious results you're seeing.  Thanks for finding this issue!

The attached files contain the bug fix.  Incidentally, they also contain a second bug fix that was recently found.  The second bug fix relates to a GRIB variant for how a the grid description section
may be defined for Lat/Lon grids.  We had not yet encountered it, so it wasn't full supported.  It won't affect you at all because your data is on a Lambert Conf grid.

Please use the attached files as follows:
- Place "read_grib.cc" and "read_grib.h" files into the METv1.1/lib/vx_met_util directory.
- Place the "lc_grid.cc", "pc_grid.cc", and "st_grid.cc" files into the METv1.1/lib/vx_data_grids directory.
- From the METv1.1 directory, do a "make clean" followed by a "make".

And please let me know if the rotated wind values you're now seeing look correct.

Here are the values I'm now seeing for the 4 sample points:
Lat Lon X  Y  U(unrot) V(unrot) U(rot)  V(rot)
40  120 35 56 36.8662  -10.0353 37.5338 -7.14407
41  121 37 59 34.4267  -9.07513 35.0344 -7.56855
42  122 39 62 29.6161  -6.87538 29.9782 -5.06917
43  123 41 64 26.9167  -5.71527 27.1744 -4.32493

Sorry for the inconvenience, but thanks for uncovering the problem.  I'll also post these bug fixes to the known issues page of the MET website:
http://www.dtcenter.org/met/users/support/known_issues/METv1.1/index.php

Thanks!
John Halley Gotway
johnhg at ucar.edu

John Halley Gotway wrote:
> Steve,
> 
> I'm taking a look at this issue today.
> 
> Based on some initial hunting around, I'm guessing there may be a bug in the "rotate_uv_grid_to_earth" routine.  Point-Stat is correctly reading in the UGRD and VGRD at P200 records from the GRIB
> file.  It sees that the winds are defined relative to the grid since the Resolution flag is set to value of 8.  (That means that the 5th bit is set for reference to this table:
> http://www.nco.ncep.noaa.gov/pmb/docs/on388/table7.html)
> 
> Point-Stat then tries to rotate the winds to define them to be earth-relative rather than grid-relative.
> 
> Here are the values I'm seeing for the sample points:
> LAT   LON UGRD(GRID) VGRD(GRID) UGRD(EARTH) VGRD(EARTH)
> 40    120 36.8662    -10.0353   22.4013     -38.0352
> 41    121 34.4267    -9.97513   21.2419     -35.7547
> 42    122 29.6161    -6.87538   16.4512     -30.2009
> 43    123 26.9167    -5.71527   14.2337     -27.3012
> 
> So I'm wondering if there's a bug in the conversion step rotating from grid relative to earth relative.
> 
> I'll let you know what I find out.  Thanks for sending along sample data to help figure out what's going on!
> 
> John
> 
> 
> Masters.Steve wrote:
>> I am having some problems with point_stat as it reads a WRF dataset and
>> matches it up to the observed data.  I am using WRF 3.0.1 and MET 1.1
>> with (I hope) all of the relavent patches.  Both the WRF and MET codes
>> were compiled using the PGI compiler under a flavor of Red Hat Linux.  I
>> am using ascii2nc to convert my upper air data to netCDF format.  That
>> part of the process seems to work OK, and I can run point_stat and get
>> results.  When I look at the data, however, the WRF winds appear to be
>> incorrect.  
>>
>> I have created a simple case that illustrates the problem I am having.
>> I've wrapped up the files in a tar file a
>> ftp://ftp.ensco.com/gs/stevem/met-problem.tar.gz.  I've included a
>> 12-hour forecast wrf file in grib format.  I created some "dummy" upper
>> air data in dummy.upa (converted to dummy.nc) that has just 200 hPa
>> winds at four points.  This way, we can be sure of the match that we
>> get.  I've also included a brief GrADS script that pulls out its
>> estimate of the winds at these locations.  The point_stat configuration
>> file and run script are also included.  In the output directory is the
>> result of running the point_stat command.
>>
>> If you look at *mpr.txt file, you can easily see the dummy observations
>> and their correct values.  However, if you look at the forecast data,
>> and compare it to data pulled from the WRF file with grads, it seem
>> clear that the data coming out of MET is incorrect.  There is a high
>> negative v component, and the actual winds at this level are very nearly
>> zonal (as can be seen from the 200 hPa height plot).  It does not seem
>> to be a rotation problem, as the magnitudes from MET and grads seem
>> substantially different.
>>
>> I don't know if I am missing some important processing step or have
>> mis-coded a parameter here.  I tried several different interpolation
>> methods and all gave similar results.
>>
>> Steve Masters   masters.steve at ensco.com
>> ENSCO, Inc.
>> Melbourne, FL
>>
>> ......................................................................
>> The information contained in this email message is intended only for the use of the individuals to whom it is
>> addressed and may contain information that is privileged and sensitive. If the reader of this message is not
>> the intended recipient, you are hereby notified that any dissemination, distribution or copying of this
>> communication is strictly prohibited. If you have received this communication in error, please notify the
>> sender immediately by email at the above referenced address. Thank you.
>> _______________________________________________
>> Met_help mailing list
>> Met_help at mailman.ucar.edu
>> http://mailman.ucar.edu/mailman/listinfo/met_help
> _______________________________________________
> Met_help mailing list
> Met_help at mailman.ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/met_help
-------------- next part --------------
A non-text attachment was scrubbed...
Name: read_grib.cc
Type: text/x-c++src
Size: 47792 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/met_help/attachments/20081014/409466d9/read_grib-0002.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: read_grib.h
Type: text/x-chdr
Size: 3102 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/met_help/attachments/20081014/409466d9/read_grib-0003.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lc_grid.cc
Type: text/x-c++src
Size: 11454 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/met_help/attachments/20081014/409466d9/lc_grid-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pc_grid.cc
Type: text/x-c++src
Size: 5492 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/met_help/attachments/20081014/409466d9/pc_grid-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: st_grid.cc
Type: text/x-c++src
Size: 10443 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/met_help/attachments/20081014/409466d9/st_grid-0001.bin


More information about the Met_help mailing list