Closed rmontuoro closed 4 years ago
The Python post uses this:
self.nlp = len(g.dimensions['phony_dim_0'])
self.nfluxtube = len(g.dimensions['phony_dim_1'])
self.nmp = len(g.dimensions['phony_dim_2'])
self.nlon_geo = len(g.dimensions['phony_dim_3'])
self.nlat_geo = len(g.dimensions['phony_dim_4'])
self.nheights_geo = len(g.dimensions['phony_dim_5'])
assume there's something similar in the Fortran HDF5 library. I would not be opposed to re-writing the grid file with actual dimension names; that was simply another follow of existing convention.
With HDF5, the dimensionality of dataspace can be retrieved using the following APIs:
h5sget_simple_extent_ndims_f(space_id, rank, hdferr)
- Returns the number of dimensions
h5sget_simple_extent_dims_f(space_id, dims, maxdims, hdferr)
- Returns dimensions sizes
We could add explicit dimension names to the grid file, but it is not required.
@rmontuoro , just want to check with you to make sure this issue has been taken care of and can be closed. Thank you!
For consistency, and to prevent mistakes, the following parameters should be read from the grid file:
nFluxTube
NLP
NMP
instead of the current
&SpaceManagement
namelist.If needed,
NPTS2D
could then be computed from the parameters above.