Re: data format quesiton

From: Saji N. Hameed <saji_at_nyahnyahspammersnyahnyah>
Date: Thu, 12 Jan 2006 16:55:02 -1000 (HST)

> Just FYI, there is a handy tool, grads2nc, to convert Grads data to
> netcdf data developed at GFDL. You can download this tool from
> http://www.gfdl.noaa.gov/products/vis/data/netcdf/GFDL_VG_NetCDF_Utils.html#grads2nc
>
> It might take you some time to configure and compile it. But the
> conversion is very neat, just a command line and it will do it.

   Thanks for the info. I have tried this. As you mentioned, compiling and
configuring this is a bit of a pain (in fact I failed to have it going). I
hope somebody in GFDL would update this useful utility and make its
compiling and configuring less of a hassle.

saji
...............

>>
>> Kate,
>>
>> Since I am also a GraDs-turned-NCL user, this issue is of much interest to
>> me. Recently for some analysis I had to convert a lot of data (that was
>> designed for use in GrADs) to netcdf format, I did some playing around
>> using GrADs itself, shell script and NCL. My approach may not directly
>> solve your problem, but I hope it is of some use.
>>
>> Specifically using a Grads script I read the data and output information
>> necessary to create NetCDF data. NCL could then read this ascii 'info' file
>> and parse it to create the necessary metadata for use in NCL.
>>
>> * WARNING * The following method is very specific and may not suit you.
>>
>> I am attaching three scripts for your reference -
>>
>> o swap.gs - A Grads script that may output necessary info to
>> create MetaData. Since I also had to byteswap my
>> data, the script also writes out the original data.
>> You may not need this.
>>
>> Example usage: grads -cl 'run swap.gs varxyz'
>> assumes you have a file named "varxyz".ctl
>> and the variable inside is called "varxyz"
>> "varxyz" can be any string, for example
>> sst.
>>
>> Sample Output: sst.info - Information needed to
>> create Metadata
>> sst.bin - byteswapped data
>>
>> o bin2nc.ncl - this is a very specific script, so it may not
>> suit you. But it may give you some idea of how
>> to use the information inside say sst.info to
>> create Metadata for the variable sst. The script
>> creates time information assuming the resolution
>> is daily (this may need to be modified).
>>
>> o dtmi.sh - a shell script to automate the usage of bin2nc.ncl.
>> May be helpful if you have many files to convert
>> to netcdf.
>>
>> For example to convert data specified by sst.ctl into netcdf, one
>> can give the following series of comments.
>>
>> 1. grads -bcl 'run swap.gs sst'
>> 2. dtmi.sh bin2nc:sst
>>
>> Hope it helps.
>>
>> saji
>> ...........
>>
>> Saji N. Hameed
>> Assistant Researcher
>> International Pacific Research Center, Tel: +1808 9569534
>> 2525 Correa Road, Honolulu, HI 96822 Fax: +1808 9569425
>> http://iprc.soest.hawaii.edu/~saji
>>
>> On Thu, 12 Jan 2006, Kate Young wrote:
>>
>>>
>>> Can you please tell me if NCL supports either Vis5d or GrADS formats?
>>>
>>> _______________________________________________
>>> ncl-talk mailing list
>>> ncl-talk_at_ucar.edu
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>
>>
>
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Jan 12 2006 - 19:55:02 MST

This archive was generated by hypermail 2.2.0 : Fri Jan 13 2006 - 08:36:09 MST