/[MITgcm]/MITgcm/verification/bottom_ctrl_5x5/input_ad/gendata.m
ViewVC logotype

Contents of /MITgcm/verification/bottom_ctrl_5x5/input_ad/gendata.m

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


Revision 1.1 - (show annotations) (download)
Wed Jun 7 02:00:01 2006 UTC (17 years, 9 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint58h_post
Adding verification for 5x5 box (4-layer) bottom topography control

1 ieee='b';
2 accuracy='real*8';
3
4 Ho=5000;
5 nx=5;
6 ny=5;
7
8 % Flat bottom at z=-Ho
9 h=-Ho*ones(nx,ny);
10 % walls, no topgraphy
11 h(:,1) = 0;
12 fid=fopen('walls.box','w',ieee); fwrite(fid,h,accuracy); fclose(fid);
13 % walls, small ridge
14 h(3,2:ny) = -4000;
15 fid=fopen('walls.smallRidge','w',ieee); fwrite(fid,h,accuracy); fclose(fid);
16 % walls, big ridge
17 h(3,2:ny) = -2000;
18 fid=fopen('walls.bigRidge','w',ieee); fwrite(fid,h,accuracy); fclose(fid);
19 % no walls, giant ridge
20 h(3,2:ny) = -500;
21 fid=fopen('walls.giantRidge','w',ieee); fwrite(fid,h,accuracy); fclose(fid);
22 % no walls, big ridge
23 h=-Ho*ones(nx,ny);
24 h(3,:) = -2000;
25 fid=fopen('noWalls.bigRidge','w',ieee); fwrite(fid,h,accuracy); fclose(fid);
26 % no walls, small ridge
27 h(3,:) = -4000;
28 fid=fopen('noWalls.smallRidge','w',ieee); fwrite(fid,h,accuracy); fclose(fid);
29 % no walls, giant ridge
30 h(3,:) = -500;
31 fid=fopen('noWalls.giantRidge','w',ieee); fwrite(fid,h,accuracy); fclose(fid);
32
33 % box, big ridge
34 h=-Ho*ones(nx,ny);
35 h(3,2:ny) = -2000;
36 h(:,[1 end]) = 0; h([1 end],:) = 0;
37 %h([1 end],:) = 0;
38 fid=fopen('box.bigRidge','w',ieee); fwrite(fid,h,accuracy); fclose(fid);
39
40 % channel, big ridge
41 h=-Ho*ones(nx,ny);
42 h(3,2:ny) = -2000;
43 h(:,[1 5]) = 0;
44 fid=fopen('channel.bigRidge','w',ieee); fwrite(fid,h,accuracy); fclose(fid);
45
46 h=-Ho*ones(nx,ny);
47 h(1:nx,:) = -2000;
48 h([1 5],:) = 0;
49 fid=fopen('meridchannel.bigRidge','w',ieee); fwrite(fid,h,accuracy); fclose(fid);
50
51 % shallow, no walls, big ridge
52 h=-500*ones(nx,ny);
53 h(3,:) = -200;
54 fid=fopen('shallow.noWalls.bigRidge','w',ieee); fwrite(fid,h,accuracy); fclose(fid);
55
56
57 % Wind-stress
58 tauMax=0.1;
59 x=((1:nx)-.5)/(nx);
60 y=((1:ny)-1)/(ny);
61 [X,Y]=ndgrid(x,y);
62 tau=tauMax*ones(nx,ny);
63 fid=fopen('windx.sin_y','w',ieee); fwrite(fid,tau,accuracy); fclose(fid);

  ViewVC Help
Powered by ViewVC 1.1.22