This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
> Organization: NCAR/HAO > Keywords: 199503141628.AA25285 Bill, > -> > I would like to be able to write a generalized hyperslab for each > -> > element of the AMIE array. Am I trying to do the impossible or can > -> > netCDF support this level of abstraction? I'll have a look at the > -> > ncputrec, etc routines. > -> > -> Maybe. ncvarputg() is only capable of writing a block of data values > -> of a single type, > > Sounds like a vestige of the Fortran paradigm. Yes, since one of the requirements of netCDF is that it support a Fortran interface and permit full access to data written with any netCDF interface from Fortran programs, it necessarily includes several vestiges of the Fortran data model. > -> so you will either have to make multiple calls or use > -> ncrecput(). I believe you can only use ncrecput() for this if Ntotal is > the > -> unlimited dimension in your netCDF file. > > Is it possible to emulate a virtual hyperslab (i.e. a block of data > containing mixed types) with a series of ncrecput() calls? Or should I > use HDF or CDF or worse yet, write my on? Ackpht! ;-) A single ncrecput() call can write a block of data containing mixed types, so a series of of ncrecput() calls can probably do what you are attempting. I have to qualify that with "probably" because I don't know all the constraints you are under, for example, whether it's possible for you to make "Ntotal" the record dimension for your dataset. --Russ