[Met_help] MODE problem

John Halley Gotway johnhg at rap.ucar.edu
Tue Feb 16 19:59:52 MST 2010


Jeff,

OK, so here's the grid definition you sent me for your forecast file:
   Lambert Conf: Lat1 33.578000 Lon1 -104.412000 Lov -96.986000
       Latin1 37.205000 Latin2 37.205000 LatSP 0.000000 LonSP 0.000000
       North Pole (332 x 316) Dx 3.000000 Dy 3.000000 scan 64 mode 136

And I ran the Stage4 file you sent me through wgrib as well.  Here's the
grid definition for that Stage4 file:
   Lambert Conf: Lat1 33.443000 Lon1 -105.439000 Lov -99.179000
       Latin1 37.205000 Latin2 37.205000 LatSP 0.000000 LonSP 0.000000
       North Pole (332 x 316) Dx 3.000000 Dy 3.000000 scan 64 mode 8

You can see that NX and NY are the same, but that the Lat1, Lon1, and Lov
values are slightly different.  That's causing the offset you're seeing.

When you run copygb to regrid the Stage4 files, you want to use the grid
definition that's defined for your WRFPRS file.  We've actually posted an
example of doing this for the recent MET tutorial:
http://www.dtcenter.org/met/users/support/OnLinePractical/OnLinePractical_210/copygb/run3.php

In your case, the following should do the trick:
copygb -xg"255 3 332 316 33578 -104412 8 -96986 3000 3000 0 64 37205
37205" stage4_file.grib stage4_file_regrid.grib

Give that a shot for this case and try rerunning it through MODE.  It
should fix it.

Thanks,
John

