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 Ping, Sorry this reply has taken so long, we were at a meeting all last week. You could check this FAQ and answer: http://www.unidata.ucar.edu/software/netcdf/docs/faq.html#Large%20File%20Support12 where it says: If you get the netCDF library error "One or more variable sizes violate format constraints", you are trying to define a variable larger than permitted for the file format variant. This error typically occurs when leaving "define mode" rather than when defining a variable. The error status cannot be returned when a variable is first defined, because the last fixed-size variable defined is permitted to be larger than other fixed-size variables (when there are no record variables). Similarly, the last record variable may be larger than other record variables. This means that subsequently adding a small variable to an existing file may be invalid, because it makes what was previously the last variable now in violation of the format size constraints. For details on the format size constraints, see the Users Guide sections NetCDF Classic Format Limitations and NetCDF 64-bit Offset Format Limitations. > By the way, I tried to compile using 64bit. > But when I check the output, the netcdf file still uses the classic > format not the new 64-bit offset format. To use the new 64-bit offset format, you have to specify a flag to the function that creates the netCDF file. Depending on what language API you are using, there are different ways of doing this. See this FAQ: http://www.unidata.ucar.edu/software/netcdf/docs/faq.html#Large%20File%20Support8 The format used is not related to whether the library is 32-bit or 64-bit. You can write and read 64-bit offset netCDF files with either a 32-bit or 64-bit library. --Russ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: OSF-271820 Department: Support netCDF Priority: Normal Status: Closed