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