Using regrid2 and/or lats4d

Michael Fiorino Michael.Fiorino at NOAA.GOV
Wed Aug 29 10:38:12 EDT 2007


dear dan,

please see:

http://wxmap2.com/grads/regrid2/

and the regrid2.txt for the doc i wrote MANY years ago...

a couple of suggestions:

1) the size of the grid in your ssmv files is rather large, you'll have
to recompile the source (see regrid2.f above) and set nimax=7000 and
njmax=4000 for regrid2 to operate...  also, you're pushing the limits of
grads when using such big grids. can you reduce resolution to something
a little lower res?   is your grid really ~ 800 m?  yikes!
2) also there's too much precision in the lat/lon in your .ctl files
truncate to something ~ 6 significant digits...

good luck,

Mike

Dr. Michael Fiorino
Techniques Development and Applications Unit
NHC/NWS/NOAA
11691 SW 17th St.
Miami, FL 33165-2149

michael.fiorino at noaa.gov (work)
mfiorino at gmail.com (home)

+1 305-229-4445 (work)
+1 925-597-1921 (mobile)

NHC/NWS/NOAA is the
National Hurricane Center/
National Weather Service/
National Oceanic and Atmospheric Administration



2)


Dan Leins wrote:
> All,
>
> I was wondering if anyone could lend me some insight into using
> regrid2. I ended up getting a pre-compiled binary which seems to be
> working ok (i.e. it doesn't seg-fault when I run it). I've basically
> got 2 datasets I want to subtract from one another, one is a model
> grib file, the other is a binary file.I've come up with a control file
> which will allow me to view the field in the binary file, and I've
> already got a functioning control file for my model grib file. The
> binary file contains 1km gridded data, the model grib file contains
> 3km gridded data, and I believe both are on different map projections.
> Here's a portion of each of the control files....
>
> Binary control file:
> dset /usr/local/leins/test/us_ssmv01025SlL01T0024TTNATS2007040705DP001.dat
> title test
> #undef 65535
> undef 55537
> UNPACK 0.1 0.0
> options yrev
> xdef 6935 linear -124.729583333333 0.00833333333333333
> ydef 3351 linear  24.9495833333324  0.00833333333333333
> zdef 1 levels 1000
> tdef 1 linear 22jul2007 1dy
>
>
> Model grib file:
> set /usr/local/leins/test//07040700_arw_d01.GrbF02400
> index /usr/local/leins/test//07040700_arw_d01.GrbF02400.idx
> undef 9.999E+20
> title /usr/local/leins/test//07040700_arw_d01.GrbF02400
> *  produced by grib2ctl v0.9.12.5p34c
> dtype grib 255
> pdef 263 250 lcc 39.447000 -87.971000 1 1 42.900000 42.900000
> -83.400000 3000 30
> 00
> xdef 263 linear -87.971000 0.0353176389800391
> ydef 250 linear 39.447000 0.0272727272727273
> tdef 1 linear 00Z08apr2007 3hr
>
> In short, if I attempt to subtract one from the other, GrADS complains
> with "Entire Grid Undefined". Thinking that because they are on
> different map projections and of different resolutions, I thought I'd
> have to regrid the binary data to "dumb it down" to the model 3km
> resolution. Does that sound right? So far I haven't seen a whole lot
> of helpful documentation on regrid2, but I did find some help for
> lats4d. From what I understand, It looks like lats4d works hand in
> hand with regrid2 provided that you have a control file for the
> desired resolution, which I do in the model grib control file.
>
> Regardless, does anyone have any insight or any examples of how I can
> make these two datasets see "eye to eye" so I can easily subtract one
> from the other? One contains observed liquid equivalent snowfall, the
> other is a model forecast. You can probably see how it'd be
> advantageous to be able to subtract these.
>
> Thanks for any help!
> Dan
>



More information about the gradsusr mailing list