MITgcm / xmitgcm

Read MITgcm mds binary files into xarray
http://xmitgcm.readthedocs.io
MIT License
56 stars 65 forks source link

LLC4320 grid indexing #259

Open SLYpma opened 3 years ago

SLYpma commented 3 years ago

Hi all,

I was wondering, if I select a region to download the LLC4320 model data, like so:

i_galapagos = ds.XC.isel(face=11, j=slice(1000,2500,1), i=slice(0,1500,1))
ig_galapagos = ds.XG.isel(face=11, j_g=slice(1000,2500,1), i_g=slice(0,1500,1))
j_galapagos = ds.YC.isel(face=11, j=slice(1000,2500,1), i=slice(0,1500,1))
jg_galapagos = ds.YG.isel(face=11, j_g=slice(1000,2500,1), i_g=slice(0,1500,1))

am I correct that, after rotating everything in the 'right' direction, the corner-point of the cell is defined in the southeast? So the U-velocity is located to the north of the XG,YG point and the V velocity to the west? Is that because the tile is rotated 90 degrees?

I am asking because in the NEMO model data the corner-point is in the northeast, and in other MITgcm model output that I've used the corner-point is in the southwest. This is relevant for the Lagrangian simulations we run using these model data.

Thank you!

rabernat commented 3 years ago

the corner-point of the cell is defined in the southeast? So the U-velocity is located to the north of the XG,YG point and the V velocity to the west?

Correct.

However, to ensure your data are being handled properly, it would be good to know two things:

SLYpma commented 3 years ago

Thanks for your quick reply. We are using the ECCO data portal. I did not add the type='latlon' flag, but rotated the fields by hand afterwards. Everything looks fine, we just noticed with our Lagrangian tracking (which is only using the corner-points), that the index pointed to the wrong V-values, but that is easy to fix.