error with netcdf file generated by cdo

Ben-Jei Tsuang btsuang at YAHOO.COM
Thu Oct 15 23:22:08 EDT 2009


Dear Arlindo:

Thank you. It works.

The default of netcdf file created by cdo is "absolute time axis". I
have to use the option "-r" to create the file in "relative time
axis". Then, the netcdf file can be read by grads. That is,

    -r             Convert from an absolute to a relative time axis
cdo -r -f nc chname,var11,sst -selhour,12 -selltype,1 -selcode,11
flx.ft06.200908


Ben


2009/10/15 Arlindo da Silva <arlindo.dasilva at gmail.com>:
> B.-J.,
>   Here is your problem:
>       double time(time) ;
>               time:units = "day as %Y%m%d.%f" ;
>               time:calendar = "proleptic_gregorian" ;
> This is  not coards compliant. The time units should say something like
> "days since 2009-08-01".
> If you can't fix the file you can always create a DDF for it fixing the time
> axis.
>     Arlindo
>
> On Wed, Oct 14, 2009 at 8:05 PM, Ben-Jei Tsuang <btsuang at yahoo.com> wrote:
>>
>> Dear All:
>>
>> I created a netcdf file using "CDO".
>> (http://www.mpimet.mpg.de/fileadmin/software/cdo/)
>>
>> "cdo -f nc chname,var11,sst -selhour,12 -selltype,1 -selcode,11
>> flx.ft06.200908"
>>
>> I can read the netcdf file using ncdump. But when I try to sdfopen it
>> using grads  v2.0.a7.oga.2. The error "SDF file does not have any
>> non-coordinate variables" occurs.
>>
>> More details of the error and the messange of ncdump are listed as
>> attatched. Your help are appreciated.
>>
>>
>> Ben
>>
>> ------------------------------
>> Config: v2.0.a7.oga.2 little-endian readline printim grib2 netcdf
>> hdf4-sds hdf5 opendap-grids,stn athena geotiff
>> Issue 'q config' command for more information.
>> Loading User Defined Extensions table
>> </nuwa_cluster/opt/grads-2.0.a7.oga.2/Classic/bin/gex/udxt> ... ok.
>> Landscape mode? ('n' for portrait):  y
>> GX Package Initialization: Size = 11 8.5
>> ga-> sdfopen sst.200908.nc
>> Scanning self-describing file:  sst.200908.nc
>> SDF file has no discernable time coordinate -- using default values.
>> gadsdf: SDF file does not have any non-coordinate variables.
>> -----------------------------
>>
>>
>> --
>> Ben-Jei Tsuang
>>
>>
>> ==================================
>> [btsuang at nuwaln01 flx]$ ncdump sst.200908.nc |more
>> netcdf sst.200908 {
>> dimensions:
>>       lon = 192 ;
>>       lat = 94 ;
>>       time = UNLIMITED ; // (31 currently)
>> variables:
>>       double lon(lon) ;
>>               lon:long_name = "longitude" ;
>>               lon:units = "degrees_east" ;
>>               lon:standard_name = "longitude" ;
>>       double lat(lat) ;
>>               lat:long_name = "latitude" ;
>>               lat:units = "degrees_north" ;
>>               lat:standard_name = "latitude" ;
>>       double time(time) ;
>>               time:units = "day as %Y%m%d.%f" ;
>>               time:calendar = "proleptic_gregorian" ;
>>       float sst(time, lat, lon) ;
>>               sst:code = 11 ;
>>               sst:table = 132 ;
>>               sst:grid_type = "gaussian" ;
>>
>> // global attributes:
>>               :CDI = "Climate Data Interface version 1.3.2" ;
>>               :Conventions = "CF-1.0" ;
>>               :history = "Thu Oct 15 06:51:52 2009: cdo -f nc
>> chname,var11,sst -selhour,12 -selltype,1 -selcode,11 flx.ft06.200908
>> sst.200908.nc" ;
>>               :CDO = "Climate Data Operators version 1.3.2
>> (http://www.mpimet.mpg.de/cdo)" ;
>> data:
>>
>>  lon = 0, 1.875, 3.75, 5.625, 7.5, 9.375, 11.25, 13.125, 15, 16.875,
>> 18.75,
>>
>>
>>
>> --
>> Ben-Jei Tsuang
>> Dept. of Environmental Engineering
>> National Chung-Hsing University
>
>
>
> --
> Arlindo da Silva
> dasilva at alum.mit.edu
>



--
Ben-Jei Tsuang
Dept. of Environmental Engineering
National Chung-Hsing University



More information about the gradsusr mailing list