[Met_help] Mode tool

John Halley Gotway johnhg at rap.ucar.edu
Thu Oct 2 10:47:09 MDT 2008


Seagayle,

Since you're running ARW, you're right - copygb does not need to be run.  I've attached the output of copygb for the sample observation file you sent, ST2ml2006072718.Grb.  And below is the command I
used to regrid your observation file to match the forecast domain:

copygb -xg"255 3 77 69 37777 -78655 8 -76880 4000 4000 0 64 60000 30000" ST2ml2006072718.Grb ST2ml2006072718_REGRID.Grb

Let me warn you that the files you sent contain an 18 hour accumulation for the forecast and a 1 hour accumulation for the observation.  You'll need to use the PCP-Combine tool in MET to construct
forecast and observation accumulation intervals that match.

Listed below are the steps I followed to figure out the copygb command:

(1) Figure out the projection information of your forecast file using the "wgrib" tool:
wgrib -V WRFPRS_d01.18

In the output of wgrib, I found this projection information:
  Lambert Conf: Lat1 37.777000 Lon1 -78.655000 Lov -76.880000
      Latin1 60.000000 Latin2 30.000000 LatSP 0.000000 LonSP 0.000000
      North Pole (77 x 69) Dx 4.000000 Dy 4.000000 scan 64 mode 8

So it's on a Lambert Conformal grid with the parameters listed.

(2) Figure out how to specify a Lambert Conformal grid for copygb by referring to the WPP presentation from the WRF-Tutorial.
See slide 25 in the presentation: http://www.mmm.ucar.edu/wrf/users/tutorial/200807/2008jul_wpp_joint_tutorial_FINAL.pdf

In there, the grid definition for Lambert Conformal grids is specified as follows:
copygb -xg"255 3 NX NY STARTLAT STARTLON 8 CENLON DX DY 0 64 TRUELAT1 TRUELAT2" ST2ml2006072718.Grb ST2ml2006072718_REGRID.Grb
where lat and lon values are listed in millidegrees (multiply by 1000), and dx and dy are in meters.

(3) Substitute the numbers from the wgrib output into the copygb command where:
STARTLAT = Lat1 * 1000
STARTLON = Lon1 * 1000
CENLON   = Lov * 1000
DX       = Dx * 1000
DY       = Dy * 1000
TRUELAT1 = Latin1 * 1000
TRUELAT2 = Latin2 * 1000

(4) Run the copygb command:
copygb -xg"255 3 77 69 37777 -78655 8 -76880 4000 4000 0 64 60000 30000" ST2ml2006072718.Grb ST2ml2006072718_REGRID.Grb

(5) Verify that it worked by running wgrib on the output file:
wgrib -V ST2ml2006072718_REGRID.Grb

And in the wgrib output I see the following projection information, which matches what's in the forecast file:
  Lambert Conf: Lat1 37.777000 Lon1 -78.655000 Lov -76.880000
      Latin1 60.000000 Latin2 30.000000 LatSP 0.000000 LonSP 0.000000
      North Pole (77 x 69) Dx 4.000000 Dy 4.000000 scan 64 mode 8

Hope that helps!
John