> John,
> Yes, that is probably the reason.  I was using numbers I found in the .ctl
> files (I run my models through both ARWpost and WPP) and numbers I found
> in
> the wrfout netCDF files, and they are of a higher precision than is asked
> for in copygb, so I ended up truncating or rounding to get to thousandths
> of
> degrees.
>
> I ran an ncdump -h on the pcp_combine output file (where it subtracted the
> precip between two times of my WRF model forecast, so this would be
> considered the forecast data set) and got the following:
>
> // global attributes:
>                 :FileOrigins = "File 04Z-03Z_difference generated
> 20100209_224415 UTC on host pircsds1.agron.iastate.edu by the PCP-Combine
> tool" ;
>                 :RunCommand = "Subtraction: WRFPRS_d02.010 with
> accumulation
> of 10 hours minus WRFPRS_d02.009 with accumulation of 9 hours." ;
>                 :Projection = "Lambert Conformal" ;
>                 :p1_deg = "37.205000 degrees_north" ;
>                 :p2_deg = "37.205000 degrees_north" ;
>                 :p0_deg = "33.578000 degrees_north" ;
>                 :l0_deg = "-104.412000 degrees_east" ;
>                 :lcen_deg = "-96.986000 degrees_east" ;
>                 :d_km = "3.000000 km" ;
>                 :r_km = "6367.470000 km" ;
>                 :nx = "332 grid_points" ;
>                 :ny = "316 grid_points" ;
>
> I'm guessing this includes the information I would want to use to define
> the
> grid to put the Stage IV data onto.  I do have a tough time reading off
> the
> wgrib -V output because the names of the parameters are rather short and
> don't say "start lat", "cenlon" etc.  Here is part of the output of wgrib
> -V
> WRFPRS:
>
> rec 30:4186092:date 2009050718 APCP kpds5=61 kpds6=1 kpds7=0 levels=(0,0)
> grid=255 sfc 0-9hr acc:
>   APCP=Total precipitation [kg/m^2]
>   timerange 4 P1 0 P2 9 TimeU 1  nx 332 ny 316 GDS grid 3 num_in_ave 0
> missing 0
>   center 7 subcenter 0 process 89 Table 2 scan: WE:SN winds(grid)
>   Lambert Conf: Lat1 33.578000 Lon1 -104.412000 Lov -96.986000
>       Latin1 37.205000 Latin2 37.205000 LatSP 0.000000 LonSP 0.000000
>       North Pole (332 x 316) Dx 3.000000 Dy 3.000000 scan 64 mode 136
>   min/max data 0 20.34  num bits 11  BDS_Ref 0  DecScale 2 BinScale 0
>
> Between these two, what is what?  I'm sure getting this right will help
> solve the problem.  Thanks.
>
> Jeff
>
> On Tue, Feb 16, 2010 at 4:35 PM, John Halley Gotway
> <johnhg at rap.ucar.edu>wrote:
>
>> Jeff,
>>
>> OK.  I think I know what's going on here.  Your forecast and observation
>> grids have the same dimension but are not identical.  There is a problem
>> in your call to copygb somewhere.
>>
>> When MODE reads the forecast and observation data, it only checks to see
>> that NX and NY are the same.  It doesn't do a robust check of the grids
>> to
>> make sure they're identical.  Because of the problem you're having, and
>> a
>> similar problem another user had a couple weeks ago, we're planning to
>> add
>> more robust checking of the grids for the next release of MET.
>>
>> When you pass it the forecast and observation fields, MODE reads the
>> grid
>> definition info from the forecast data.  It checks that the NX and NY of
>> the observation field match and assumes that the observation grid is the
>> same as the forecast grid.  It then uses the forecast grid the rest of
>> the
>> way.
>>
>> Here's what you should do.  Run both your forecast and observation GRIB
>> files through wgrib using the -V option:
>>
>> wgrib -V forecast_file.grib
>> wgrib -V observation_file.grib
>>
>> That'll dump out the grid definition information for the data.  I'm
>> guessing you'll find that they're very similar but off by a very small
>> amount.  You'll need to modify your call to copygb very slightly to get
>> them to be identical.  And once they are identical, your problem should
>> be
>> solved.
>>
>> Hope that helps.
>>
>> John
>>
>> > John,
>> > The version of MODE I'm using is in a place where I don't have
>> permission
>> > to
>> > mess around with files.  So I talked to our network administrator and
>> he
>> > installed the patches for MODE.  I reran it the same way I had been
>> before
>> > but got the same incorrect output.  I tried matching the Stage IV data
>> to
>> > itself like you did and the position was correct.  But then I decided
>> to
>> > try
>> > running mode by reversing the order of the files in the call so that I
>> put
>> > the Stage IV data first (as if it were the forecast) and my WRF data
>> > second
>> > (as if it were the observation), and wouldn't you know it...it plotted
>> > both
>> > of them correctly!  I compared the MODE output (object information)
>> > between
>> > the two sets of MODE runs (switched and unswitched), and everything I
>> saw
>> > was the same between the two (interest values, number of objects
>> > identified
>> > and matched etc.) except for they were switched around.  So it almost
>> > seems
>> > I could just use MODE flipped around.  Strange.  Thanks for looking
>> into
>> > this for me.
>> >
>> > Jeff
>> >
>> > On Tue, Feb 16, 2010 at 3:45 PM, John Halley Gotway
>> > <johnhg at rap.ucar.edu>wrote:
>> >
>> >> Jeff,
>> >>
>> >> Thanks for sending the data.  I took the Stage4 file you sent and did
>> >> two
>> >> things with it:
>> >>
>> >> (1) I plotted it using IDV and found that the image matches the GRADS
>> >> image you sent.  I've attached that image from IDV.
>> >>
>> >> (2) Next, I ran that Stage4 file you sent through MODE, comparing it
>> to
>> >> itself, and found that IT TOO matches the the plots produced by IDV
>> and
>> >> GRADS.  I've also attached that image.
>> >>
>> >> I'm not sure what's going on here.  Perhaps there's been some
>> confusion
>> >> in
>> >> file names or time stamps.  One thing I'll recommend is that you be
>> sure
>> >> you've downloaded all the latest patches from METv2.0 from:
>> >>
>> http://www.dtcenter.org/met/users/support/known_issues/METv2.0/index.php
>> >> Just follow the instructions at the top of the page to apply the
>> >> patches.
>> >>
>> >> So I've attached 4 files which show plots of the data you sent.  The
>> >> only
>> >> one that doesn't match is the MODE output you sent me, which I named
>> >> "mode_results_duda.png".  I'm guessing there was some problem in your
>> >> script that ran MODE.
>> >>
>> >> Just let me know if more questions come up.
>> >>
>> >> Thanks,
>> >> John
>> >>
>> >>
>> >
>> >
>> > --
>> > Jeff Duda
>> > Iowa State University
>> > Meteorology Graduate Student
>> > 3134 Agronomy Hall
>> > www.meteor.iastate.edu/~jdduda
>> <http://www.meteor.iastate.edu/%7Ejdduda>
>> >
>>
>>
>>
>
>
> --
> Jeff Duda
> Iowa State University
> Meteorology Graduate Student
> 3134 Agronomy Hall
> www.meteor.iastate.edu/~jdduda
>




More information about the Met_help mailing list