Add a new variable to netCDF file? [message #78073] |
Mon, 24 October 2011 16:44  |
Ashley Berg
Messages: 14 Registered: February 2011
|
Junior Member |
|
|
So, I know how to overwrite a variable in a netCDF file, but how do I
add a new one?
I have a netCDF file with about 30 variables and I want to add two new
ones. It would be a pain to have to copy over all 30 vars plus the
new ones into a new file, so is there a way to add variables using the
netCDF operators? I've been experimenting but haven't been able to
find a way to do it (when I try to write a new variable to the file,
it complains that it can't find the variable, which implies it's
looking to overwrite an existing one rather than tack on the new one).
Thanks!
|
|
|
|
|
|
Re: Add a new variable to netCDF file? [message #86933 is a reply to message #78073] |
Sun, 15 December 2013 04:49   |
fereshtehkomijani
Messages: 1 Registered: December 2013
|
Junior Member |
|
|
On Tuesday, October 25, 2011 3:14:29 AM UTC+3:30, Ashley Berg wrote:
> So, I know how to overwrite a variable in a netCDF file, but how do I
>
> add a new one?
>
>
>
> I have a netCDF file with about 30 variables and I want to add two new
>
> ones. It would be a pain to have to copy over all 30 vars plus the
>
> new ones into a new file, so is there a way to add variables using the
>
> netCDF operators? I've been experimenting but haven't been able to
>
> find a way to do it (when I try to write a new variable to the file,
>
> it complains that it can't find the variable, which implies it's
>
> looking to overwrite an existing one rather than tack on the new one).
>
>
>
> Thanks!
dear
i am newbie with netcdf files manipulate. my aim is same as Ashley Berg to add 3 variables which all of them are in 3 different netcdf files with fourth netcdf file. all of them have same time step, longitude and latitude. but i cant fine way to do that. is it possible to do that with MATLAB? if it is, would you please tell me how.
cheers
fereshte
|
|
|
Re: Add a new variable to netCDF file? [message #86934 is a reply to message #86933] |
Sun, 15 December 2013 14:37  |
Andy Sayer
Messages: 127 Registered: February 2009
|
Senior Member |
|
|
You might have better luck posting in a Matlab group (this one is for IDL). I don't know how many of us use Matlab (I don't). Good luck!
>
> dear
>
> i am newbie with netcdf files manipulate. my aim is same as Ashley Berg to add 3 variables which all of them are in 3 different netcdf files with fourth netcdf file. all of them have same time step, longitude and latitude. but i cant fine way to do that. is it possible to do that with MATLAB? if it is, would you please tell me how.
>
> cheers
>
> fereshte
|
|
|