Check Geostrophic_Velocities_from_Sea_Level.ipynb#707
Conversation
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
|
View / edit / reply to this conversation on ReviewNB anton-seaice commented on 2026-07-16T02:00:18Z Have you tested this with MOM6 ?
I guess you also need to get the right combination of
instead of
it looks like julia-neme commented on 2026-07-20T02:49:38Z True! I can replace with And regarding the right combination, since discovering that I can use .derivative() you don't need to think about combining interp and diff, so I might change the script to use that.
(see comment below) anton-seaice commented on 2026-07-20T03:27:41Z I think using
|
|
View / edit / reply to this conversation on ReviewNB anton-seaice commented on 2026-07-16T02:00:20Z Why id boundary = 'extend' ?
I think boundary = None might work |
|
View / edit / reply to this conversation on ReviewNB anton-seaice commented on 2026-07-19T23:31:51Z can these two lines be combined ?
these are just merged below anyway ? julia-neme commented on 2026-07-20T02:47:29Z I wanted that yes! But intake only opened one of them. So I had to open 1by1 and merge.
|
|
View / edit / reply to this conversation on ReviewNB anton-seaice commented on 2026-07-19T23:31:52Z Line #2. detadx = grid.interp(grid.diff(ds['sea_level'], 'X', boundary='extend'), 'Y', boundary='extend') / ds['dxu'] It's a bit hard to follow this, but it looks like this:
shouldn't step 3 be either: a. divide by b. moved to between steps 1 and 2
(Assuming B-grid)
This calculation presumably would need changing for C-grid, to get rid of the anton-seaice commented on 2026-07-19T23:59:12Z Hangon - i dont have that correct, ill revisit
anton-seaice commented on 2026-07-20T01:00:17Z
so that is correct for B-grid,
julia-neme commented on 2026-07-20T02:48:10Z Maybe I should change this to use the .derivative() function instead! |
|
Hangon - i dont have that correct, ill revisit
View entire conversation on ReviewNB |
|
View / edit / reply to this conversation on ReviewNB anton-seaice commented on 2026-07-20T00:51:13Z @charles-turner-1 - this only works on older intake-catalogs, the new ones gives this error:
ESMDataSourceError: Failed to load dataset with key='ocean.fx.xu_ocean:3600.yu_ocean:2700.point'
You can use
anton-seaice commented on 2026-07-20T01:05:57Z I think there is a workaround for this already ? charles-turner-1 commented on 2026-07-20T02:49:58Z Yeah, there should be - in fact, I think it should already be in the newest environments.
I’ll double check when I’m off the plane. The code needs a more sophisticated fix anyway which is already on the todo list |
|
so that is correct for B-grid,
View entire conversation on ReviewNB |
|
I am not sure what to do for C-grid / MOM6
This recipe calculates the geostrophic velocities at the cell corner (b-grid) point and compares to model speed at the cell corner.
So for C-grid, to calculate speed, should we also interpolate to the model velocities to the corner point to calculate speed? |
|
I think there is a workaround for this already ? View entire conversation on ReviewNB |
|
I wanted that yes! But intake only opened one of them. So I had to open 1by1 and merge.
View entire conversation on ReviewNB |
|
So no change needed? View entire conversation on ReviewNB |
|
True! I can replace with And regarding the right combination, since discovering that I can use .derivative() you don't need to think about combining interp and diff, so I might change the script to use that.
(see comment below) View entire conversation on ReviewNB |
|
Yeah, there should be - in fact, I think it should already be in the newest environments.
I’ll double check when I’m off the plane. The code needs a more sophisticated fix anyway which is already on the todo list View entire conversation on ReviewNB |
|
I think using
View entire conversation on ReviewNB |
This one was comparing geostrophic surface velocities from sea level to those of the first cell instead of
usurfvsurf, but otherwise OK. I've also updated intake loading.