You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The old way of strong fixed length strings in netcdf3 (using a multidimensional character array, with an extra dimension for string length) is clunky. The new way in netcdf4 (vlen strings) does not map very well on python and fortran data types. The easiest way to deal with strings in numpy and fortran is with arrays of fixed-length strings (e.g. for 10 character strings you would use the numpy dtype 'S10' and in fortran you would use character(len=10)). HDF5 does support a fixed-length string data type (H5T_STRING).
I know this has been discussed many times before, but I keep getting requests from python users for this so I though I would bring it up again (now that we have this nice github interface to keep track of the discussion).
The text was updated successfully, but these errors were encountered:
The old way of strong fixed length strings in netcdf3 (using a multidimensional character array, with an extra dimension for string length) is clunky. The new way in netcdf4 (vlen strings) does not map very well on python and fortran data types. The easiest way to deal with strings in numpy and fortran is with arrays of fixed-length strings (e.g. for 10 character strings you would use the numpy dtype 'S10' and in fortran you would use character(len=10)). HDF5 does support a fixed-length string data type (H5T_STRING).
I know this has been discussed many times before, but I keep getting requests from python users for this so I though I would bring it up again (now that we have this nice github interface to keep track of the discussion).
The text was updated successfully, but these errors were encountered: