This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
> Hi! I have a problem with a netcdf file. I'm working with matlab version > 2008a and Netcdf 4.0.1. > I'm trying to build a grid for a determinate domain. but when I try to store > the topography > > % store raw topography > h(h>0) = 0; > h = abs(h); % need to be positive for ROMS convention. > nc=netcdf(grdfile,'w'); > nc{'h'}(:,:)=h'; > nc{'hraw'}(1,:,:)=h'; > close(nc); > > I find the next error message: Sorry, but I don't speak matlab. And I was not aware that matlab supports netCDF 4.0 yet - does it? Getting an error on close often means that you have defined variables that are too large for the default netCDF storage format, netCDF classic. Are you sure that the variable you are defining is of the size that you expect? If it is over 2GB in size, you must use another netCDF format to store the data, and I don't know how this would be done in matlab (but it would be done when the file is first created). I hope this helps... Thanks, Ed Ticket Details =================== Ticket ID: ESV-695577 Department: Support netCDF Priority: High Status: Closed