[MITgcm-support] Calculating curl on a cube-sphere (calc_vort_cs.m)

Jean-Michel Campin jmc at mit.edu
Tue May 19 19:24:42 EDT 2020


Hi Peter,

The matlab script "calc_vort_cs.m" 
 https://github.com/MITgcm/MITgcm/tree/master/utils/matlab/cs_grid/calc_vort_cs.m
compute the vorticity from the 2 velocity components which are assumed to be on the MITgcm 
C-grid. So it should work fine for the curl of the wind stress, providing the wind stress 
is also on C-grid. If not, it might not work as well.

The vorticity is located at the grid-cell corner (uVel is at western edge, vVel at
southern edge, tracer at grid-cell center) which means that on cubed-sphere, since there
are 2 more grid-cell corners than grid cell faces (to clarify this, you can just 
consider a simple cube, 1 grid-cell per face, but 8 corners), the output of calc_vort_cs.m
will not fit into a regular/usual size array. 

So in the output field, the first nc*6*nc values correspond to the usual lay-out of
CS-grid fields (same as other grid-cell center field) and the last 2 values correspond 
to the two "missing corners", both located at a face corner, one in NH and the other in SH.

If you discard the last 2 values, you can plot it the usual way, just that you will miss
these 2 corner value.
There might be other matlab script that can deal with this "special" size
 (e.g., utils/matlab/cs_grid/bk_line/grph_CSz.m ).

Cheers,
Jean-Michel

On Tue, May 19, 2020 at 02:16:39PM +0000, Shatwell, Peter A wrote:
> Hi all,
> 
> I am using a coupled configuration of the MITgcm with a cube-sphere grid (C24), and I am trying to calculate the curl of the surface wind-stress in order to understand Ekman layer dynamics in the model ocean.
> 
> I found the script calc_vort_cs.m in the MATLAB MITgcm utils and provide it with surface wind stress fields, however I???m unsure how to interpret the outputs, which come in ???compressed form??? (nc*6*nc+2, 1) or ???face-splitted form??? (nc+1, nc+1, 1, 6). I???d like to be able to get them into a familiar form of (6*nc, nc, 1), which I can then diagnose with other utils.
> 
> Is anyone familiar with converting between these forms for cube-sphere grid data?
> 
> Thanks and all the best,
> 
> Peter
> 
> --
> Peter Shatwell
> PhD student at MPECDT
> Space and Atmospheric Physics
> Imperial College London
> Huxley 714

> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support



More information about the MITgcm-support mailing list