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

Feat: move netcdf_io utility from DAS #42

Merged
merged 3 commits into from
Dec 15, 2023
Merged

Conversation

mackenzie-grimes-noaa
Copy link
Contributor

@mackenzie-grimes-noaa mackenzie-grimes-noaa commented Dec 14, 2023

Linear Issue

Related to IDSSE-378

Changes

  • Migrate netcdf_io module from DAS to the commons library

    • read_netcdf() was previously only needed for DAS (since RiskProcessor had its own Java implementation) but RiskProcessor will need to read netCDF files using Python now too
    • Moved all unit tests/test data from DAS as well
  • Combined the read_netcdf and read_netcdf_with_h5 functions

    • Default is to use netCDF4 library. This is the only library used by "operational" DAS code currently.
    • We can still use h5netcdf library if we want to, by passing optional use_h5_lib=True to read_netcdf or write_netcdf

@mackenzie-grimes-noaa mackenzie-grimes-noaa self-assigned this Dec 14, 2023
@mackenzie-grimes-noaa mackenzie-grimes-noaa marked this pull request as ready for review December 14, 2023 23:16
Copy link
Contributor

@Geary-Layne Geary-Layne left a comment

Choose a reason for hiding this comment

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

Looks good

@mackenzie-grimes-noaa mackenzie-grimes-noaa merged commit 1b8a18c into main Dec 15, 2023
3 checks passed
@mackenzie-grimes-noaa mackenzie-grimes-noaa deleted the feat/read-netcdf branch December 15, 2023 17:10
@mackenzie-grimes-noaa
Copy link
Contributor Author

mackenzie-grimes-noaa commented Dec 15, 2023

@Geary-Layne do you know how dependencies of this library are managed/declared for other repos to use it? Add it to the setup.py? Or something to do with the Docker images that get built?

Even after merging this PR, DAS is complaining that the commons library doesn't have the netCDF4 library installed. (Failed pytest in DAS repo)

@mackenzie-grimes-noaa mackenzie-grimes-noaa restored the feat/read-netcdf branch December 15, 2023 18:34
@Geary-Layne
Copy link
Contributor

My guess is that base c library needed for netcdf4 hasn't been installed for the python interpreter used by commons.

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.

2 participants