to extract variables on grib

Haibin Li haibin1977 at GMAIL.COM
Wed Aug 24 12:46:33 EDT 2005


You can use "wgrib" to extract the desired variables and save it in grib format.


Yours,
Haibin

On 8/24/05, Jean Pierre Arabonis <arabonis at egs.uct.ac.za> wrote:
> Hi
>    I have been working on the same problem and I attach the rough bare
> bones of a script I have done so far and some comments from a helpful user:
>    My script simply writes out one or several variables from a single
> position to a new grib file.
>    Good Luck
>         JP
>
> Grads data must be written out in the order
>
> along X dimension
> along Y dimension
> along Z dimension
> each Variables
> each Time
>
> See the description of the structure of Grads data files in the online user
> manual
>
> http://grads.iges.org/grads/gadoc/aboutgriddeddata.html#structure
>
> Michael Sestak
> Fleet Numerical Meteorology and Oceanography Center
> Monterey, CA
>
>
>
>
>
>
> msaavedra wrote:
>
> >Dear grads user:
> >
> > I have a grib file with 29 variables (11 times).  I want to extract only two variables
> >with grads and to save it in a file grib.  By I complete to turn it to format netcdf.
> >
> >You can help me ?
> >
> >Thaks
> >
> >     Miguel
> >
> >
> >
>
> --
> Jean Pierre Arabonis
> arabonis at egs.uct.ac.za
> Tel 021 780 1021 cell 084 401 1365
> This email is 100% Microsoft Free
>
>
>
> *subsetter
> *Jean Pierre Arabonis
> *19 August 2005
> 'open ./nww3.all.grb.ctl'
> 'q file'
> var1 = htsgwsfc
> var2 = windsfc
> t1 = 1
> t2 = 61
>
> 'disable fwrite'
> 'set gxout fwrite'
> 'set fwrite autotest'
>
> 'set lat -35'
> 'set lon 18'
>
>
> i = 1
> while i <= t2
> 'set t 'i
> say 'printing to grib file at time 'i
> 'd 'var1
> 'd 'var2
> i = i + 1
> endwhile
>
> 'disable fwrite'
> 'close 1'
>
>


--
---------------------------------------------------------
Haibin Li
Department of Environmental Sciences
Rutgers University
14 College Farm Rd
New Brunswick, NJ, 08901-8551
----------------------------------------------------------



More information about the gradsusr mailing list