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

Contents of /MITgcm_contrib/high_res_cube/matlab-grid-generator/gen360grid.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 for typ={'tan'}
6
7 [dxg,dyg,dxf,dyf,dxc,dyc,dxv,dyu,Ec,Eu,Ev,Ez,latC,lonC,latG,lonG,...
8 Q11,Q22,Q12, TUu,TUv,TVu,TVv ]=gengrid_fn(360,4,typ{1},'c',0,1);
9 theta=zeros(180,180);
10 for i=1:180
11 for j=1:180
12 lat=[latG(i,j) latG(i+1,j)]*180/pi;
13 lon=[lonG(i,j) lonG(i+1,j)]*180/pi;
14 a=dist(lat,lon,'sphere');
15 lat=[latG(i,j) latG(i,j+1)]*180/pi;
16 lon=[lonG(i,j) lonG(i,j+1)]*180/pi;
17 b=dist(lat,lon,'sphere');
18 lat=[latG(i+1,j) latG(i,j+1)]*180/pi;
19 lon=[lonG(i+1,j) lonG(i,j+1)]*180/pi;
20 c=dist(lat,lon,'sphere');
21 theta(i,j)=acos((a^2+b^2-c^2)/2/a/b);
22 end
23 end
24 disp(typ{1})
25 disp(minmax(dxg*6371))
26 disp(minmax(dxg(1:180,1:180)./dyg(1:180,1:180)))
27 tmp=theta*180/pi; tmp(1,1)=nan;
28 disp(minmax(tmp))
29 mypcolor(theta*180/pi),colorbar
30 title(typ{1})
31 tmp=typ{1}; tmp(strfind(tmp,'/'))='_';
32 eval(['print -dpsc FIG' tmp])
33
34 end

  ViewVC Help
Powered by ViewVC 1.1.22