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

Re: 20010103: multi-dimensional array writes in c++



>To: address@hidden
>From: Bill Cassanova <address@hidden>
>Subject: Re: 20010103: multi-dimensional array writes in c++
>Organization: The Weather Channel
>Keywords: C++ API

Bill,

> Thanks for the info...For the record, I like the original c++ interface
> a bit better.  This one seemed to work fine but there seemed to be a bit
> of line noise in the code itself.
> 
> example:
> --- To create a netcdf with your interface:
> nc = new NcFile( file_name, NcFile::Replace );
> 
> --- To get a Variable Name:
> NcVar *var=nc->get_var("var_name");
> 
> The same sequence in the new interface would be:
> int nc_id=nco_open(fl_in,NC_NOWRITE);
> rcd=nco_get_var(nc_id,static_cast<std::string>("wvl"),wvl);
> 
> 
> Version 1 is much more clear to me...
> 
> For the current C++ interface if it were up to my humble opinion I
> would not change a thing...the only thing that would be nice would
> be the use of some of the high performace array librarys.  Don't know
> how they might be used but being able to create an array and just be
> able to put it without any regard for the type and size could be quite
> handy.  The library that I am referring to is called Blitz++ and is
> available at http://www.oonumerics.org/blitz/

Thanks, I'll look into it.

> Something else that came to mind the other day...How is netCDF able
> to get the great speed is posseses?  My first thought was maybe some
> type of memory mapped I/O? 

No, that would have been hard to make portable to all the platforms
netCDF runs on, since some of them don't support memory-mapped I/O.
The efficiency of netCDF is mostly due to the elegant implementation
of the C interface by Glenn Davis, using buffering and direct-access
I/O.

For more on Glenn Davis, see his memorial page:

  http://www.unidata.ucar.edu/Glenn_Davis/get/memorial.html

--Russ