@DocOtak, I agree the "coordinates" attribute in xarray is a bad example of 
simply reading a text attribute.  But it is also a good example of a lower 
level fully encapsulating that functionality, therefore hiding the details.  
Encapsulating functions are part of my thinking about allowing **`string`** 
arrays for CF simple lists.

I do not know how MATLAB handles character and string attributes.  However I 
found that NCL automatically converts **`char`** attributes to scalar 
**`strings`**.  Because of this and lack of another inquiry function, there is 
no good way at the NCL user level, to distinguish **`char`** and **`string`** 
file attributes.  The same may be true with python-netCDF4 and some other 
programming languages.

This ability to distinguish would be essential for my **`string`** array 
proposal to work.  I come from a Fortran perspective where the raw file data 
type is right up front.  Making a library function to handle this distinction 
would be natural.  I feel this could be done for CF simple list attributes, for 
all languages, without much trouble.

-- 
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/cf-convention/cf-conventions/issues/141#issuecomment-410853335

Reply via email to