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

  • Subject: Re: [netcdfgroup] NetCDF: Start+count exceeds dimension bound
  • From: Dave Allured <dave.allured@xxxxxxxx>
  • Date: Thu, 17 Dec 2009 13:01:56 -0700
Ricardo,

Okay, I see the problem now, it is subtle. The order of the three dimensions is different between these two statements:

  ALLOCATE ( data_out(ni,nj,nk) , stat=error )
  dimids =  (/ x_dimid, y_dimid , z_dimid /)

That is because you also did this:

  call check( nf90_def_dim(ncid, "x", nk, x_dimid) )
  call check( nf90_def_dim(ncid, "y", ni, y_dimid) )
  call check( nf90_def_dim(ncid, "z", nj, z_dimid) )

The program array and the netcdf array must have the dimensions in the same order. HTH.

--Dave

rtorres@xxxxxxxxx wrote:
Hello Dave,

Thanks for the rapid response.

I'm on pc with the ubuntu 9.10 and the netCDF 4.0.1, downloaded from the
netCDF page.

Change the kind of variable doesn't seem to help, because i have already
tried with a lot of different types.

Together with this mail i send 3 files, the program, the input and the
output, the .nc file.

Thanks for everything,
Ricardo Torres




Ricardo,

I do not see the problem right off.  In this statement:

  real(KIND=8) , allocatable:: data_out(:,:,:)


Try using "double precision" instead of real(KIND=8). I am not an expert
on kind parameters, but I think using a straight integer 8 is compiler
dependent and can lead to trouble.

If that doesn't work, then please show the output from "ncdump
netCDFyxz.nc" after the program halts, and we can take a closer look.

What platform and version of Netcdf are you using?

Dave Allured
CU/CIRES Climate Diagnostics Center (CDC)
http://cires.colorado.edu/science/centers/cdc/
NOAA/ESRL/PSD, Climate Analysis Branch (CAB)
http://www.esrl.noaa.gov/psd/psd1/

------------------------------------------------------------------------

_______________________________________________
netcdfgroup mailing list
netcdfgroup@xxxxxxxxxxxxxxxx
For list information or to unsubscribe, visit: http://www.unidata.ucar.edu/mailing_lists/



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