Due to the current gap in continued funding from the U.S. National Science Foundation (NSF), the NSF Unidata Program Center has temporarily paused most operations. See NSF Unidata Pause in Most Operations for details.
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 TorresRicardo, 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@xxxxxxxxxxxxxxxxFor list information or to unsubscribe, visit: http://www.unidata.ucar.edu/mailing_lists/
netcdfgroup
archives: