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

Re: 20011025: Increasing the size of a variable in a re-opened file



>To: support <address@hidden>
>From: Olivier Germain <address@hidden>
>Subject: Increasing the size of a variable in a re-opened file
>Organization: UCAR/Unidata
>Keywords: 200110251650.f9PGod127998

Hi Olivier,

> I'm beginning with NetCDF ("under" Matlab) and I have a simple question:
> how to have a variable's size increased (and the variable populated) in 
> a re-opened file ?
> I guess this involves redef/endef/fillmode but I haven't succeeded yet.

In netCDF, only variables that use the "unlimited" dimension can
increase in size after they are defined, and only along that
dimension.

So if you want to have a variable grow along a dimension, it has to be
the first dimension, and it has to be defined as the unlimited (or
"record") dimension. 

You don't say which of the MATLAB netCDF interfaces you are using, 
but there may be examples in the documentation for how to do this.
See

  http://www.unidata.ucar.edu/packages/netcdf/software.html#MATLAB

and the links it leads to.

--Russ

_____________________________________________________________________

Russ Rew                                         UCAR Unidata Program
address@hidden                     http://www.unidata.ucar.edu