Warning, /verification/matrix_example/input/gendata.m is written in an unsupported language. File is not indexed.
view on githubraw file Latest commit ebcc3eac on 2005-04-18 22:10:55 UTC
ebcc3eac0e Sama*0001 Ho=5000;
0002 nx=31;
0003 ny=31;
0004
0005 % Flat bottom at z=-Ho
0006 h=-Ho*ones(nx,ny);
0007 % Walls
0008 h(end,:)=0;
0009 h(:,end)=0;
0010 for j=1:5
0011 h(end-6+j,end-j:end)=0;
0012 end
0013 fid=fopen('topog.box','w','ieee-be'); fwrite(fid,h,'real*4'); fclose(fid);
0014
0015 % Wind-stress
0016 tauMax=0.5;
0017 x=((1:nx)-0.5)/(nx-1); % nx-1 accounts for a solid wall
0018 y=((1:ny)-0.5)/(ny-1); % ny-1 accounts for a solid wall
0019 [X,Y]=ndgrid(x,y);
0020 %tau=tauMax*sin(pi*Y);
0021 tau=-tauMax*cos(pi*Y);
0022 fid=fopen('windx.cos_y','w','ieee-be'); fwrite(fid,tau,'real*4'); fclose(fid);