/[MITgcm]/MITgcm_contrib/verification_other/atm_gray/inp_ll/gendata.m
ViewVC logotype

Contents of /MITgcm_contrib/verification_other/atm_gray/inp_ll/gendata.m

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


Revision 1.1 - (show annotations) (download)
Tue Sep 11 03:56:25 2012 UTC (11 years, 7 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64k, checkpoint64x, checkpoint64z, checkpoint64o, checkpoint64p, checkpoint64r, checkpoint64w, checkpoint64v, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint64m, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65u, checkpoint65j, checkpoint67a, checkpoint67b, checkpoint65i, checkpoint67d, checkpoint65m, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65e, checkpoint64i, checkpoint64h, checkpoint65h, checkpoint65, checkpoint64j, checkpoint65n, HEAD
first check-in of 2 examples experiment using gray atmospheric physics

1
2 fname='northEquatMask.bin';
3 nx=128; ny=64;
4
5 msk=zeros(nx,ny);
6 msk(:,33:36)=1.;
7 msk(41:nx,33:36)=2.;
8
9 %figure(1);clf;
10 %imagesc(msk'); set(gca,'YDir','normal');
11 %colorbar
12
13 %fid=fopen(fname,'w','b'); fwrite(fid,msk,'real*8'); fclose(fid);
14 %fprintf(['write file',fname,'\n']);
15
16 %-- cos shape SST:
17 yy=[1:ny]; yy=yy-mean(yy);
18 yy=yy*pi*2/ny;
19 sst=ones(nx,1)*cos(yy);
20 sst=273.15+9+19*sst;
21
22 var=rand([nx,ny]); var=var-mean(var(:));
23 var=var.*(1+ones(nx,1)*cos(yy));
24 figure(1);clf;
25 imagesc(var'); set(gca,'YDir','normal');
26 colorbar
27
28 noise=0.;
29 %noise=1.e-3;
30 sst=sst+noise*var;
31
32 %rDir='res_n26/';
33 %namf='SST.check';
34 %sst=rdmds([rDir,namf]);
35
36 figure(3);clf;
37 var=sst;
38 zav=mean(var); var=var-ones(nx,1)*zav;
39 subplot(211);
40 imagesc(var'); set(gca,'YDir','normal');
41 colorbar
42 subplot(212);
43 plot([1:ny],zav'-273.15);
44
45 %fname='SST_sym.bin';
46 fname='SST_cos0.bin';
47 %fname='SST_cos1.bin'; % with: noise=1.e-3;
48 fid=fopen(fname,'w','b'); fwrite(fid,sst,'real*8'); fclose(fid);
49 fprintf(['write file',fname,'\n']);

  ViewVC Help
Powered by ViewVC 1.1.22