Warning, /verification/bottom_ctrl_5x5/input_ad/gendata.m is written in an unsupported language. File is not indexed.
view on githubraw file Latest commit cce30f87 on 2006-06-08 15:00:14 UTC
cce30f8796 Patr*0001 ieee='b';
0002 accuracy='real*8';
0003
0004 Ho=5000;
0005 nx=5;
0006 ny=5;
0007
0008 % Flat bottom at z=-Ho
0009 h=-Ho*ones(nx,ny);
0010 % walls, no topgraphy
0011 h(:,1) = 0;
0012 fid=fopen('walls.box','w',ieee); fwrite(fid,h,accuracy); fclose(fid);
0013 % walls, small ridge
0014 h(3,2:ny) = -4000;
0015 fid=fopen('walls.smallRidge','w',ieee); fwrite(fid,h,accuracy); fclose(fid);
0016 % walls, big ridge
0017 h(3,2:ny) = -2000;
0018 fid=fopen('walls.bigRidge','w',ieee); fwrite(fid,h,accuracy); fclose(fid);
0019 % no walls, giant ridge
0020 h(3,2:ny) = -500;
0021 fid=fopen('walls.giantRidge','w',ieee); fwrite(fid,h,accuracy); fclose(fid);
0022 % no walls, big ridge
0023 h=-Ho*ones(nx,ny);
0024 h(3,:) = -2000;
0025 fid=fopen('noWalls.bigRidge','w',ieee); fwrite(fid,h,accuracy); fclose(fid);
0026 % no walls, small ridge
0027 h(3,:) = -4000;
0028 fid=fopen('noWalls.smallRidge','w',ieee); fwrite(fid,h,accuracy); fclose(fid);
0029 % no walls, giant ridge
0030 h(3,:) = -500;
0031 fid=fopen('noWalls.giantRidge','w',ieee); fwrite(fid,h,accuracy); fclose(fid);
0032
0033 % box, big ridge
0034 h=-Ho*ones(nx,ny);
0035 h(3,2:ny) = -2000;
0036 h(:,[1 end]) = 0; h([1 end],:) = 0;
0037 %h([1 end],:) = 0;
0038 fid=fopen('box.bigRidge','w',ieee); fwrite(fid,h,accuracy); fclose(fid);
0039
0040 % channel, big ridge
0041 h=-Ho*ones(nx,ny);
0042 h(3,2:ny) = -2000;
0043 h(:,[1 5]) = 0;
0044 fid=fopen('channel.bigRidge','w',ieee); fwrite(fid,h,accuracy); fclose(fid);
0045
0046 h=-Ho*ones(nx,ny);
0047 h(1:nx,:) = -2000;
0048 h([1 5],:) = 0;
0049 fid=fopen('meridchannel.bigRidge','w',ieee); fwrite(fid,h,accuracy); fclose(fid);
0050
0051 % shallow, no walls, big ridge
0052 h=-500*ones(nx,ny);
0053 h(3,:) = -200;
0054 fid=fopen('shallow.noWalls.bigRidge','w',ieee); fwrite(fid,h,accuracy); fclose(fid);
0055
0056
0057 % Wind-stress
0058 tauMax=0.1;
0059 x=((1:nx)-.5)/(nx);
0060 y=((1:ny)-1)/(ny);
0061 [X,Y]=ndgrid(x,y);
0062 tau=tauMax*ones(nx,ny);
0063 fid=fopen('windx.sin_y','w',ieee); fwrite(fid,tau,accuracy); fclose(fid);