This page is about unusual grid objects that use non-standard dimension names instead of predefined XDim and YDim. This page will assume that readers are familiar with HDF-EOS2 grid. Also, Read Longitude and Latitude Values from HDF-EOS2 Grid data is worth reading before reading this page.
Users want to retrieve not only data from data fields but also locations where those data were measured. The locations, longitude and latitude, are associated with data through two predefined dimensions, XDim and YDim. A grid object defines the whole locations in that grid object with respect to XDim and YDim. In other words, a grid object returns the longitude value and the latitude value when i-th element in XDim and j-th element in YDim are given.
Then, data fields make use of XDim and YDim. Assuming that data fields are two-dimensional, those two dimensions are XDim and YDim in normal cases. Now that those two dimensions are shared by data fields and their enclosing grid object, we can roughly say a data field provides one scientific data element for each location defined by the enclosing grid object. In Figure 1, for instance, 8-by-14 locations are defined by a grid object.
This can be regarded as the standard way to interpret data fields in grid objects. The HDF-EOS2 Reference also states as follows:
To be interpreted properly, each data field must make use of the two predefined dimensions: XDim and YDim. These two dimensions are defined when the grid is created and are used to refer to the X and Y dimensions of the chosen projection. |
That said, some unusual files do not allow the above interpretation. For example, we found one file from MOP03 data products uses unusual way to associate locations with data fields. You can download one sample file from here.
Instead of two standard dimensions in grid, XDim and YDim, all data fields contain nlon and nlat dimensions. Figure 2 shows the grid defined by MOP03 grid object in this file. We didn't draw all locations for better view.
Compared to Figure 1, Figure 2 uses nlon and nlat.The consequence is that mapping locations with data elements cannot be done without special handling. We believe many tools cannot detect locations for those data fields. If you are developing a visualization tool, it will be better to consider this case. For example, HDF4-to-HDF5 Converter checks whether or not XDim and YDim are ever used by data fields in a grid object. If none of data fields make use of them, HDF4-to-HDF5 Converter checks whether or not nlon and nlat are used by data fields.
If you are a user and your tool does not support the above heuristics, you may need to manually let the tool recognize nlon and nlat as XDim and YDim or vice versa.