Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

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

Re: ncdigest V1 #1119



Hi Jeff,

> In netcdf-4.0, I don't see how to create variables which are arrays of
> strings with length > 1.  I see how to create arrays of
> single-characters, and arrays of variable-length strings, but not
> strings of a specified length.
  ...
> Maybe Russ or Ed can tell me whether this is possible in netcdf-4.0?
> Being limited to single character arrays in netcdf-3 was one of things
> I really wanted netcdf-4 to overcome.  Variable length strings are
> nice, but they don't map well to commonly used data structures
> (i.e. arrays) in fortran or python.

The distinction between an N-dimensional array of chars and an
(N-1)-dimensional array of fixed-length strings is pretty subtle, and it
looks like we assumed you could use the former if you needed the latter.

Multidimensional arrays of chars are supported in netCDF-4 just as in
netCDF-3.  Maybe a few convenience functions that treat an N-dimensional
array of chars as an (N-1)-dimensional array of strings that happen to
be fixed length are all that's needed.  If not, we may need a more
detailed use case that would make clear why that's inadequate.

--Russ

===============================================================================
To unsubscribe netcdfgroup, visit:
http://www.unidata.ucar.edu/mailing-list-delete-form.html
===============================================================================


 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Office of Programs University Corporation for Atmospheric Research (UCAR)   Unidata is a member of the UCAR Office of Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690