[gradsusr] netCDF control file

Huddleston, John Huddleston at cira.colostate.edu
Mon Nov 8 10:27:15 EST 2010


Hi Heiner,

Which platform of GrADS 2.x does not open netCDF "older" files?  What is the version of the netCDF file that it cannot open?

John Huddleston, PhD
Cooperative Institute for Research in the Atmosphere

From: gradsusr-bounces at gradsusr.org [mailto:gradsusr-bounces at gradsusr.org] On Behalf Of Heiner Körnich
Sent: Monday, November 08, 2010 6:06 AM
To: GrADS Users Forum
Subject: Re: [gradsusr] netCDF control file

Hi Deniz,

you don't nead a ctl-file to open a netcdf-file in grads. If your file follows the COARDS-standard, then you can open it with 'sdfopen ures.nc<http://ures.nc>'. If grads won't recognise it, you might want to try an older grads-version. We had some problems here with grads 2.0 and netcdf.

If grads still won't open your file, you can write a ctl-file and try to open that with the command 'xdfopen'. The ctl-file looks a bit different from standard ctl-files, look here:
http://www.iges.org/grads/gadoc/gradcomdxdfopen.html

Then, you would need the output from ncdump in order to know what is inside the netcdf-file. Alternatively you can use the climate data operators (CDO) with the command "cdo sinfo ures.nc<http://ures.nc>".
Or in matlab, if you have the mexnc-package installed, you read the information with
info=nc_info('ures.nc<http://ures.nc>')
Then you can access all details in info.

Finally, if it is only you who will use the data, it might be simpler to write binary output in matlab and use a standard ctl.

Kind regards from Stockholm,
Heiner

On Mon, Nov 8, 2010 at 10:11 AM, Deniz Demirhan Bari <bari at iap-kborn.de<mailto:bari at iap-kborn.de>> wrote:
Dear Grads users,
I have calculated residual wind components in MATLAB and saved them in netCDF file. Now I want to read them in grads but I cannot create a netcdf control file.

I tried to get the output of ncdump but my computer doesn't recognize ncdump although I installed it.

I am using the latest version of Grads on a Suse Linux computer.

My attempt to create a ctl file is below:
*
DSET  ^ures.nc<http://ures.nc>
DTYPE  netCDF
XDEF 96 LINEAR 0.000000 3.750000
YDEF 48 LEVELS -87.159 -83.479 -79.777 -76.070 -72.362 -68.652
               -64.942 -61.232 -57.521 -53.810 -50.099 -46.389
               -42.678 -38.967 -35.256 -31.545 -27.833 -24.122
               -20.411 -16.700 -12.989  -9.278  -5.567  -1.856
                 1.856   5.567   9.278  12.989  16.700  20.411
                24.122  27.833  31.545  35.256  38.967  42.678
                46.389  50.099  53.810  57.521  61.232  64.942
                68.652  72.362  76.070  79.777  83.479  87.159
ZDEF 114 LINEAR 1 1
TDEF 1 LINEAR 00:00Z00jan0000 1mn
OPTIONS yrev
UNDEF  -9e+33
VARS  1
ures             114  1,100  ures
ENDVARS
*
Thanks in advance
Deniz DEMIRHAN BARI

Leibniz-Institut für Atmosphärenphysik e.V.
an der Universität Rostock
Schlossstraße 6
18225 Kühlungsborn



_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org<mailto:gradsusr at gradsusr.org>
http://gradsusr.org/mailman/listinfo/gradsusr



--
Heiner Körnich
Dept. of Meteorology            Tel:  +46 8 164333
Stockholms University, SE-106 91 Stockholm, Sweden
Email: heiner at misu.su.se<mailto:heiner at misu.su.se>   www.misu.su.se/~heiner/<http://www.misu.su.se/~heiner/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20101108/7be28257/attachment-0003.html 


More information about the gradsusr mailing list