Commits
clee83 committed 6ec5a0c12c7
Make h4toh5 detect 'nlon' and 'nlat' dimensions used by some files in lieu of 'XDim' and 'YDim'. Most HDF-EOS2 grid fields refer to 'XDim' and 'YDim' for specifying where the data was measured. Using 'XDim' and 'YDim' is kind of standard and documented in the HDF-EOS2 reference. However, some files do not use 'XDim' and 'YDim'. Instead, they define their own dimensions such as 'nlon' and 'nlat', and all fields refer to those non-standard dimensions. 'XDim' and 'YDim' are important because h4toh5 exploits them to do followings: - Detect which dimension is the major dimension; in other words, [XDim][YDim] or [YDim][XDim] - Check if a field has corresponding geolocation fields. If so, an attribute, 'coordinate', is added for CF conventions. This changelist makes h4toh5 detect whether or not grid fields are using 'XDim' and 'YDim'. If 'XDim' and 'YDim' are never used, h4toh5 checks if 'nlon' and 'nlat' are used instead. If non-standard dimensions are used, h4toh5 treats them as 'XDim' and 'YDim', and converts the file in the semantically correct manner. At this point, 'nlon' and 'nlat' are hard-coded, but this can be easily extended. To collect more bizarre files, this changelist does not implement more heurisitic cases.