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

ValueError using ecco_v4_py.vector_calc.UEVNfromUXVY #151

Open
simonwettocean opened this issue Jul 26, 2024 · 3 comments
Open

ValueError using ecco_v4_py.vector_calc.UEVNfromUXVY #151

simonwettocean opened this issue Jul 26, 2024 · 3 comments

Comments

@simonwettocean
Copy link

Hi,

I am having some trouble running ecco_v4_py.vector_calc.UEVNfromUXVY, actually while executing cell 13 from this example notebook for displaying output from the Arctic Subpolar gyre sTate Estimate (ASTE): https://github.com/crios-ut/aste/blob/master/aste_llcreader_example.ipynb

The code works fine for the first few cells but then fails in cell 13, where the uvel and vvel values are calculated using

ecco_v4_py.vector_calc.UEVNfromUXVY.

I suspect this has something to to with a new version of a python package I am using (possibly dask?). Possibly a downgrade of some packages I am using could resolve the problem? I am attaching the full error message and a list of my installed packages.

Any help is very much appreciated!

Cheers,

Simon

aste_llcreader_example_cell13_output.txt
my_python_packages.txt

@timothyas
Copy link
Member

Hi @simonwettocean! Could you show the code that created this error? It's hard to figure out what's going on without context.

@simonwettocean
Copy link
Author

simonwettocean commented Aug 14, 2024

Hi @timothyas, thanks for getting back to me! Sorry for my delayed response, I am at sea at the moment.

Here is the code that results in the error, mentioned above:

uvel,vvel = ecco_v4_py.vector_calc.UEVNfromUXVY(ds['UVELMASS'].sel(k=0),
ds['VVELMASS'].sel(k=0),
coords=cds,
grid=grid)

Where 'ds' is the xarray dataset that includes the variables 'UVELMASS' and 'VVELMASS'. The full code of the example I am trying to execute is available on the following GitHub repository: https://github.com/crios-ut/aste/blob/master/aste_llcreader_example.ipynb

@simonwettocean
Copy link
Author

simonwettocean commented Aug 23, 2024

I have traced it down to the error occurring in the '_maybe_rename_grid_positions' function. The error can be avoided when changing the line 'if di not in arr_source:' to 'if di not in arr_source.dims:' in that function. However that raises more errors, so I'm not sure if this is a good way of troubleshooting.

Interestingly, I managed to run the UEVNfromUXVY function in this example for ECCO: https://ecco-v4-python-tutorial.readthedocs.io/ECCO_v4_Interpolating_Fields_to_LatLon_Grid.html

Thus, I suspect it is related to the specifics of the ASTE data set. Do you have any idea what could cause this error and how I could resolve it? Any help is greatly apreciated.

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

No branches or pull requests

2 participants