1 
Some tools (matlab scripts for now) specific to the CubedSphere grid : 
2 

3 
split_C_cub.m :: split a 2d,3d global CSfield into 6 faces ; 
4 
apply to cellcentered CSfield ; extend the face array by 
5 
adding 1 row & 1 column (like the exchanges) 
6 
split_Z_cub.m :: split a 2d,3d global CSfield into 6 faces ; 
7 
apply to cellcorner CSfield ; extend the face array by 
8 
adding 1 row & 1 column (like the exchanges) 
9 
split_UV_cub.m :: split the 2 Cgrid components of a vector 
10 
(2d,3d global CSfield) into 6 faces ; extend the face array 
11 
by adding 1 row or 1 column (like the exchanges) 
12 

13 
cubeZ2latlon.m :: interpolate a CSfield to regular Latlon grid ; 
14 
similar to cube2latlon.m but apply to a field that is 
15 
located at the corner point of the Cgrid cell. 
16 
(deal with the 2 "missing corners") 
17 

18 
the following scripts are reading a file that contains the orientation 
19 
of the local direction of the CSgrid relative to EW,NS direction. 
20 
file= proj_cs[]_2uEvN.bin :: cos & sin of rotation angle, 
21 
format:: real*8, bigendian, size=32x6x32 x2(cos+sin) 
22 
for standard cs32 grid, the corresponding file is: 
23 
verification/global_ocean.cs32x15/input/proj_cs32_2uEvN.bin 
24 

25 
rotate_csAg_EN.m :: Rotate cell centered (Agrid) U,V vector components 
26 
of CSgrid to East,North directions. works for 2D or 3D vector. 
27 

28 
rotate_csCg_EN.m :: Rotate MITgcm Cgrid U,V vector components of CSgrid 
29 
to East,North directions. done in 2 steps: 1rst compute the average 
30 
at the cellcenter and then rotate the vector. 
31 

32 
uvLatLon2cube.m :: interpolate a 2 components vector field U,V (on Agrid) 
33 
to the MITgcm CSgrid (Cgrid). 
34 

35 
More in dir bk_line: 
36 
Scripts that generate "brokenlines" (used to compute Meridional Transport 
37 
streamfunction and vertically integrated horizontal streamfunction) 
38 
+ a README file + an example for each one. 