[gradsusr] Error opening NetCDF file

Hui Wang hui.wang at noaa.gov
Thu May 17 19:46:10 EDT 2012


Just use "sdfopen ersst.198901.nc" iinstead of "open ersst.ctl", then "d 
sst".
The name of the variable in the netcdf file is sst, not tsm defined in 
the ctl file.

Good luck,
Hui

On 5/17/2012 7:02 PM, diego wrote:
> Hi all:
>
> I have taken a netcdf data file from the following link:
> ftp://ftp.ncdc.noaa.gov/pub/data/cmb/ersst/v3b/netcdf/
> While I try to open this file in GrADS I got the following error message:
>
> ga-> open ersst.ctl
> Scanning description file:  ersst
> Data file ersst.198901.nc is open as file 1
> LON set to 0 360
> LAT set to -88 88
> LEV set to 0 0
> Time values set: 1989:1:1:0 1989:1:1:0
> E set to 1 1
> ga-> q file
> File 1 :
>   Descriptor: ersst.ctl
>   Binary: ersst.198901.nc
>   Type = Gridded
>   Xsize = 180  Ysize = 89  Zsize = 1  Tsize = 1  Esize = 1
>   Number of Variables = 3
>      tsm  0  1,y,x  temperature
>      an  0  1,y,x  anomalia
>      er  0  1,y,x  error
> ga-> d tsm
> gancgrid error: nc_get_vara_double failed; NetCDF: Index exceeds 
> dimension bound
> Data Request Error:  Error for variable 'tsm'
>   Error ocurred at column 1
> DISPLAY error:  Invalid expression
>   Expression = tsm
> ga-> quit
>
> can anywhere help me ?
>
> Thanks
>
>
> My ctl file is :
>
> DSET ^ersst.198901.nc
> *DSET ^ersst.%y4%m2.nc
> *OPTIONS template
> DTYPE netcdf
> UNDEF -999s
> xdef   180 linear    0  2
> ydef    89 linear  -88  2
> zdef   1 levels 0
> TDEF 1 linear jan1989 1mo
> vars 3
> sst=>tsm  0 1,y,x   temperature
> anom=>an  0 1,y,x   anomalia
> err=>er   0 1,y,x   error
> endvars
>
>
> The Netcdf file Is:
>
>  ncdump   ersst.199908.nc
>
> netcdf ersst.199908 {
> dimensions:
>     time = 1 ;
>     zlev = 1 ;
>     lat = 89 ;
>     lon = 180 ;
> variables:
>     float time(time) ;
>         time:long_name = "Center time of the day" ;
>         time:units = "days since 1854-01-15" ;
>         time:delta_t = "0000-01-00" ;
>         time:avg_period = "0000-01-00" ;
>     float zlev(zlev) ;
>         zlev:long_name = "Sea surface height" ;
>         zlev:units = "meters" ;
>         zlev:actual_range = "0, 0" ;
>     float lat(lat) ;
>         lat:long_name = "Latitude" ;
>         lat:units = "degrees_north" ;
>         lat:grids = "Uniform grid from -88 to 88 by 2" ;
>     float lon(lon) ;
>         lon:long_name = "Longitude" ;
>         lon:units = "degrees_east" ;
>         lon:grids = "Uniform grid from 0 to 358 by 2" ;
>     short sst(time, zlev, lat, lon) ;
>         sst:long_name = "Extended reconstructed sea surface temperature" ;
>         sst:units = "degrees_C" ;
>         sst:_FillValue = -999s ;
>         sst:add_offset = 0.f ;
>         sst:scale_factor = 0.01f ;
>         sst:valid_min = -300s ;
>         sst:valid_max = 4500s ;
>     short anom(time, zlev, lat, lon) ;
>     anom:long_name = "Extended reconstructed SST anomalies" ;
>         anom:units = "degrees_C" ;
>         anom:_FillValue = -999s ;
>         anom:add_offset = 0.f ;
>         anom:scale_factor = 0.01f ;
>         anom:valid_min = -1200s ;
>         anom:valid_max = 1200s ;
>     short err(time, zlev, lat, lon) ;
>         err:long_name = "Estimated error standard deviation of 
> analyzed_ersst" ;
>         err:units = "degrees_C" ;
>         err:_FillValue = -999s ;
>         err:add_offset = 0.f ;
>         err:scale_factor = 0.01f ;
>         err:valid_min = 0s ;
>         err:valid_max = 1000s ;
>
> // global attributes:
>         :title = "ERSST V3b in situ only" ;
>         :history = "Version 3b" ;
>         :creation_date = "2010-03-23" ;
>         :description = "Smith, T.M., and R.W. Reynolds, 2003: Extended 
> Reconstruction of Global Se
> a Surface Temperatures Based on COADS Data (1854-1997). Journal of 
> Climate, 16, 1495-1510. A vailable at h
> ttp://www.ncdc.noaa.gov/img/climate/research/sst/ersst.pdf  
> Climatology is based on 1971-2000 OI.v2 SST, I
> n situ data: ICOADS2.4 before 2006 and NCEP in situ data from 2007 to 
> present" ;
>         :source = "NOAA/National Climatic Data Center" ;
>         :contact = "Dick Reynolds, email: Richard.W.Reynolds at noaa.gov 
> & Chunying Liu, email: Chuny
> ing.liu at noaa.gov" ;
>         :Conventions = "CF-1.0" ;
> data:
>
>  time = 53172 ;
>
> zlev = 0 ;
>
>  lat = -88, -86, -84, -82, -80, -78, -76, -74, -72, -70, -68, -66, 
> -64, -62,
>     -60, -58, -56, -54, -52, -50, -48, -46, -44, -42, -40, -38, -36, -34,
>     -32, -30, -28, -26, -24, -22, -20, -18, -16, -14, -12, -10, -8, 
> -6, -4,
>     -2, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 
> 34,
>     36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 
> 68, 70,
>     72, 74, 76, 78, 80, 82, 84, 86, 88 ;
>
>  lon = 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 
> 34, 36,
>     38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 
> 70, 72,
>     74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 
> 106,
>     108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134,
>     136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162,
>     164, 166, 168, 170, 172, 174, 176, 178, 180, 182, 184, 186, 188, 190,
>     192, 194, 196, 198, 200, 202, 204, 206, 208, 210, 212, 214, 216, 218,
>     220, 222, 224, 226, 228, 230, 232, 234, 236, 238, 240, 242, 244, 246,
>     248, 250, 252, 254, 256, 258, 260, 262, 264, 266, 268, 270, 272, 274,
>     276, 278, 280, 282, 284, 286, 288, 290, 292, 294, 296, 298, 300, 302,
>     304, 306, 308, 310, 312, 314, 316, 318, 320, 322, 324, 326, 328, 330,
>     332, 334, 336, 338, 340, 342, 344, 346, 348, 350, 352, 354, 356, 358 ;
>
>  sst =
>   _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, 
> _, _,
>     _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, 
> _, _,
>
>
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20120517/a2bc6032/attachment-0003.html 


More information about the gradsusr mailing list