comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Deleting a variable from a NetCDF file
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Deleting a variable from a NetCDF file [message #49477 is a reply to message #49460] Tue, 25 July 2006 07:35 Go to previous messageGo to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
Mark Hadfield wrote:
> alexzcervantes@gmail.com wrote:
>
>> How about overwriting a variable in a NetCDF file?
>>
>> My problem is that I have to overwrite a variable in a NetCDF file. I
>> was thinking of deleting the variable, and then writing my new
>> variable.
>>
>> Is there a flag that will allow me to just overwrite the variable?
>
>
> Will the new variable have the same data type and dimensions as the
> original? Then just rename it (NCDF_VARRENAME) and then overwrite the
> data (NCDF_VARPUT).

Also, do you want to overwrite the variable+data, or just the data associated wsith teh
variable? If the former, then Mark's suggestions will do the trick. If the latter, then
all you need to do is replace the data (using the varput routine).

paulv


> Otherwise you have to make a new file, copy over all the stuff you want
> to keep, add the new stuff. The netCDF operators (NCO) are good for this
> sort of thing:
>
> http://nco.sourceforge.net/
>


--
Paul van Delst Ride lots.
CIMSS @ NOAA/NCEP/EMC Eddy Merckx
Ph: (301)763-8000 x7748
Fax:(301)763-8545
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Array comparison
Next Topic: Re: Draw Widget in GUIBuilder?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 22:38:06 PDT 2025

Total time taken to generate the page: 0.48061 seconds