Commits
cholee committed eff4268bdf7
Support sinusoidal dimensional scales for HDF-EOS2 grid dataset. - create XDim, YDim as 1-dimensional array - create lon, lat variables which are 2-dimensional arrays - the grid dataset uses XDim and YDim as dimensions and has an attribute "coordinates" = "lon lat" see #5.2 Two-Dimensional Latitude, Longitude, Coordinate Variables http://cf-pcmdi.llnl.gov/documents/cf-conventions/1.1/cf-conventions.html To implement this, control flow in H4toH5all_dimscale has been changed. Previously, grid dimensional scale was converted for each dimension like the following: function H4toH5all_dimscale(dataset) { for each dimension "dim" that "dataset" has { if ("dim" is HDF-EOS2 grid dimension such as "XDim" and "YDim") generate longitude or latitude by calling GDij2ll provided by HDF-EOS2 else convert "dim" as it is } } The previous implementation assumes that each dimension is independent of another dimension, which is no longer true. To keep H4toH5all_dimscale simple, dimensional scales for an HDF-EOS2 grid is handled in H4toH5eosgrid_dimscale(). function H4toH5all_dimscale(dataset) { if "dataset" has HDF-EOS2 grid dimensional scales call H4toH5eosgrid_dimscale() return ... } Additionally, unused code in h4toh5eos.c was removed.