/[MITgcm]/MITgcm/verification/advect_cs/input/gendata.m
ViewVC logotype

Contents of /MITgcm/verification/advect_cs/input/gendata.m

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


Revision 1.3 - (show annotations) (download)
Tue Mar 30 13:59:46 2010 UTC (10 years, 8 months ago) by dfer
Branch: MAIN
CVS Tags: checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62w, checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62z, checkpoint62y, checkpoint62x, checkpoint64, checkpoint65, checkpoint63, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint65o, checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, HEAD
Changes since 1.2: +12 -4 lines
Fix matlab script.

1 for tl=1:6,
2 %lon(:,tl,:)=rdda(sprintf('LONC.%3.3i.bin',tl),[32 32],1,'real*8','b')*pi/180;
3 %lat(:,tl,:)=rdda(sprintf('LATC.%3.3i.bin',tl),[32 32],1,'real*8','b')*pi/180;
4 xx=rdda(sprintf('grid_cs32.face%3.3i.bin',tl),[33 33],1,'real*8','b');
5 lon(:,tl,:)=xx(1:32,1:32)*pi/180;
6 xx=rdda(sprintf('grid_cs32.face%3.3i.bin',tl),[33 33],2,'real*8','b');
7 lat(:,tl,:)=xx(1:32,1:32)*pi/180;
8 end
9 X=cos(lat).*sin(lon);Y=-cos(lat).*cos(lon);Z=sin(lat);clear lat lon
10
11 %lon0=-90 *pi/180;
12 lon0=+90 *pi/180;
13 lat0= 0 *pi/180;
14 xo=cos(lat0).*sin(lon0);yo=-cos(lat0).*cos(lon0);zo=sin(lat0);
15 ro=0.3;
16 R=sqrt( (X-xo).^2 + (Y-yo).^2 + (Z-zo).^2 );
17 t=1+(1+cos( pi*min(R/ro,1+0*R) ))/2;
18 fid=fopen('T.init','w','b');
19 fwrite(fid,t(:),'real*8');
20 fclose(fid)
21
22 %lon0= 0 *pi/180;
23 lon0=180 *pi/180;
24 lat0=35 *pi/180;
25 xo=cos(lat0).*sin(lon0);yo=-cos(lat0).*cos(lon0);zo=sin(lat0);
26 ro=0.3;
27 R=sqrt( (X-xo).^2 + (Y-yo).^2 + (Z-zo).^2 );
28 s=1+(1+cos( pi*min(R/ro,1+0*R) ))/2;
29 fid=fopen('S.init','w','b');
30 fwrite(fid,s(:),'real*8');
31 fclose(fid)
32
33 lon0=0 *pi/180;
34 lat0=0 *pi/180;
35 xo=cos(lat0).*sin(lon0);yo=-cos(lat0).*cos(lon0);zo=sin(lat0);
36 ro=0.3;
37 R=sqrt( (X-xo).^2 + (Y-yo).^2 + (Z-zo).^2 );
38 h=1e4*(1+cos( pi*min(R/ro,1+0*R) ))/2; %cosine bell
39 %h=1e4*(1-( min(R/ro,1+0*R) ))/2; %cone
40 %fid=fopen('mountain_eq.init','w','b');
41 %fwrite(fid,h(:),'real*8');
42 %fclose(fid)
43
44 lon0=0 *pi/180;
45 lat0=30 *pi/180;
46 xo=cos(lat0).*sin(lon0);yo=-cos(lat0).*cos(lon0);zo=sin(lat0);
47 ro=0.3;
48 R=sqrt( (X-xo).^2 + (Y-yo).^2 + (Z-zo).^2 );
49 h=1e4*(1+cos( pi*min(R/ro,1+0*R) ))/2; %cosine bell
50 %h=1e4*(1-( min(R/ro,1+0*R) ))/2; %cone
51 %fid=fopen('mountain_30.init','w','b');
52 %fwrite(fid,h(:),'real*8');
53 %fclose(fid)

  ViewVC Help
Powered by ViewVC 1.1.22