Skip to content
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

Patch for errors in NASA OceanColor L3 nc files. Specially fix the UD flip issue. #8380

Merged
merged 1 commit into from
Feb 24, 2024

Conversation

joa-quim
Copy link
Member

NASA MODIS L3 grids are a mess, with wrong coordinates and the valid_min/max attributes in opposite order of that of the lat vector. That is, the lat vector is top-down but valid_min = -90 and valid_max = 90. Furthermore, the grid is grid-registered and the start lat should be -90 + 180/4321/2 = -89.97917148808146 but it wrongly starts at -89.979171752929688 (well ends at this number because the vec is top-down). Same mess with the lon vector.

This PR applies fixes to those nc files such that grid has the right lat order and do not print (because fixed) worrying warnings like

gmtread [WARNING]: The y-coordinates and range attribute are in conflict but range is exactly 180; we rely on this range
gmtread [WARNING]: x_inc does not divide 180; geographic boundary condition changed to natural.

… flip issue.

NASA MODIS L3 grids are a mess, with wrong coordinates and the valid_min/max attributes in opposite order of that of the lat vector. That is, the lat vector is top-down but valid_min = -90 and valid_max = 90. Furthermore, the grid is grid-registered and the start lat should be -90 + 180/4321/2 = -89.97917148808146 but it wrongly starts at -89.979171752929688 (well ends at this number because the vec is top-down). Same mess with the lon vector.
@joa-quim joa-quim merged commit de507ff into master Feb 24, 2024
2 of 6 checks passed
@joa-quim joa-quim deleted the NASA-MODIS-shits branch February 24, 2024 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant