/[MITgcm]/MITgcm_contrib/osse/utils/hmaker.m
ViewVC logotype

Annotation of /MITgcm_contrib/osse/utils/hmaker.m

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


Revision 1.4 - (hide annotations) (download)
Wed Jun 23 13:28:28 2004 UTC (21 years ago) by afe
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +9 -12 lines
modified to take in H on vertical boundaries

1 afe 1.1
2 afe 1.3
3 afe 1.1 nx=120;
4     ny=31;
5     nz=29;
6 afe 1.4 nf=4; % covers u, v, w, and theta
7 afe 1.3 h=zeros(nf*nz*ny*nx,1);
8    
9 afe 1.1 vectorsize=nx*ny*nz*nf;
10 afe 1.4 dim=1; % current dimension in loop
11     obs=0; % observation counter
12 afe 1.3 fid = fopen('hfile.txt','w');
13 afe 1.1
14     for i=1:nf
15     for j=1:nz
16 afe 1.2 for k=1:ny
17 afe 1.1 for l=1:nx
18 afe 1.4 if ((any(j==[5 10 15 20 25]) & ... % 5 levels...
19     any(i==[1 2]) & ... % of u and v...
20     k>8 & ... % that clear the center...
21     mod(l,3)==0 ) | ... % every third "spoke", plus...
22     (i==4 & ... % theta...
23     any(k==[9 30]))) % in the vert boundary layers
24 afe 1.3 h(dim)=dim;
25 afe 1.1 fprintf(fid,'%i\n',dim);
26 afe 1.3 obs=obs+1;
27 afe 1.1 end
28     dim=dim+1;
29     end
30     end
31     end
32     end
33 afe 1.3 fclose(fid);
34     obs
35     h3=reshape(h,[nx,ny,nz,nf]);
36 afe 1.1

  ViewVC Help
Powered by ViewVC 1.1.22