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

Mods to eos.py to improve dask compatibility #149

Merged
merged 3 commits into from
Mar 3, 2023
Merged

Conversation

sgyeager
Copy link
Contributor

The proposed mods allow depth to be passed to eos() as a simple 0-dimensional xarray DataArray, e.g.
depth=xr.DataArray(2000)
This is required if salt and temp args are DataArrays, but currently errors can arise if depth is 0-dimensional. Mods also improve performance if salt and temp are dask arrays by eliminating the unnecessary triple broadcasting of salt, temp, and pressure. The modified eos() works well for dask-enabled computation of MOC in sigma coordinates (https://github.com/sgyeager/POP_MOC).

@dcherian
Copy link
Contributor

Pushed a commit to support eos(salt, temp, 2000)

@TeaganKing
Copy link

Hi @mnlevy1981 , I'm wondering if this PR might get merged in the next iteration of pop-tools? This would be really useful to speed up some work that I'm doing that utilizes this functionality to create AMOC sigma diagnostics.

@dcherian dcherian merged commit 8532172 into NCAR:main Mar 3, 2023
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.

3 participants