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.
Unidata Support wrote:
we will support attribute modification in the next version of netcdf-java (2.2), which may be ready by end of year (?)------- Forwarded MessageTo: <address@hidden> From: "Steve Loch" <address@hidden> Subject: Attribute modification in Java2.1 NetCDF API Organization: British Oceanographic Data CentreKeywords: 200404141623.i3EGNSCT021650 netCDFIs there any prospect of a later release permitting the update of the attributes within a NetCDF file without having to regenerate the complete file? The APIs I have used to date including Fortran, C and Matlab don't have this restriction. Steve Loch British Oceanographic Dta Centre
as to whether that can be done without rewriting the file depends on the file; we are constrained by the version 1 file format. what would you need in that regard?
netcdf-4 (on top of HDF5) should be able to modify attributes without rewriting entire file.