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

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

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


Revision 1.1 - (hide annotations) (download)
Mon Oct 18 15:15:05 2004 UTC (19 years, 7 months ago) by mlosch
Branch: MAIN
CVS Tags: checkpoint58l_post, checkpoint57t_post, checkpoint57o_post, checkpoint58e_post, checkpoint57v_post, checkpoint58u_post, checkpoint58w_post, checkpoint57m_post, checkpoint57s_post, checkpoint57k_post, checkpoint57d_post, checkpoint57g_post, checkpoint60, checkpoint61, checkpoint57b_post, checkpoint57c_pre, checkpoint58r_post, checkpoint55j_post, checkpoint56b_post, checkpoint57i_post, checkpoint57y_post, checkpoint57e_post, checkpoint55h_post, checkpoint58n_post, checkpoint58x_post, checkpoint57g_pre, checkpoint58t_post, checkpoint58h_post, checkpoint56c_post, checkpoint57y_pre, checkpoint57f_pre, checkpoint57a_post, checkpoint58q_post, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint58j_post, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint59c, checkpoint59b, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59h, checkpoint59k, checkpoint59j, checkpoint57r_post, checkpoint59, checkpoint58, checkpoint57a_pre, checkpoint55i_post, checkpoint57, checkpoint56, eckpoint57e_pre, checkpoint57h_done, checkpoint58f_post, checkpoint57x_post, checkpoint58d_post, checkpoint58c_post, checkpoint57w_post, checkpoint57p_post, checkpint57u_post, checkpoint57f_post, checkpoint58a_post, checkpoint58i_post, checkpoint57q_post, checkpoint58g_post, checkpoint58o_post, checkpoint57z_post, checkpoint57c_post, checkpoint58y_post, checkpoint58k_post, checkpoint58v_post, checkpoint58s_post, checkpoint61f, checkpoint61g, checkpoint61d, checkpoint61e, checkpoint61b, checkpoint61c, checkpoint58p_post, checkpoint61a, checkpoint61n, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61q, checkpoint57j_post, checkpoint58b_post, checkpoint57h_pre, checkpoint58m_post, checkpoint57l_post, checkpoint57h_post, checkpoint56a_post
o add a verification experiment "vermix" that tests 5 different vertical
  mixing schemes in a highly idealized 2D configuration: kpp (default),
  pp81, my82, ggl90, and opps.
  - foring: wind stress and surface heat flux
  - initially stable stratification (linear EOS) with on instability at
    the surface (no salinity)

1 mlosch 1.1 % This is a matlab script that generates the input data
2     % variable x resolution
3    
4     prec='real*8';
5     ieee='b';
6    
7     % Dimensions of grid
8     %nx=80;
9     nx=3;
10     ny=1;
11     nz=20;
12     % Nominal depth of model (meters)
13     H=1000.0;
14     % Size of domain
15     Lx=15e3;
16    
17     dx = Lx/nx;
18     dz = H/nz;
19     % Horizontal resolution (m)
20     %Variable resolution
21    
22     dy = dx;
23    
24     % Flux
25     Qo=200;
26    
27     % Stratification
28     gravity=9.81;
29     talpha=2.0e-4;
30     N2=2.56e-4;
31     Tz=N2/(gravity*talpha);
32     Sz=0.05;
33    
34     sprintf('delR = %d * %7.6g,',nz,dz)
35    
36     z=-dz/2:-dz:-H;
37     Tref=Tz*z/(H/20)+2;
38     Sref=34.025-Sz*z/(H/20);
39     [sprintf('Tref =') sprintf(' %8.6g,',Tref)]
40     [sprintf('Sref =') sprintf(' %8.6g,',Sref)]
41    
42     Q=zeros([nx,ny]);
43     Q(1) = 0;
44     Q(2) = 200;
45     Q(3) = 0;
46     fid=fopen('Qnet.forcing','w',ieee); fwrite(fid,Q,prec); fclose(fid);
47    
48     s=zeros([nx,ny,nz]);
49     for k=1:nz
50     s(:,:,k) = s(:,:,k) + Sref(k);
51     end
52     fid=fopen('S.init','w',ieee); fwrite(fid,s,prec); fclose(fid);
53    
54     t0=1*ones([nx,ny,nz]);
55     t=t0;
56     fid=fopen('T.init','w',ieee); fwrite(fid,t,prec); fclose(fid);
57    
58     t=t0;
59     t(2,1,1) = .5;
60     fid=fopen('Tinstable.init','w',ieee); fwrite(fid,t,prec); fclose(fid);
61    
62     t=t0;
63     for k=1:nz
64     t(:,:,k) = t(:,:,k) + Tref(k);
65     end
66     fid=fopen('Tstable.init','w',ieee); fwrite(fid,t,prec); fclose(fid);
67    
68     t=t0;
69     t(2,1,1) = -.5;
70     for k=1:nz
71     t(:,:,k) = t(:,:,k) + Tref(k);
72     end
73     fid=fopen('Tstable2.init','w',ieee); fwrite(fid,t,prec); fclose(fid);
74    
75     taux = 0*ones([nx,ny]);
76     taux(2:3,:) = 1;
77     fid=fopen('taux.forcing','w',ieee); fwrite(fid,taux,prec); fclose(fid);
78    
79     tke = 1e-6*ones([nx,ny,nz]);
80     tke(2,1,1) = 1e-3;
81     fid=fopen('TKE.init','w',ieee); fwrite(fid,tke,prec); fclose(fid);
82    
83    

  ViewVC Help
Powered by ViewVC 1.1.22