[MITgcm-support] Local rotation of co-ordinates

Martin Losch Martin.Losch at awi.de
Wed Jan 15 07:06:30 EST 2014


Hi Jonathan,

for grids that are not aligned with geographic longitude and latitude (i.e. orthogonal curvilinear grid including the cubed sphere, or a rotated lat-lon-grid), the model output includes fields of sin and cos of the angle that the model grid north forms locally with geographical north. These are called AngleCS, AngleSN (cos(phi) and sin(phi), where phi is the angle) and should be found in grid.*.nc or as mds files. Then is straightforward to do the rotation: AngleCS*uc - AngleSN*vc, and AngleSN*uc + AngleCN*vc. uc,vc, are the velocity components averaged to the center of grid cell (C-points).

If you don’t have these angles in the output, then you can easily generate them yourselves (given you have the coordinates of the grid points), there’s an example (specifically for the cubed sphere) in utils/matlab/cs_grid/cubeCalcAngle.m

Martin
On Jan 14, 2014, at 7:41 PM, Jonathan Whitefield <jwhitefield at alaska.edu> wrote:

> Hi everyone.
> 
> Probably a very simple question, but here goes anyway.
> 
> I'm trying to plot a Matlab m_quiver plot of surface velocity.
> However, the u and v components of velocity from the model do not
> correspond to the east and north direction. I don't want to just
> rotate the co-ordinate frame, as the angle of rotation changes
> (obviously!) along a line of latitude. Is there anywhere that outputs
> the angle of rotation for each model grid cell?
> 
> Thanks!
> 
> -- 
> Jonathan Whitefield, M.Sc.
> Ph.D. Student, Physical Oceanography
> 
> 110 O'Neill Building,
> P.O. Box 757220
> University of Alaska Fairbanks
> Fairbanks, AK 99775-7220
> 
> Phone: (907) 474-5184
> Fax: (907) 474-5863
> 
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-support




More information about the MITgcm-support mailing list