NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

Re: [netcdfgroup] NetCDF: Start+count exceeds dimension bound

brick <brickflying@xxxxxxxxx> writes:

> Hi
> When I read a nc file, there's an error:¿NetCDF: Start+count exceeds
> dimension bound.
> The data file is looked like:
> dimensions:
>   Azimuth = 46 ;
>   Gate = 1800 ;
> variables:
>   float Azimuth(Azimuth) ;
>  Azimuth:Units = "Degrees" ;
>   float BeamWidth(Azimuth) ;
>  BeamWidth:Units = "Degrees" ;
>   float GateWidth(Azimuth) ;
>  GateWidth:Units = "Meters" ;
>   float NyquistVelocity(Azimuth) ;
>  NyquistVelocity:Units = "MetersPerSecond" ;
>   float Reflectivity(Azimuth, Gate) ;
>  Reflectivity:Units = "dBZ" ;
>  Reflectivity:NumValidRuns = 25622 ;
> // global attributes:
> ..............................
> The first four variables, dimensions and all attributes were
> read¿correctly. Only when read the fifth variable,¿Reflectivity(Azimuth,
> Gate), ¿the error¿occurred. At beginning, the code was wrote like:
> REAL ¿ , ALLOCATABLE :: Reflectivity(:, :)
> ALLOCATE(Reflectivity(nAzimuth, nGate), STAT = AlState)
> CALL nc_check ( nf90_get_var(ncid, 5, Reflectivity) )
> nAzimuth, nGate are the dimensions read from data file. And then, it was
> modified as:
> CALL nc_check ( nf90_get_var(ncid, 5, Reflectivity, start = (/ 1, 1 /),
> count = (/ nAzimuth, nGate /)) )
> both of them don't work. Thanks.
> brick

Are you calling the C API or the fortran 90 API?

Looks like you are calling the C API from Fortran - is that what you are
doing?

Thanks,

Ed


-- 
Ed Hartnett  -- ed@xxxxxxxxxxxxxxxx



  • 2010 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: