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