[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[netCDF #CZY-526815]: Multiple unlimited dimentions trouble
- Subject: [netCDF #CZY-526815]: Multiple unlimited dimentions trouble
- Date: Tue, 10 Aug 2010 12:02:52 -0600
Hi,
> I'm trying to compile the simplest example with more than one unlimited
> dimention:
>
> #include <netcdfcpp.h>
> int main()
> {
> NcFile dataFile("dataFile.nc", NcFile::Replace, 0, NcFile::Netcdf4);
> NcDim* ncTime = dataFile.add_dim("Time");
> NcDim* ncNDim = dataFile.add_dim("Number");
> return 0;
> }
>
> I use library version 4.1.1, compile program with
> g++ main.cpp -o exe -lnetcdf_c++ -lnetcdf
> but still get a error "NetCDF: NC_UNLIMITED size already in use".
>
> What am I doing wrong?
The C++ interface included in the 4.1.1 distribution by default only handles
the netCDF-3 "classic" data
model, which only permits a single unlimited dimension per file.
To build the new experimental netCDF-4 C++ interface contributed by Lynton
Appel, you need to use the
configure option "--enable-cxx-4". The documentation for this new interface
is here:
http://www.unidata.ucar.edu/software/netcdf/docs/cxx4/
We expect an improved version of the C++ netCDF-4 interface will be available
when netCDF version 4.1.2
is released, in the next month or so.
--Russ
--with-netcdf
Russ Rew UCAR Unidata Program
address@hidden http://www.unidata.ucar.edu
Ticket Details
===================
Ticket ID: CZY-526815
Department: Support netCDF
Priority: Normal
Status: Closed