[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDFJava #HTH-916962]: Updating attribute values

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.


  • Subject: [netCDFJava #HTH-916962]: Updating attribute values
  • Date: Mon, 18 Sep 2017 15:38:20 -0600

Hi Trevin,

Yes, it is possible. Here is an example from our test suite that does a similar 
thing:
https://github.com/Unidata/thredds/blob/5.0.0/cdm-test/src/test/java/ucar/nc2/TestWriteMisc.java#L232

I suspect that you were missing the calls to setRedefineMode(). 
updateAttribute() *should* be able to do what you want, but failing that, I 
think that addGroupAttribute() will do the trick as well.

Cheers,
Christian 

Ticket Details
===================
Ticket ID: HTH-916962
Department: Support netCDF Java
Priority: Normal
Status: Closed
===================
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata 
inquiry tracking system and then made publicly available through the web.  If 
you do not want to have your interactions made available in this way, you must 
let us know in each email you send to us.