[MITgcm-support] Generation of broken lines on CS-grid

Martin Losch Martin.Losch at awi.de
Mon Feb 11 10:11:19 EST 2013


Hi Quentin,

RAC is the grid cell area. In grid.*.nc it is called rA

in the mnc-files the coordinate arrays have an extra row and column of points, already part of the next tile, for convenience. You can simply remove it like this:

g=rdmnc('grid.t001.nc'); % for the first tile, etc.
xg=g.XG(1:end-1,1:end-1);
yg=g.YG(1:end-1,1:end-1);

Martin


On Feb 11, 2013, at 3:51 PM, quentin jamet <quentinjamett at gmail.com> wrote:

> Dear all,
> 
> I use the broken lines generator in order to compute the barotropic stream function on a cubed sphere. All my outputs are written in netcdf format. I first wonder if this format is supported by the script gener_bk_line.m? I managed to run it by switching load_cs.m to load_cs_mnc.m where I used rdmnc instead of rdmds. I am right to do so ? And by the way, what is 'RAC'  ? I didn't find it anywhere in my files !
> 
> My second question concerns the script gener_bk_line.m itself. I got an error at line 55 using the 'reshape' function when evaluating
> 
> yg2=zeros(nPp2,1); yg2([1:nPxy],1)=reshape(ycg,[nPxy 1]);
> 
> There, ycg has the size (145x25) and nPxy = 3456 (144x24). I then rewritte it as :
> 
> yg2=zeros(nPp2,1); yg2([1:nPxy],1)=reshape(ycg(1:end-1,1:end-1),[nPxy 1]);
> 
> and same for xg2. It works fine but I am not sure about the consistency of my trick. Can anyone confirme what I did or explain me the good things to do?
> 
> Regards
> 
> Quentin
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-support




More information about the MITgcm-support mailing list