[gradsusr] gancgrid error: nc_get_vara_double failed; NetCDF: Index exceeds dimension bound
Derek Simkowiak
dereks at cool-st.com
Sun Jun 9 18:36:30 EDT 2013
Jennifer,
Thank you for the suggestions! I made the changes:
VARS 2
u 1 t,z,x,y Ocean Surface Zonal Currents [m/s]
v 1 t,z,x,y Ocean Surface Meridional Currents [m/s]
ENDVARS
...and that did resolve the "invalid plev 0" message. However, it had
no effect on the primary symptom:
lats4d: Data file is
File 1 :
Descriptor: ../../sources/oscar/oscar_vel7550.nc.gz.nc.ctl
Binary: ../../sources/oscar/oscar_vel7550.nc.gz.nc
Type = Gridded
Xsize = 1201 Ysize = 481 Zsize = 1 Tsize = 1 Esize = 1
Number of Variables = 2
u 1 t,z,x,y Ocean Surface Zonal Currents [m/s]
v 1 t,z,x,y Ocean Surface Meridional Currents [m/s]
lats4d: Dimension environment file same as data file
lats4d: time range: 00Z07JUN2013 00Z07JUN2013 by 1, delta t: 24 hourly
lats4d: vertical levels: 1
lats4d: using PRESSURE for vertical coordinate
lats4d: latitudinal range: 16.8 31.8
lats4d: longitudinal range: 276.0 291.0
gancgrid error: nc_get_vara_double failed; NetCDF: Index exceeds
dimension bound
Data Request Error: Error for variable 'u'
Error ocurred at column 1
Any other ideas?
Thank You,
Derek
On 06/09/2013 03:18 PM, Jennifer Adams wrote:
> Try changing the "0" (for number of levels) to "1" in your variable
> declarations. Also, there's no need to alias "u", so you can remove
> the "=>u" and "=>v" from each declaration as well.
> --Jennifer
>
> On Jun 9, 2013, at 4:52 PM, Derek Simkowiak wrote:
>
>> Hello GrADS users,
>> I am trying to use GrADS with OSCAR data downloaded from here (using
>> wget):
>>
>> wget
>> http://podaac-opendap.jpl.nasa.gov/opendap/allData/oscar/preview/L4/oscar_third_deg/oscar_vel7550.nc.gz.nc
>>
>> I am trying to extract lat/lon boxes from this data, so I am invoking
>> GrADS using the "lats4d.sh" wrapper script. When I try to open the
>> binary NetCDF file above, I get this error:
>>
>> gadsdf: SDF file has no discernable X coordinate.
>>
>> Therefor I am using a "Data Descriptor" (.ctl) file. However, I am
>> unable to get that to work. Here is the error I am getting with my
>> .ctl file:
>>
>> gancgrid error: nc_get_vara_double failed; NetCDF: Index exceeds
>> dimension bound
>> Data Request Error: Error for variable 'u'
>> Error ocurred at column 1
>>
>> I don't know what to try next. Here is my .ctl file for this data --
>> the only thing that is a little weird is that the source says
>> "Longitude extends from 20 E to 420 E to avoid a break in major ocean
>> basins", so I have the XDEF line starting with the value "20.0"
>> instead of "0.0"... but I have also tried starting XDEF with "0.0"
>> and it doesn't change the error message:
>>
>> DSET ^oscar_vel7550.nc.gz.nc
>> DTYPE netcdf
>> XDEF 1201 LINEAR 20.0 0.3
>> YDEF 481 LINEAR -80.0 0.3333333333333333
>> ZDEF 1 LINEAR 0 1
>> tdef 1 linear 00Z7jun2013 1dy
>> UNDEF 0.0
>> VARS 2
>> u=>u 0 t,z,x,y Ocean Surface Zonal Currents [m/s]
>> v=>v 0 t,z,x,y Ocean Surface Meridional Currents [m/s]
>> ENDVARS
>>
>> And below is the output of "ncdump -h", which shows the dimensions,
>> along with the full output from GrADS. Also, this source is
>> available via OPeNDAP, so you can find out additional details about
>> this source by visiting
>>
>> http://podaac-opendap.jpl.nasa.gov/opendap/allData/oscar/preview/L4/oscar_third_deg/oscar_vel7550.nc.gz.html
>>
>> Any advice or help is greatly appreciated. Here is the "ncdump -h"
>> output and the "lats4d.sh" GrADS output (which also shows I am using
>> GrADS version v2.0.1.oga.1):
>>
>> netcdf oscar_vel7550.nc.gz {
>> dimensions:
>> time = 1 ;
>> year = 1 ;
>> depth = 1 ;
>> latitude = 481 ;
>> longitude = 1201 ;
>> variables:
>> int time(time) ;
>> time:units = "day since 1992-10-05 00:00:00" ;
>> time:long_name = "Day since 1992-10-05 00:00:00" ;
>> float year(year) ;
>> year:units = "time in years" ;
>> year:long_name = "Time in fractional year" ;
>> float depth(depth) ;
>> depth:units = "meter" ;
>> depth:long_name = "Depth" ;
>> double latitude(latitude) ;
>> latitude:units = "degrees-north" ;
>> latitude:long_name = "Latitude" ;
>> double longitude(longitude) ;
>> longitude:units = "degrees-east" ;
>> longitude:long_name = "Longitude" ;
>> double u(time, depth, latitude, longitude) ;
>> u:units = "meter/sec" ;
>> u:long_name = "Ocean Surface Zonal Currents" ;
>> u:missing_value = 0. ;
>> double v(time, depth, latitude, longitude) ;
>> v:units = "meter/sec" ;
>> v:long_name = "Ocean Surface Meridional Currents" ;
>> v:missing_value = 0. ;
>> double um(time, depth, latitude, longitude) ;
>> um:units = "meter/sec" ;
>> um:long_name = "Ocean Surface Zonal Currents Maximum Mask" ;
>> um:missing_value = 0. ;
>> double vm(time, depth, latitude, longitude) ;
>> vm:units = "meter/sec" ;
>> vm:long_name = "Ocean Surface Meridional Currents Maximum Mask" ;
>> vm:missing_value = 0. ;
>>
>> // global attributes:
>> :NC_GLOBAL.VARIABLE = "Ocean Surface Currents" ;
>> :NC_GLOBAL.DATATYPE = "1/72 YEAR Interval" ;
>> :NC_GLOBAL.DATASUBTYPE = "unfiltered" ;
>> :NC_GLOBAL.GEORANGE = "20 to 420 -80 to 80" ;
>> :NC_GLOBAL.PERIOD = "Jun.07,2013" ;
>> :NC_GLOBAL.YEAR = "2013" ;
>> :NC_GLOBAL.DESCRIPTION = "OSCAR Third Degree Sea Surface
>> Velocity" ;
>> :NC_GLOBAL.CREATION_DATE = "00:33 09-Jun-2013" ;
>> :NC_GLOBAL.VERSION = 2009.f ;
>> :NC_GLOBAL.SOURCE = "Gary Lagerloef, ESR (lager at esr.org) and
>> Kathleen Dohan, ESR (kdohan at esr.org)" ;
>> :NC_GLOBAL.CONTACT = "Kathleen Dohan (kdohan at esr.org) or John
>> T. Gunn (gunn at esr.org)" ;
>> :NC_GLOBAL.COMPANY = "Earth & Space Research, Seattle, WA" ;
>> :NC_GLOBAL.REFERENCE = "Bonjean F. and G.S.E. Lagerloef, 2002
>> ,\\\"Diagnostic model and analysis of the surface currents in the
>> tropical Pacific ocean\\\", J. Phys. Oceanogr., 32, 2,938-2,954" ;
>> :NC_GLOBAL.NOTE1 = "Maximum Mask velocity is the geostrophic
>> component at all points + any concurrent Ekman and buoyancy components" ;
>> :NC_GLOBAL.NOTE2 = "Longitude extends from 20 E to 420 E to
>> avoid a break in major ocean basins. Data repeats in overlap region." ;
>> }
>>
>>
>> Here is the complete GrADS output from lats4d.sh:
>>
>>
>> /opt/opengrads/grads -blc 'run lats4d.gs -q -v -i
>> ../../sources/oscar/oscar_vel7550.nc.gz.nc.ctl -lat 16.8 31.8 -lon
>> 276.0 291.0 -format grib -table ../../sources/oscar/grads.lats.table
>> -ntimes 1 -o /tmp/tmpCHWp85.grb '
>>
>> Welcome to the OpenGrADS Bundle Distribution
>> --------------------------------------------
>>
>> For additional information enter "grads -h".
>>
>> Starting "/opt/opengrads/Linux/Versions/2.0.1.oga.1/x86_64/grads -blc
>> 'run lats4d.gs -q -v -i
>> ../../sources/oscar/oscar_vel7550.nc.gz.nc.ctl -lat 16.8 31.8 -lon
>> 276.0 291.0 -format grib -table ../../sources/oscar/grads.lats.table
>> -ntimes 1 -o /tmp/tmpCHWp85.grb ' " ...
>>
>>
>> Grid Analysis and Display System (GrADS) Version 2.0.1.oga.1
>> Copyright (c) 1988-2011 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.1.oga.1 little-endian readline printim grib2 netcdf
>> hdf4-sds hdf5 opendap-grids,stn athena geotiff shapefile
>> Issue 'q config' command for more detailed configuration information
>> Loading User Defined Extensions table
>> </opt/opengrads/Linux/Versions/2.0.1.oga.1/x86_64/gex/udxt> ... ok.
>> GX Package Initialization: Size = 11 8.5
>> Running in Batch mode
>> lats4d: Version 2.1.5 of 28 June 2010
>> No hardcopy metafile open
>> All files closed; all defined objects released;
>> All GrADS attributes have been reinitialized
>> lats4d: Data file is
>> File 1 :
>> Descriptor: ../../sources/oscar/oscar_vel7550.nc.gz.nc.ctl
>> Binary: ../../sources/oscar/oscar_vel7550.nc.gz.nc
>> Type = Gridded
>> Xsize = 1201 Ysize = 481 Zsize = 1 Tsize = 1 Esize = 1
>> Number of Variables = 2
>> u 0 t,z,x,y Ocean Surface Zonal Currents [m/s]
>> v 0 t,z,x,y Ocean Surface Meridional Currents [m/s]
>>
>> lats4d: Dimension environment file same as data file
>> lats4d: time range: 00Z07JUN2013 00Z07JUN2013 by 1, delta t: 24 hourly
>> lats4d: vertical levels: 0
>> lats4d: invalid plev 0 for GRIB output
>> lats4d: using HYBRID level number for vertical coordinate
>> lats4d: latitudinal range: 16.8 31.8
>> lats4d: longitudinal range: 276.0 291.0
>> gancgrid error: nc_get_vara_double failed; NetCDF: Index exceeds
>> dimension bound
>> Data Request Error: Error for variable 'u'
>> Error ocurred at column 1
>> lats4d: error creating grib_only file /tmp/tmpCHWp85.grb.grb
>> <RC> 1 </RC>
>> </IPC>
>> lats4d: exiting from GrADS...
>> No hardcopy metafile open
>> GX package terminated
>>
>>
>>
>>
>> Thank You,
>> Derek Simkowiak
>>
>> _______________________________________________
>> gradsusr mailing list
>> gradsusr at gradsusr.org <mailto:gradsusr at gradsusr.org>
>> http://gradsusr.org/mailman/listinfo/gradsusr
>
> --
> Jennifer M. Adams
> IGES/COLA
> 4041 Powder Mill Road, Suite 302
> Calverton, MD 20705
> jma at cola.iges.org <mailto:jma at cola.iges.org>
>
>
>
>
>
> _______________________________________________
> 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/20130609/757ec738/attachment-0003.html
More information about the gradsusr
mailing list