nsidc / granule-metgen

Metadata generator for direct-to-Cumulus era
Other
0 stars 0 forks source link

gpolygons crossing dateline #20

Closed lisakaser closed 2 weeks ago

lisakaser commented 2 months ago

Background: Due to the polar nature of many NSIDC data sets, Geodetic GPolygon was frequently used for ECS/CMR ingest to best represent data spatial extent. It was the only area-type spatial representation that CMR allowed to cross the Earth's poles and International Date Line (referred to simply as 'date line' hereafter) as CMR doesn't allow Cartesian bounding rectangles to span either Earth's poles or the date line.

Cumulus Problem: No area type granule spatial representation is allowed to span the date line (apparently? confirm this is accurate UPDATE: this is NOT accurate!!). The expectation we're dealing with presently is that a date line-crossing granule's spatial extent must be divided into two or more GPolygons situated on both sides of the International Date Line (or poles? I also currently don't know if pole crossings are disallowed in Cumulus or if just date line crossings are).

In the case of data line-crossing data, the onus will lie on someone* to define data extent in granule metadata files as coordinates accounting for its total extent, but divided amongst two or more GPolygons that abut one another along the date line.

*The question: who is this someone? - Is it new-metgen that should handle this? - Is it to be handled by Ops or the data producer via input files (to new-metgen as is currently done for existing-metgen) for spatial representation? - Is Cumulus ingest going to handle appropriately dividing a single GPolygon as necessary to represent the data extent as multiple GPolygons? - - Is this already happening during Cumulus ingest?

In summary: Geodetic GPolygons adhere to the CMR rules of the Geodetic Coordinate System, (from https://wiki.earthdata.nasa.gov/pages/viewpage.action?spaceKey=ED&title=CMR+Data+Partner+User+Guide#CMRDataPartnerUserGuide-CoordinateSystems) where: The Geodetic coordinate systems are angular coordinates (longitude and latitude) and are closely related to spherical polar coordinates. They are defined relative to a particular Earth geodetic datum. The CMR implementation of the Geodetic coordinate system follows OGC standards, which are defined at https://www.opengeospatial.org/. The World Geodetic System 84 (WGS 84) is the supported geodetic system. Please be aware of the following geodetic coordinate system constraints:

afitzgerrell commented 1 month ago

The DUCk-Ops meeting of 18 July 2024 revealed that CMR is where ingest [presumably] fails. I saw no evidence of this from reading the CMR Data Producer User Guide gpolygon rules.

I spoke with Chris, and regardless of where this idea that CMR ingest of the metadata will fail, Chris said he will have his team test the first file provided to us by the DPT which was a tile that crossed the anti-meridian. I will create umm-g and cnm files for it and hand that trifecta to the NSIDC Cumulus team via slack.

They should be testing the DPT mock-ups in a couple of weeks. They will provide error messages if ingest of this granule fails, while the other, non-antimeridian crossing granule ingests successfully. I'll see if I can resolve the errors with simple tweaks that follow rules which can be documented. If I can't fix it, I'll file a trouble ticket (TT) with CMR to document the tests and issues, and let them tell me why it doesn't ingest.

afitzgerrell commented 1 month ago

Granule bundle (netCDF, UMM-G, CNM) is essentially ready for the NSIDC Cumulus team who will test this and the other DPT granule within the next couple of weeks (aligns with their dev sprint). Simply holding off on delivery to them in order to hear back from Kara that she has no concerns about the DStew decision to keep version as a single number-represented-as-a-character—rather than make a change to zero padding.

afitzgerrell commented 1 month ago

After finalizing that version numbers won't be zero-padded, I was able to, on 1 August 2024, attached (netCDF, UMM-G, CNM) to the NSIDC Cumulus slack channel per Chris's request to queue this granule for ingest testing along with the other DPT MODSCGDRF_NRT (non-anti-meridan-crossing) granule.

afitzgerrell commented 1 month ago

A preliminary testing of ingest for both MODSCGDRF_NRT granules directly into Cumulus (integration environment) succeeded on 9 Aug 2024!!

Mike Dorfman provided feedback advising for content tweaks of CNM and UMM-G files provided for the mock-up testing. This feedback is captured in issue numbers 47 and 48, and has been added to the Confluence CNM and UMM-G documents.

afitzgerrell commented 2 weeks ago

Troy ingested the anti-meridian crossing granule mock-up (h07v03_Terra_20220415.v2023.1.nc) into UAT. I checked and it matches the mod10a1 equivalent tile location and shape being split across the anti-meridian as expected.