1 |
nx=120;ny=31;nz=29;n=nx*ny*nz;nens=30; |
2 |
%iter=68; |
3 |
z=15; |
4 |
disp=0; |
5 |
|
6 |
|
7 |
%filename=sprintf('%s','../00/assimilate/pickup.in') |
8 |
filename=sprintf('%s%03i%s','../da/00/assimilate/pickup.',iter,'.out') |
9 |
fid=fopen(filename,'r','ieee-be'); |
10 |
foo=fread(fid,13*n+ny*nx,'float64'); |
11 |
%s=0; mn(k+1)=mean(foo(s*n+1:s*n+n)); |
12 |
i=0;truu=reshape(foo(i*n+1:(i+1)*n),[nx ny nz]); |
13 |
i=3;truv=reshape(foo(i*n+1:(i+1)*n),[nx ny nz]); |
14 |
i=6;truw=reshape(foo(i*n+1:(i+1)*n),[nx ny nz]); |
15 |
|
16 |
|
17 |
|
18 |
for k=1:nens |
19 |
%k=0; |
20 |
filename=sprintf('%s%02i%s%03i%s','../da/',k,'/assimilate/pickup.',iter,'.out') |
21 |
%filename=sprintf('%s%02i%s','../',k,'/assimilate/pickup.in') |
22 |
fid=fopen(filename,'r','ieee-be'); |
23 |
foo=fread(fid,13*n+ny*nx,'float64'); |
24 |
%s=0; mn(k+1)=mean(foo(s*n+1:s*n+n)); |
25 |
i=0;memu(:,k)=foo(i*n+1:(i+1)*n); |
26 |
i=3;memv(:,k)=foo(i*n+1:(i+1)*n); |
27 |
i=6;memw(:,k)=foo(i*n+1:(i+1)*n); |
28 |
fclose(fid); |
29 |
end |
30 |
|
31 |
ensu(:,:,:)=reshape(mean(memu,2),[nx ny nz]); |
32 |
ensv(:,:,:)=reshape(mean(memv,2),[nx ny nz]); |
33 |
ensw(:,:,:)=reshape(mean(memw,2),[nx ny nz]); |
34 |
|
35 |
|
36 |
rmsu=reshape(std(memu,0,2),[nx ny nz]); |
37 |
rmsv=reshape(std(memv,0,2),[nx ny nz]); |
38 |
rmsw=reshape(std(memw,0,2),[nx ny nz]); |
39 |
|
40 |
%figure(1);imagesc(rmsu(:,:,z));colorbar |
41 |
%figure(2);imagesc(rmsv(:,:,z));colorbar |
42 |
%figure(3);imagesc(rmsw(:,:,z));colorbar |
43 |
|
44 |
|
45 |
if (disp) |
46 |
subplot(3,2,1);imagesc(truu(:,:,z));colorbar; |
47 |
subplot(3,2,3);imagesc(truv(:,:,z));colorbar; |
48 |
subplot(3,2,5);imagesc(truw(:,:,z));colorbar; |
49 |
|
50 |
subplot(3,2,2);imagesc(ensu(:,:,z));colorbar; |
51 |
subplot(3,2,4);imagesc(ensv(:,:,z));colorbar; |
52 |
subplot(3,2,6);imagesc(ensw(:,:,z));colorbar; |
53 |
title(sprintf('%s%i','truth and ensemble mean after assim',iter)); |
54 |
end |