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

Annotation of /MITgcm/verification/tutorial_deep_convection/input/gendata.m

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


Revision 1.1 - (hide annotations) (download)
Thu Apr 20 23:25:06 2006 UTC (18 years, 7 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint58l_post, checkpoint58e_post, checkpoint58u_post, checkpoint58w_post, checkpoint58r_post, checkpoint58n_post, checkpoint58x_post, checkpoint58t_post, checkpoint58h_post, checkpoint58q_post, checkpoint59p, checkpoint58j_post, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint59c, checkpoint59b, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59h, checkpoint59k, checkpoint59j, checkpoint59, checkpoint58f_post, checkpoint58d_post, checkpoint58i_post, checkpoint58g_post, checkpoint58o_post, checkpoint58y_post, checkpoint58k_post, checkpoint58v_post, checkpoint58s_post, checkpoint58p_post, checkpoint58m_post
copied from tutorial_examples/nonhydrostatic_deep_convection in release1_branch.

1 jmc 1.1 % This is a matlab script that generates the input data
2    
3     % Dimensions of grid
4     nx=64;
5     ny=64;
6     nz=20;
7     % Nominal depth of model (meters)
8     H=1000;
9     % Size of domain
10     Lx=3.2e3;
11     % Scale of disk (m)
12     L=10e3;
13     % Horizontal resolution (m)
14     dx=Lx/nx;
15     % Rotation
16     f=1e-4;
17     % Stratification
18     N=0. * f*L/H;
19     % Flux
20     Qo=800;
21    
22     % Gravity
23     g=9.81;
24     % E.O.S.
25     alpha=2.e-4;
26    
27     Tz=N^2/(g*alpha)
28    
29     dz=H/nz;
30     sprintf('delZ = %d * %7.6g,',nz,dz)
31    
32     x=(1:nx)*dx;x=x-mean(x);
33     y=(1:ny)*dx;y=y-mean(y);
34     z=-dz/2:-dz:-H;
35    
36     [Y,X]=meshgrid(y,x);
37    
38     % Temperature profile
39     [sprintf('Tref =') sprintf(' %8.6g,',Tz*z-mean(Tz*z))]
40    
41     % Surface heat flux
42     Q=Qo*(0.5+rand([nx,ny]));
43     r=sqrt(X.^2+Y.^2);
44     Q( find(r>L) )=0;
45     fid=fopen('Qsurface','w','b'); fwrite(fid,Q,'real*8'); fclose(fid);

  ViewVC Help
Powered by ViewVC 1.1.22