Closed NoeLahaye closed 4 years ago
wow this seems like a strong constraint to me.
But I don't understand why we are resetting coords here? Couldn't we just do:
if z_dim==zt_dim and not v[z_dim].equals(zt[zt_dim]):
? @NoeLahaye, gitblame seems to indicate this was added during the vmodes PR. Could you please look at the above suggestion and see if it breaks your workflow?
can you explain to me what is gitblame? It seems to be very useful.
Your suggestion was indeed a previous version, if I remember correctly.
The reason why we had to use reset_coords
is that just comparing with equals is raising an error if some coordinates are different. cf. DataArray.equals doc:
True if two DataArrays have the same dimensions, coordinates and values; otherwise False
gitblame:
if you click on 1/ the link in your initial post that brings you to the line of code that breaks and then 2/ on the three dots right next to the line number and 3/ on View git blame
you'll have a view of how each line of code was modified last.
After reading DataArray.equals doc, shouldn't we use more simply ==
?
After reading DataArray.equals doc, shouldn't we use more simply
==
?
Lol, you are probably right... Which one of us make the change and try it?
fixed in c16668c
https://github.com/slgentil/croco/blob/7dcdfeb068c8dfae015c29cc519c3bd0fa67493c/crocosi/gridop.py#L493
if
v
(theDataArray
to interpolate) has no name, this raises the error: