/[MITgcm]/MITgcm_contrib/high_res_cube/matlab-grid-generator/gen576grid.m
ViewVC logotype

Contents of /MITgcm_contrib/high_res_cube/matlab-grid-generator/gen576grid.m

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1.1.1 - (show annotations) (download) (vendor branch)
Tue Nov 11 18:08:08 2003 UTC (21 years, 3 months ago) by cnh
Branch: MAIN, initial
CVS Tags: baseline, HEAD
Changes since 1.1: +0 -0 lines
Checking in work done with Dimitri on high-resolution cube gridding and parallel 
communications. 
   o code is in a contrib experiment for now so we can continue collaborating
     on it. However most code is general and will be moved into main branch once 
     it is fully hardened.
   o There are README files in the contrib root and in the subdirectories that
     explain the contents

1 path('/home/dimitri/matlab/adcroft/bin',path);
2
3 for typ={'conf','q=0','q=1','q=1/2','q=7/8','q=i3','tan','tan2','new'}
4
5 [dxg,dyg,dxf,dyf,dxc,dyc,dxv,dyu,Ec,Eu,Ev,Ez,latC,lonC,latG,lonG,...
6 Q11,Q22,Q12, TUu,TUv,TVu,TVv ]=gengrid_fn(576,2,typ{1},'c',0,1);
7 theta=zeros(288,288);
8 for i=1:288
9 for j=1:288
10 lat=[latG(i,j) latG(i+1,j)]*180/pi;
11 lon=[lonG(i,j) lonG(i+1,j)]*180/pi;
12 a=dist(lat,lon,'sphere');
13 lat=[latG(i,j) latG(i,j+1)]*180/pi;
14 lon=[lonG(i,j) lonG(i,j+1)]*180/pi;
15 b=dist(lat,lon,'sphere');
16 lat=[latG(i+1,j) latG(i,j+1)]*180/pi;
17 lon=[lonG(i+1,j) lonG(i,j+1)]*180/pi;
18 c=dist(lat,lon,'sphere');
19 theta(i,j)=acos((a^2+b^2-c^2)/2/a/b);
20 end
21 end
22 disp(typ{1})
23 disp(minmax(dxg*6371))
24 disp(minmax(dxg(1:288,1:288)./dyg(1:288,1:288)))
25 tmp=theta*180/pi; tmp(1,1)=nan;
26 disp(minmax(tmp))
27 mypcolor(theta*180/pi),colorbar
28 title(typ{1})
29 tmp=typ{1}; tmp(strfind(tmp,'/'))='_';
30 eval(['print -dpsc FIG' tmp])
31 end

  ViewVC Help
Powered by ViewVC 1.1.22