[Met_help] help with copygb

John Halley Gotway johnhg at rap.ucar.edu
Tue Dec 29 15:41:55 MST 2009


Jeff,

Try running the following:

./copygb -xg'255 3 368 300 38204 -100992 8 -94716 3000 3000 0 64 42538
42538' ST4.2008071918.01h ST4.2008071918.01h.regrid

And then run this to see the contents of the copygb output:

wgrib -V ST4.2008071918.01h.regrid

If that does not work, please send me two files:
(1) ST4.2008071918.01h
(2) One of your WPP output GRIB files.

You can post those files to our anonymous FTP site as follows:
ftp ftp.rap.ucar.edu
username=anonymous
password="your email address"
cd incoming/irap/met_help/duda_data
put ST4.2008071918.01h
put "sample WPP output file"
bye

Thanks,
John

> John,
> I used this command to run copygb:
>
> ./copygb.exe -g'255 3 368 300 38204 -100992 8 -94716 3000 3000 0 64 42538
> 42538' ST4.2008071918.01h ST4.2008071918.01h.idx ST4.2008071918.01h.regrid
>
> wgrib didn't give me all that I was looking for, but between ARWpost
> (.ctl)
> and WPP with grib2ctl.pl I was able to find all of the necessary
> information
> to fill out the grid definition.  There was a discrepancy between the
> CENLON
> that I got from running ncdump -h from one of my wrfout files from the run
> (-94.71637) and that from wgrib (Lov -94.497000, if that is the right one
> to
> look at).  That may explain why my output file is empty, because that's
> what
> I got when I ran that command.  The file ST4.2008071918.01h.regrid was
> empty.  However, I reran copygb, replacing -94716 with -94497 and got the
> same result.  I guess I'm not sure what I'm doing wrong here.
>
> Jeff
>
> On Tue, Dec 22, 2009 at 3:11 PM, John Halley Gotway
> <johnhg at rap.ucar.edu>wrote:
>
>> Hello Jeff,
>>
>> You basically need to figure out what command line options to pass to
>> copygb to tell it how to regrid the data.  Hopefully, you have the
>> "wgrib"
>> utility available on your system.
>>
>> If not, it can be downloaded and built from here:
>> http://www.cpc.noaa.gov/products/wesley/wgrib.html
>>
>> Try running this command on your WRFPRS file:
>> wgrib -V WRFPRS_d02.012_00
>>
>> That will dump out, among other things, the definition of the grid on
>> which your WRF data resides.  Next, you'll need to take those values and
>> translate them into the correct arguments to copygb.
>>
>> The arguments will differ somewhat depending on the type of projection
>> used for the WRFPRS data.  But it'll probably be on either a lat/lon,
>> polar stereographic, or lambert conformal grid.  Please look at slides
>> 26,
>> 27, and 28 of the WPP tutorial talk for examples of specifying these 3
>> types of grids:
>>
>> http://www.mmm.ucar.edu/wrf/users/tutorial/200907/Basic/2009jul_wpp_joint_tutorial.pdf
>>
>> One thing that's a little funny is that latitude and longitude are
>> passed
>> into copygb as thousandths of a degree.  That keeps everything as
>> integers
>> on the command line.  So, once you've figured out your copygb arguments,
>> you'd call copygb with something like this:
>>
>> copygb -xg'255 0 201 201 25000 270000 128 45000 290000 100 100 64'
>> ST4.2008071918_01h ST4.2008071918_01h_wrf.grib
>>
>> That'll use all of the default interpolation options and regrid to the
>> grid defined by that string beginning with 255.  Once you've done this,
>> double-check your work by running the copygb output through wgrib:
>> wgrib -V ST4.2008071918_01h_wrf.grib
>>
>> And make sure the grid definition matches exactly the one from your
>> WRFPRS
>> file.
>>
>> If you get stuck, just send me the output of "wgrib -V
>> WRFPRS_d02.012_00"
>> and I can tell you what copygb arguments you should use.
>>
>> Hope that helps.
>>
>> John
>>
>> > Hello,
>> > I am trying to use the copygb utility included with the WPP software
>> to
>> > regrid Stage IV precip data from its original grid to the same grid as
>> my
>> > WRF model runs.  I have read the usage guide in copygb.doc, but it
>> isn't
>> > helping me with what specifically I want to do.  I have GRIB files for
>> > both
>> > sources (ST4.2008071918_01h and WRFPRS_d02.012_00 are my GRIB files
>> for
>> > the
>> > Stage IV data (left) and my WRF output (right)).  My issue is with the
>> > grid
>> > flag option "-g".  I want to copy the Stage IV data to be on the same
>> grid
>> > as my WRFPRS file.  I figure that means I need to have the grid flag
>> > option
>> > set at "-4", but I get errors when trying to run it.  Here is the
>> command
>> > line I'm using:
>> >
>> > * ./copygb.exe -g-4 -b WRFPRS_d02.012_00.idx -a ST4.2008071918.01h
>> > ST4.2008071918.01h.idx WRFPRS_d02.012_00*
>> >
>> >
>> > And I get this error:
>> > *copygb: unsupported output grid -4*
>> >
>> > I don't want to put in a positive number because that means copygb
>> will
>> > try
>> > to copy the Stage IV data onto an AWIPS grid, and I don' want that.
>> How
>> > do
>> > I get it to copy to my WRF output grid?
>> >
>> > Thanks.
>> >
>> > Jeff Duda
>> >
>> > --
>> > Jeff Duda
>> > Iowa State University
>> > Meteorology Graduate Student
>> > 3134 Agronomy Hall
>> > www.meteor.iastate.edu/~jdduda
>> <http://www.meteor.iastate.edu/%7Ejdduda>
>> > _______________________________________________
>> > Met_help mailing list
>> > Met_help at mailman.ucar.edu
>> > http://mailman.ucar.edu/mailman/listinfo/met_help
>> >
>>
>>
>>
>
>
> --
> Jeff Duda
> Iowa State University
> Meteorology Graduate Student
> 3134 Agronomy Hall
> www.meteor.iastate.edu/~jdduda
>




More information about the Met_help mailing list