/[MITgcm]/MITgcm/tutorial_examples/baroclinic_gyre_on_a_sphere/input/gendata.m
ViewVC logotype

Contents of /MITgcm/tutorial_examples/baroclinic_gyre_on_a_sphere/input/gendata.m

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


Revision 1.1.4.1 - (show annotations) (download)
Tue Feb 26 16:12:01 2002 UTC (19 years, 9 months ago) by adcroft
Branch: release1
CVS Tags: release1_p12, release1_p13, release1_p10, release1_p11, release1_p16, release1_p17, release1_p14, release1_p15, release1_p8, release1_p9, release1_p1, release1_p2, release1_p3, release1_p4, release1_p5, release1_p6, release1_p7, release1_p13_pre, release1_chkpt44d_post, release1_p12_pre
Branch point for: release1_50yr
Changes since 1.1: +21 -0 lines
Added tutorials, following sequenct of changes made by CNH on the
branch "release1-branch". The follow directories with tutorial
code/data were created:

  tutorial_examples/held_suarez_atmosphere/
  tutorial_examples/baroclinic_gyre_on_a_sphere/
  tutorial_examples/nonhydrostatic_deep_convection/
  tutorial_examples/barotropic_gyre_in_a_box/
  tutorial_examples/nonhydrostatic_plume_on_slope/
  tutorial_examples/global_ocean_circulation/
  tutorial_examples/tracer_adjoint_sensitivity/

No other changes were made (i.e. all other directories and code are
untouched).

1 ieee='b';
2 accuracy='real*8';
3
4 Ho=2000;
5 nx=60;
6 ny=60;
7
8 % Flat bottom at z=-Ho
9 h=-Ho*ones(nx,ny);
10 % Walls
11 h(end,:)=0;
12 h(:,end)=0;
13 fid=fopen('topog.box','w',ieee); fwrite(fid,h,accuracy); fclose(fid);
14
15 % Wind-stress
16 tauMax=0.1;
17 x=((1:nx)-0.5)/(nx-1); % nx-1 accounts for a solid wall
18 y=((1:ny)-0.5)/(ny-1); % ny-1 accounts for a solid wall
19 [X,Y]=ndgrid(x,y);
20 tau=tauMax*sin(pi*Y);
21 fid=fopen('windx.sin_y','w',ieee); fwrite(fid,tau,accuracy); fclose(fid);

  ViewVC Help
Powered by ViewVC 1.1.22