-
Notifications
You must be signed in to change notification settings - Fork 180
Lon, lat axes construction error in HdfEosOmiConvention #1194
Comments
Submitted pull request #1195 |
Thanks for the PR @msdsoftware! I don't know much about HdfEos, but it looks like you are saying that when geolocating a cell, the lat/lon associated with that cell should be defined as the center of the cell and not the lower left corner? That sounds reasonable to me. @ethanrd - thoughts? |
@lesserwhirls, I don't know much about HDF-Eos either, but when plotting the data from the sample dataset, Panoply needs to be given the cell centers. I haven't poked about too much for documentation or other help, but I did find, e.g. , the example code in "Figure 5" of https://hdfeos.org/examples/matlab5.php effectively does the same as what my PR implements. |
Having read more about HdfEos, I worry that the 0.5 offset isn't always the right one to use. It looks like there is a a lot of information tucked away in the Unfortunately, the variable
Perhaps we should keep <netcdf xmlns="http:https://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2" location="C:/Users/lesserwhirls/Desktop/OMI-Aura_L3-OMTO3e_2017m0105_v003-2017m0203t091906.he5">
<group name="HDFEOS">
<!--SNIP-->
<group name="GRIDS">
<!--SNIP-->
<group name="OMI_Column_Amount_O3">
<!--SNIP-->
<attribute name="GCTPProjectionCode" type="int" value="0" />
<attribute name="Projection" value="Geographic" />
<attribute name="GridOrigin" value="Center" />
<attribute name="GridSpacing" value="(0.25,0.25)" />
<attribute name="GridSpacingUnit" value="deg" />
<attribute name="GridSpan" value="(-180,180,-90,90)" />
<attribute name="GridSpanUnit" value="deg" />
<attribute name="NumberOfLongitudesInGrid" type="int" value="1440" />
<attribute name="NumberOfLatitudesInGrid" type="int" value="720" />
</group>
</group>
</group> In this case, the attribute |
@lesserwhirls, The convention class in question, |
That's how I read that document as well. Thanks for digging around and making the PR! I'll go ahead and merge it in. I might make another PR with some notes, updating the url at the top of the file and referencing the pdf above, but nothing you need to bother with unless you want to. I appreciate your efforts! |
BTW, @lesserwhirls, what was your procedure for extracting the content of |
Most of the original OMI L2G and L3 gridded products included errors in the HDF-EOS grid-level metadata. All of these products are now either fixed, or are in the process of being fixed. Here are the corrected values of the grid-level metadata: Also, the Grid_Origin attribute has been removed. Finally, |
Thanks for the info @pjtleonard! It looks like @msdsoftware fix is all we need. @msdsoftware - I am able to view the content of |
Ach, @lesserwhirls, control-click! (I'm a Mac user) I was trying double-click. |
A Panoply user has noted that an OMI-Aura_L3 HDF-EOS dataset is plotted with all cells a half degree out of position both in lon and lat.
Doing some checking I find that Panoply reports the dataset is opened using the
HdfEosOmiConvention
class. Checking the source code for that convention, I see themakeLonCoordAxis
andmakeLatCoordAxis
methods are constructingCoordinateAxis1D
axes such that the first grid cell is centered on -180°E -90°S, whereas that should presumably be the lower left corner of the first cell.So it looks to me like
makeLatCoordAxis
should instead sayv.setValues(n, -90.0 + 0.5 * incr, incr);
and
makeLonCoordAxis
should sayv.setValues(n, -180.0 + 0.5 * incr, incr);
Does my interpretation of this sound right? Unfortunately, the URL at top of
HdfEosOmiConvention
for more info is a dead link. Using Google I did find a PDF document that seems to pertain, and I note that it also suggests the possibility that an OMI-Aura dataset might not be full global, asHdfEosOmiConvention
currently seems to expect.The text was updated successfully, but these errors were encountered: