[gradsusr] netcdf file written with GDAL incorrectly shows 0 values everywhere

sfronzek at sonnenkinder.org sfronzek at sonnenkinder.org
Tue Oct 5 03:59:19 EDT 2010


Hello!

Grads (Version 2.0.a9) shows 0 values everywhere for a netcdf file even though I can see other values with ncdump. I suspect that either my control file or the netcdf structure is not what Grads expects.

I created the netcdf-file with GDAL's gdal_translate command. Below is the ncdump header and a few file lines of data grep'ed from ncdump output to show that there are really some values. I created a control file (see tm_1957_01_01.ctl below) and was able to open the file in Grads, but when I try to plot it, 0 is shown for all grid cells. I also attach a tar-package with the netcdf and control files.

Can anybody help with this?

Best regards,
Stefan



> ncdump -h tm_1957_01_01.nc 
netcdf tm_1957_01_01 {
dimensions:
        x = 1195 ;
        y = 1550 ;
variables:
        int Band1(y, x) ;
                Band1:_FillValue = 10000 ;
                Band1:long_name = "GDAL Band Number 1" ;

// global attributes:
                :Conventions = "CF-1.0" ;
}
> ncdump tm_1957_01_01.nc | grep 2 | head -5
    _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, 2728, _, _, _, 
    _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, 2728, 2728, _, _, _, _, 
    _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, 2730, 2726, 
    2729, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, 2728, 2727, 2727, 
    2728, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, 
> more tm_1957_01_01.ctl
DSET ^tm_1957_01_01.nc
DTYPE netcdf
UNDEF 10000 _FillValue
XDEF 1195 LINEAR 0 0.01
YDEF 1550 LINEAR 0 0.01
ZDEF 1 LINEAR 1 1
TDEF 1 LINEAR 1jan1957 1dy
VARS 1
Band1=>Band1 1 t,z,y,x test
ENDVARS
>
>
> grads2.0.a9 -l

Grid Analysis and Display System (GrADS) Version 2.0.a9
Copyright (c) 1988-2010 by Brian Doty and the
Institute for Global Environment and Society (IGES)
GrADS comes with ABSOLUTELY NO WARRANTY
See file COPYRIGHT for more information

Config: v2.0.a9 little-endian readline printim grib2 netcdf hdf4-sds hdf5 opendap-grids,stn athena geotiff shapefile
Issue 'q config' command for more detailed configuration information
GX Package Initialization: Size = 11 8.5 
ga-> open tm_1957_01_01.ctl
Scanning description file:  tm_1957_01_01.ctl
Data file tm_1957_01_02.nc is open as file 1
LON set to 0 11.94 
LAT set to 0 15.49 
LEV set to 1 1 
Time values set: 1957:1:1:0 1957:1:1:0 
E set to 1 1 
ga-> d band1
" -- using 10000 insteadeve "_FillValue
Constant field.  Value = 0
ga-> q config
Config: v2.0.a9 little-endian readline printim grib2 netcdf hdf4-sds hdf5 opendap-grids,stn athena geotiff shapefile
Grid Analysis and Display System (GrADS) Version 2.0.a9
Copyright (c) 1988-2010 by Brian Doty and the
Institute for Global Environment and Society (IGES) 
This program is distributed WITHOUT ANY WARRANTY 
See file COPYRIGHT for more information. 

Built Fri Sep  3 09:19:07 MDT 2010 for i686-pc-cygwin

This version of GrADS has been configured with the following options:
  o Built on a LITTLE ENDIAN machine
  o Athena Widget GUI ENABLED
  o Command line editing ENABLED 
      http://tiswww.case.edu/php/chet/readline/rltop.html 
  o printim command for image output ENABLED 
      http://www.zlib.net 
      http://www.libpng.org/pub/png/libpng.html 
      http://www.libgd.org/Main_Page 
  o GRIB2 interface ENABLED 
      http://www.ijg.org 
      http://www.ece.uvic.ca/~mdadams/jasper 
      http://www.nco.ncep.noaa.gov/pmb/codes/GRIB2 
      g2clib-1.1.8  
  o NetCDF interface ENABLED 
      http://www.unidata.ucar.edu/software/netcdf  
      netcdf 4.1.1-rc2 of Mar 28 2010 13:41:23 $  
  o OPeNDAP gridded data interface ENABLED
  o OPeNDAP station data interface ENABLED
      http://iges.org/grads/gadoc/supplibs.html 
      libgadap 2.0.oga.1  
  o HDF4 and HDF5 interfaces ENABLED 
      http://hdfgroup.org 
      HDF 4.2r5 
      HDF5 1.8.4 
  o GeoTIFF and KML/TIFF output ENABLED
      http://www.libtiff.org 
      http://geotiff.osgeo.org 
  o KML contour output ENABLED
  o Shapefile interface ENABLED
      http://shapelib.maptools.org 

For additional information please consult http://iges.org/grads

ga->


-- 
Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief!  
Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tm_1957_01_01.tar.gz
Type: application/x-gzip
Size: 333958 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20101005/e9214a08/attachment-0003.gz 


More information about the gradsusr mailing list