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

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

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


Revision 1.4 - (show annotations) (download)
Thu Nov 12 16:08:42 2009 UTC (14 years, 5 months ago) by dfer
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint64, checkpoint65, checkpoint62, checkpoint63, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65o, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, checkpoint62c, checkpoint62b, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62w, checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62z, checkpoint62y, checkpoint62x, checkpoint61z, checkpoint61y, HEAD
Changes since 1.3: +2 -2 lines
Change vertical resolution to something more "progressive"

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=1;
9 ny=1;
10 nz=26;
11 % Vertical grid (meters)
12 dz =[10 10 10 10 10 11 12 14 16 18 21 24 27 31 35 40 40 40 40 40 40 40 40 40 40 40];
13 sprintf('delR = %d * %7.6g,',nz,dz)
14 zi = [0 cumsum(dz)];
15 z = 0.5*(zi(1:end-1)+zi(2:end));
16
17 % Initial temperature
18 gravity=9.81;
19 talpha=2.0e-4;
20 N2=2.e-5;
21 Tz=N2/(gravity*talpha);
22
23 Tref=-Tz*(z - zi(end))+2;
24 sprintf('Tref ='), sprintf(' %8.6g,',Tref)
25 fid=fopen('T_26.init','w',ieee); fwrite(fid,Tref,prec); fclose(fid);
26
27 % Flux
28 Q=zeros(72,1);
29 Q(1:18) = 350;
30 Q(25:66) = -350*3/7;
31 fid=fopen('Qnet_72.forcing','w',ieee); fwrite(fid,Q,prec); fclose(fid);
32
33 %
34 taux = 0.1*ones([nx,ny],72);
35 fid=fopen('taux_72.forcing','w',ieee); fwrite(fid,taux,prec); fclose(fid);
36
37 %%%%%
38 tke = 1e-6*ones(1,nz);
39 tke(1,1) = 1e-3;
40 fid=fopen('TKE.init','w',ieee); fwrite(fid,tke,prec); fclose(fid);
41
42 % double diffusive initial conditions:
43 % salt fingers in upper layers (dt>0,ds>0,Rrho=talpha*dt/sbeta*ds > 1)
44 % diffusive convection in lower layers (dt<0,ds<0,Rrho=talpha*dt/sbeta*ds < 1)
45 sbeta = 7.e-4;
46 tdd = max(Tref,8-Tref);
47 Rrho = 0*tdd+1.1;
48 Rrho(8:end) = 0.5;
49 Sz2=talpha*diff(tdd)/sbeta./Rrho(1:end-1);
50 sdd = cumsum([34,Sz2]);
51
52 fid=fopen('T.doublediff','w',ieee); fwrite(fid,tdd,prec); fclose(fid);
53
54 fid=fopen('S.doublediff','w',ieee); fwrite(fid,sdd,prec); fclose(fid);

  ViewVC Help
Powered by ViewVC 1.1.22