/[MITgcm]/MITgcm/verification/adjustment.cs-32x32x1/input/gendata.m
ViewVC logotype

Annotation of /MITgcm/verification/adjustment.cs-32x32x1/input/gendata.m

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


Revision 1.3 - (hide annotations) (download)
Sat Apr 18 20:21:17 2009 UTC (15 years, 1 month ago) by jmc
Branch: MAIN
CVS Tags: checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, checkpoint62c, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62w, checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62z, checkpoint62y, checkpoint62x, checkpoint64, checkpoint65, checkpoint62, checkpoint63, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint65o, checkpoint62b, 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, checkpoint61n, checkpoint61q, checkpoint61z, checkpoint61o, checkpoint61m, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61x, checkpoint61y, HEAD
Changes since 1.2: +63 -98 lines
changed to oceanic set-up with rectangular continent centered on face 2
 (will allow to test "blank-tiles")

1 jmc 1.3 % This is a matlab script that generates the input data
2    
3     % $Header: $
4     % $Name: $
5    
6     nx=32; ny=nx; nf=6;
7     kwr=1;
8    
9     %- flat bottom bathy with rectangular island on face 2
10     dp=ones(nx,nf,ny);
11     Htot=1366;
12     dp=-Htot*dp;
13    
14     fc=2;
15     i1=1; i2=nx; j1=ny/4 ; j2=1+3*ny/4;
16     dp(:,fc,j1:j2)=0;
17     dp(nx,1,j1:j2)=0;
18     dp(j1:j2,4,1)=0;
19    
20     if kwr > 0,
21     fid=fopen('bathy_f2.bin','w','b');
22     fwrite(fid,dp,'real*8');
23     fclose(fid);
24     end
25    
26     %----------
27    
28     h=zeros(nx,nf,ny);
29    
30     x=0.25*((0.5:nx)/nx-0.5);
31     [X,Y]=ndgrid(x,x);
32     R=sqrt(X.^2+Y.^2);
33    
34    
35     tileno=1;
36 adcroft 1.2
37     o=1;
38     i=round(nx*1/2);
39     j=round(ny*1/2);
40     h(i:i+o,tileno,j:j+o)=1;
41    
42 jmc 1.3 h(:,1,:)=0.5+0.5*cos( pi*min(R,0*R+0.04)/0.04 );
43    
44     %- 10 m max SSH anomaly:
45     h=h*10;
46    
47     if kwr > 0,
48     fid=fopen('ssh_eq.bin','w','b');
49     fwrite(fid,h,'real*8');
50     fclose(fid);
51     end
52    
53     return
54     %----------
55     % plot to check : ----------
56     rDir='/home/jmc/grid_cs32/';
57     G=load_grid(rDir,10);
58     nc=G.dims(2); %nr=G.dims(3); nPxy=G.dims(1)*G.dims(2); nPp2=nPxy+2;
59     ccB=[0 0]; shift=-1; cbV=0; AxBx=[-180 180 -90 90]; kEnv=0;
60    
61     figure(1);clf;
62     var=reshape(dp,[nx*nf ny]);
63     grph_CS(var,G.xC,G.yC,G.xG,G.yG,ccB(1),ccB(2),shift,cbV,AxBx,kEnv);
64    
65     figure(2);clf;
66     var=reshape(h,[nx*nf ny]);
67     grph_CS(var,G.xC,G.yC,G.xG,G.yG,ccB(1),ccB(2),shift,cbV,AxBx,kEnv);
68    
69     %----------

  ViewVC Help
Powered by ViewVC 1.1.22