walford02 at hotmail.com wrote:
> John,
> 
> I did look at that copygb.doc file earlier but I still had a couple of
> questions.
> 
> I am running WRF ARW not NMM and from my understanding ARW did not need
> to run copygb.exe in the WPP. But I don't want to change the forecast to
> the observations grid .. I want to do it the other way around.
> 
> Anyway, I have put the observation file (ST*.Grb) and the forecast  file
> (WRFPRS_d01.18) in the directory incoming/irap/johnhg.
> 
> 
> --------------------------------------------------
> From: "John Halley Gotway" <johnhg at rap.ucar.edu>
> Sent: Thursday, October 02, 2008 11:21 AM
> To: <walford02 at hotmail.com>
> Cc: "met_help" <met_help at ucar.edu>
> Subject: Re: [Met_help] Mode tool
> 
>> Seagayle,
>>
>> You're definitely not the first person to be frustrated by lack of
>> good documentation for the copygb tool!  I've attached a file named
>> "copygb.doc" which does give some info about running copygb, but
>> not much.  A copy of this file should be included in the source code
>> directory of WPP.
>>
>> What we'll need to do is figure out the parameters that define your
>> forecast 77 x 69 grid.  If your forecast data was postprocessed using
>> WPP, then copygb was probably run on it at some point in the
>> processing - perhaps by some script file.  If that's the case, and you
>> can find the copygb command that was used with your forecast data,
>> that would indicate the arguments you'd need for copygb.
>>
>> But it may be easier for you to just send me a sample GRIB forecast
>> file. I'll extract the grid definition information from it and let you
>> know how to run copygb on your obs data to regrid it.
>>
>> So please send me 1 sample forecast and 1 sample observation file (so
>> I can check to make sure the copygb arguments I put together are
>> correct). If the files are too big for email, you could post
>> them to our anonymous ftp site with the following commands:
>>
>> cd "directory containing forecast and observation files"
>> ftp ftp.rap.ucar.edu
>> username: anonymous
>> password: "fill in your email address here"
>> cd incoming/irap/johnhg
>> put "name of the forecast file"
>> put "name of the observation file"
>> bye
>>
>> Thanks,
>> John
>>
>> walford02 at hotmail.com wrote:
>>> John,
>>>
>>> I do have copygb because I have WRF Post-Processor, but I am not
>>> familiar
>>> with it. I want my observations to be placed on the model forecast
>>> domain
>>> and to be honest  it is not clear how I do this.
>>>
>>> My forecast grid dimensions are 77, 69 and my observation  ( NCEP/EMC
>>> U.S.
>>> Gridded Multi-Sensor Precipitation (4 km) [NCAR/EOL]) grid dimensions
>>> are
>>> 1121, 881. How do I use copygb to change the observation grid
>>> dimensions to
>>> 77,69 ?
>>>
>>> The Documentation is not clear to me on how to do this. Can you point me
>>> to some clear directions on how to do this?
>>>
>>>
>>>
>>>
>>> --------------------------------------------------
>>> From: "John Halley Gotway" <johnhg at rap.ucar.edu>
>>> Sent: Wednesday, October 01, 2008 1:57 PM
>>> To: <walford02 at hotmail.com>
>>> Cc: <met_help at mailman.ucar.edu>
>>> Subject: Re: [Met_help] Mode tool
>>>
>>>> Seagayle,
>>>>
>>>> We recommend using the copygb utility for regridding GRIB files.  We
>>>> haven't included any interpolation options within MET itself, but
>>>> instead,
>>>> we require that the input fcst/obs fields reside on the
>>>> same domain.
>>>>
>>>> The copygb utility is distributed as part of the WRF
>>>> Post-Processor.  So
>>>> if you have WPP installed, you'll already have copygb.  If not, you can
>>>> also access it from the NWS Climate Prediction Center Page:
>>>> http://www.cpc.noaa.gov/products/wesley/copygb.html
>>>>
>>>> If you have any trouble getting copygb to do what you'd like it to do,
>>>> I'd
>>>> be happy to help.
>>>>
>>>> John
>>>>
>>>> walford02 at hotmail.com wrote:
>>>>> Hello,
>>>>>
>>>>> I get an error when I run the MODE tool that says:
>>>>>
>>>>> ERROR: main() -> forecast and observation grid dimensions do not match
>>>>> (77, 69) != (1121, 881)
>>>>>
>>>>> Is there a way to downscale my observation grid dimensions to match
>>>>> the
>>>>> model forecast?
>>>>>
>>>>> Segayle
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> 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: ST2ml2006072718_REGRID.Grb
Type: application/octet-stream
Size: 4742 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/met_help/attachments/20081002/ca7d84e3/ST2ml2006072718_REGRID.obj


More information about the Met_help mailing list