[gradsusr] netCDF control file
Heiner Körnich
heiner at misu.su.se
Mon Nov 8 11:02:56 EST 2010
Hi John,
the platform is:
file /bin/bash
/bin/bash: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for
GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9,
stripped
My testfile comes from the CERA database, which went twice through CDO. When
opening it with Grads v2.0.a4 it gives:
Config: v2.0.a4 little-endian readline printim grib2 netcdf hdf4-sds
Issue 'q config' command for more information.
Landscape mode? ('n' for portrait):
GX Package Initialization: Size = 11 8.5
ga-> sdfopen mpi-olr-ltm.nc
Scanning self-describing file: mpi-olr-ltm.nc
SDF file has no discernable time coordinate -- using default values.
SDF file mpi-olr-ltm.nc is open as file 1
LON set to 0 360
LAT set to -88.572 88.572
LEV set to 0 0
Time values set: 1:1:1:0 1:1:1:0
E set to 1 1
ga-> d rlut
gancgrid error: nc_get_vara_double failed; NetCDF: Index exceeds dimension
bound
Data Request Error: Error for variable 'rlut'
Error ocurred at column 1
DISPLAY error: Invalid expression
Expression = rlut
I don't understand the netcdf-version question, but here is the ncdump -h
output:
ncdump -h mpi-olr-ltm.nc
netcdf mpi-olr-ltm {
dimensions:
lon = 192 ;
nv = 2 ;
lat = 96 ;
time = UNLIMITED ; // (12 currently)
variables:
double lon(lon) ;
lon:long_name = "longitude" ;
lon:units = "degrees_east" ;
lon:standard_name = "longitude" ;
lon:bounds = "lon_bounds" ;
double lon_bounds(lon, nv) ;
double lat(lat) ;
lat:long_name = "latitude" ;
lat:units = "degrees_north" ;
lat:standard_name = "latitude" ;
lat:bounds = "lat_bounds" ;
double lat_bounds(lat, nv) ;
double time(time) ;
time:units = "day as %Y%m%d.%f" ;
float rlut(time, lat, lon) ;
rlut:long_name = "Outgoing Longwave Radiation" ;
rlut:standard_name = "toa_outgoing_longwave_flux" ;
rlut:units = "W m-2" ;
rlut:grid_type = "gaussian" ;
rlut:cell_methods = "time: mean (interval: 12 minutes)" ;
rlut:original_name = "TRAD0" ;
// global attributes:
:CDI = "Climate Data Interface version 1.2.1" ;
:Conventions = "CF-1.0" ;
:history = "Fri May 15 10:19:53 2009: cdo ymonmean mpi-test.nc
mpi-olr-ltm.nc\n",
"Fri May 15 10:19:39 2009: cdo selyear,1979/1995
pcmdi.ipcc4.mpi_echam5.20c3m.run1.monthly.rlut_A1.nc mpi-test.nc\n",
"Output from CERA Database, processed with cdo, PINGO, CMOR At
10:19:52 on 01/20/2005, CMOR rewrote data to comply with CF standards and
IPCC Fourth Assessment requirements" ;
:institution = "MPI (Max Planck Institute for Meteorology,Hamburg,
Germany)" ;
:title = "MPI model output prepared for IPCC Fourth Assessment
climate of the 20th Century experiment (20C3M)" ;
:contact = "Joerg Wegner (wegner at dkrz.de)" ;
:project_id = "IPCC Fourth Assessment" ;
:table_id = "Table A1 (8 October 2004)" ;
:experiment_id = "climate of the 20th Century experiment (20C3M)" ;
:realization = 1 ;
:cmor_version = 0.959999978542328 ;
:references = "ECHAM5: E. Roeckner et. all, 2003,The atmospheric
general circulation model ECHAM5Report No. 349OM: Marsland et. all, 2003,The
Max-Planck-Institute global ocean/sea ice modelwith orthogonal curvelinear
coordinatesOcean Modell., 5, 91-127.OM: Haak, H. et. all, 2003:Formation and
propagation of great salinity anomalies,Geophys. Res. Lett., 30 ,
1473,10.1029/2003GL17065." ;
:comment = "anthropogenic forcing only" ;
:CDO = "Climate Data Operators version 1.2.1 (
http://www.mpimet.mpg.de/cdo)" ;
}
Kind regards,
Heiner
On Mon, Nov 8, 2010 at 4:27 PM, Huddleston, John <
Huddleston at cira.colostate.edu> wrote:
> 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'.
> 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".
> Or in matlab, if you have the mexnc-package installed, you read the
> information with
> info=nc_info('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>
> 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
>
> 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
> 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 www.misu.su.se/~heiner/<http://www.misu.su.se/%7Eheiner/>
>
> _______________________________________________
> gradsusr mailing list
> 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 www.misu.su.se/~heiner/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20101108/3ea4eaef/attachment-0003.html
More information about the gradsusr
mailing list