Rotating velocities in output?

I am running on the eORCA1 and eORCA025 grids, so in some places the grid is rotated. I am wondering whether the output velocities (uo, vo) are properly zonal and meridional, or are rotated to the local coordinate space (so not exactly east-west and north-south). If the latter is true, is there a quick way to rotate them to be proper zonal and meridional velocities? For example, when I worked with ROMS there was a grid variable containing the angle between the x-axis and east for every cell; is there something similar for NEMO?

Many thanks,
Kaitlin

1 Like

Hei Kaitlin,

Why do you need to rotate velocities back to the geographical grid ?

/robinson

Hi Kaitlin, If you really need to do this, Laurent’s SOSIE package contains a corr_vect.x utility that will convert both ways. It computes the angles from the glam? and gphi? coordinate fields in a meshmask file. See:

and

for a modern usage example.

1 Like

Thanks for the link, I will go through the code!

I’m calculating zonal transport, barotropic streamfunctions, etc - although perhaps the streamfunction reduces to the same answer as if you use local coordinates.

In case of interest, I’ve written a python function to do this online (so no extra storage space required for new NetCDF velocities). It essentially follows src/OCE/SBC/geo2ocean.F90. I’ve tested it but not super extensively, so use with a bit of caution and let me know if you find any issues. The function starts here and is self-contained so you can just copy and paste into your own code (with attribution please): nemo_python/utils.py at 22e1d3e4ca7d4ad2cc066e4aa1cadf889c9b13d3 · knaughten/nemo_python · GitHub

1 Like

Hei Kaitlin,

I’m just wondering whether the fluxes are conserved, after the rotation to geographical coordinates.

/robinson

Hmm, I am not sure. It’s possible they are not conserved simply because you have to interpolate the u and v coordinates to a common grid (in practice the t-grid) in order for rotation to make sense. So far I am only using this code for vector plotting purposes.

1 Like