-
Notifications
You must be signed in to change notification settings - Fork 295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a reader for MODIS Level 3 files in CMG format. #2631
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #2631 +/- ##
==========================================
+ Coverage 95.20% 95.22% +0.01%
==========================================
Files 354 356 +2
Lines 51370 51539 +169
==========================================
+ Hits 48908 49076 +168
- Misses 2462 2463 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Pull Request Test Coverage Report for Build 6892910354Warning: This coverage report may be inaccurate.We've detected an issue with your CI configuration that might affect the accuracy of this pull request's coverage report.
💛 - Coveralls |
Codefactor is moaning about the complexity of |
This is fixed, but not defined in the file. So we must | ||
generate it ourselves with some assumptions. | ||
""" | ||
proj_param = "EPSG:4326" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok so this is just assuming a generic lon/lat coordinate system?
https://gdal.org/user/coordinate_epoch.html
Looks like a related discussion:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think your suggestion on slack to use OGC:CRS84
is good as a minimum. I could have sworn there was a CRS that was at least rooted in an exact date/time, but otherwise was similar to EPSG 4326. At least CRS84 has the same axis order that we use/expect.
CodeScene is happy now! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job putting this together. I put a couple questions, some concerns, and other comments inline.
Otherwise, I'd like to officially state that I'd like something better than the -999/-9999 resolution stuff in the tests to describe these files. It just seems so hacky. If it must be this way then fine, but it feels like we can come up with something better.
Co-authored-by: David Hoese <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. I wouldn't mind a discussion on the usage of EPSG:4326 and I'd still like @mraspaud to look at the change to hdfeos_base.py, but otherwise this looks pretty good. Nice job sticking with it @simonrp84!
Looking through the MODIS docs it seems like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but I would use the maxsplit everytime.
Sorted this, so always using |
I'll see if I can do a quick check on the viirs edr reader so complete the tests for these changes. Then we can merge it. |
That was a monster of a PR, turned out to be more complex than I was anticipating! Thanks for the help and comments along the way, really nice to get this merged. |
This PR adds a reader for MODIS Level 3 (daily / monthly / etc) products on the climate monitoring grid.
I'd like feedback on the change I made to
hdfeos_base.py
. The CMG data has metadata containing URLs with=
signs, which confuses the_split_line
method. My change means that only the first=
is used to split strings, with the subsequent ones assumed as part of the metadata.Personally, I don't think the
try...except
is needed as there should only ever be one important=
in each string. But I wrote it this way in case there's some problem I've not thought of. Opinions welcome.