/[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.3 - (hide annotations) (download)
Tue Jun 15 13:56:05 2004 UTC (21 years, 1 month ago) by afe
Branch: MAIN
Changes since 1.2: +18 -5 lines
more! better! features!

1 afe 1.1
2 afe 1.3
3 afe 1.1 nx=120;
4     ny=31;
5     nz=29;
6     nf=2;
7 afe 1.3 h=zeros(nf*nz*ny*nx,1);
8     chance=1/3;
9    
10 afe 1.1 vectorsize=nx*ny*nz*nf;
11     dim=1;
12 afe 1.3 obs=0;
13     fid = fopen('hfile.txt','w');
14 afe 1.1
15     for i=1:nf
16     for j=1:nz
17 afe 1.2 for k=1:ny
18 afe 1.1 for l=1:nx
19 afe 1.3 if (any(j==[5 10 15 20 25]) & ... % 5 levels
20     k>8 )
21     % mod(l,3)==0 )
22     % any(i==[1 2]) & ... % u, v
23     % mod(k+1,2)==0)
24     % mod(l,3)==0)
25 afe 1.1 % if mod(dim,359)==0
26 afe 1.3 % if (mod(dim,3)==0)
27     h(dim)=dim;
28 afe 1.1 fprintf(fid,'%i\n',dim);
29 afe 1.3 obs=obs+1;
30 afe 1.1 end
31     dim=dim+1;
32     end
33     end
34     end
35     end
36 afe 1.3 fclose(fid);
37     obs
38     h3=reshape(h,[nx,ny,nz,nf]);
39 afe 1.1

  ViewVC Help
Powered by ViewVC 1.1.22