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

NetCDF Compatibility and requirements.txt update #228

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

wienkers
Copy link

This modification to grid.py allows py-eddy-tracker to intake a netCDF data variable directly, e.g. via xarray.

Example:

da = ds.isel(time=0).ssh   # xarray data array now holding one time slice
da_netcdf = Dataset('in-mem-file', mode='r', memory=da.to_netcdf())  # This keeps the netCDF variable in memory (no IO to disk!)
g = RegularGridDataset(None, "lon", "lat", centered=True, nc4file= da_netcdf)  
# NOTE: Using 'None' for the .nc file path then requires specifying directly the netCDF variable in memory
#             Still compatible with specifying the .nc file path using the "filename" required input. I this case, variable "nc4file" is ignored

Finally, this PR also updates the requirements.txt which has a long-standing error with matplotlib versions after 3.7.1 due to their updated contour algorithm. Across a number of participants at a hackathon, it was determined that v3.7.1 is necessary. Without matplotlib v3.7.1 no errors are raised, but also 0 eddies are ever identified...

wienkers and others added 2 commits January 15, 2024 12:17
…rray. Updates requirements.txt which has a long-standing error with matplotlib versions after 3.7.1 due to their updated contour algorithm.
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