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