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

Support ILVIS2 #40

Merged
merged 5 commits into from
Oct 16, 2024
Merged

Support ILVIS2 #40

merged 5 commits into from
Oct 16, 2024

Conversation

trey-stafford
Copy link
Contributor

@trey-stafford trey-stafford commented Oct 15, 2024

This PR adds support for ILVIS2 data.

Note that the behavior of valkyrie is preserved here: the GLAT, GLON, and ZG fields are
used for lat/lon/elev. We may want to revisit supporting transformation of other
lat/lon/elev combinations (e.g., HLAT, HLON, and ZH). See #41

resolves #19 and #20


📚 Documentation preview 📚: https://iceflow--40.org.readthedocs.build/en/40/

Now need to figure out TODO related to there not being one single source of
lat/lon/elevation for these data.
This replicates the behaivor in `valkyrie`: the GLAT, GLON, and ZG fields are
used for lat/lon/elev. We may want to revisit supporting transformation of other
lat/lon/elev combinations.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of this code is copied directly from valkyrie, with some minor modifications.

valkyrie did not have any tests defined to ensure the logic here is sound - it would be nice to add some! Right now, the end-to-end test asserts that data can be found, downloaded, and read with this code.

# This ensures all columns are present, regardless of the date. Granules
# before 2017 use the V104 fields and anything after uses the v202b
# fields. The data type for all values must be `float` because the null
# value is `np.nan` - a float.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this class should be broken in two: one for pre-2017 and one for post-2017. The resulting df would just have the columns that are present in the source data.

The downside to this is that users would get dataframes with inconsistent columns for ILVIS2 data. At some point we want to look at harmonizing across all supported datasets, so that a user can easily compare elevations. Different datasets already have different sets of columns, so this is a bridge we'll have to cross soon

@trey-stafford trey-stafford marked this pull request as ready for review October 16, 2024 17:50
@trey-stafford trey-stafford merged commit 03afac1 into main Oct 16, 2024
4 checks passed
@trey-stafford trey-stafford deleted the 19-support-ilvis2 branch October 16, 2024 17:50
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.

Add support for ILVIS2 v1
1 participant