[MITgcm-support] CS Grid Generator and Convertor Matlab Scripts

Christopher Watkins c.watkins at qmul.ac.uk
Mon Feb 13 11:29:17 EST 2012


Hi,

I'm trying to generate cubed sphere grids of different sizes for different planetary radii. 

I have downloaded the generator and convertor scripts from http://mitgcm.org/viewvc/MITgcm/MITgcm_contrib/high_res_cube/

I use gengrids.m changing line 9 to for nx=1+[16 32 64] to generate CS grids with faces of 16x16, 32x32 and 64x64 squares.

I edit line 167 in gengrid_fn.m so that Rsphere is equal to the radius of the planet.

This produces three directories: cs-conf-c-16-128, cs-conf-c-32-256 and cs-conf-c-64-512.

The directories consist of the following files:

CUBE_3DGRID.mat
CUBE_HGRID.mat
DXC.bin
DXF.bin
DXG.bin
DXV.bin
DYC.bin
DYF.bin
DYG.bin
DYU.bin
grid.info
LATC.001.bin
LATC.002.bin
LATC.003.bin
LATC.004.bin
LATC.005.bin
LATC.006.bin
LATG.001.bin
LATG.002.bin
LATG.003.bin
LATG.004.bin
LATG.005.bin
LATG.006.bin
LONC.001.bin
LONC.002.bin
LONC.003.bin
LONC.004.bin
LONC.005.bin
LONC.006.bin
LONG.001.bin
LONG.002.bin
LONG.003.bin
LONG.004.bin
LONG.005.bin
LONG.006.bin
RA.bin
RAS.bin
RAW.bin
RAZ.bin
TUV.mat

I then use convertMITgrid.m in each directory to create the .bin files required to run using a GS grid. I edit line 1 to be 17, 33 or 65 (ie the number used in gengrids.m line 9 plus 1) 

However, in this last step I get errors listed shown below. I've hunted through the support forum and Google but can't find what I'm doing wrong. Can anyone advise me? 

Many thanks, 

Chris





ans =

Error while opening file:
No such file or directory


ans =

Error while opening file:
No such file or directory


ans =

Not enough data was available to be read: off EOF?


ans =

Not enough data was available to be read: off EOF?


ans =

Not enough data was available to be read: off EOF?


ans =

Error while opening file:
No such file or directory


ans =

Error while opening file:
No such file or directory


ans =

Not enough data was available to be read: off EOF?


ans =

Not enough data was available to be read: off EOF?


ans =

Not enough data was available to be read: off EOF?

??? Attempted to access yg(1,1,3); index out of
bounds because size(yg)=[2,2,1].

Error in ==> convertMITgrid at 24
yg(1,end,[1 3 5])=yg(1,1,3);






More information about the MITgcm-support mailing list