From: Pascal on
Hi,
When I read in a variable with a unlimited dimension from a netcdf file, the variable is not imported correctly. The variable will show zeros inserted alternatively along the unlimited dimension.

If a netcdf variable is a 4x2 matrix with the first dimension being the unlimited dimension, eg

2 2
1 4
5 2
7 8

the matrix in matlab will read

2 2
0 0
1 4
0 0

So the dimensions are the same, but the data is different

I use the following commands to read in the netcdf file

ncid = netcdf.open(netcdf_file,'NC_NOWRITE');
varid = netcdf.inqVarID(ncid,varname);
variablename = netcdf.getVar(ncid,varid);

Did anyone encountered the same problem and has a solution to this?

Thanks
From: Ashish Uthama on
Pascal,
Would you be able to upload a sample nc file online?
http://groups.google.com/group/cssmrepository