| 1 | afe | 1.3 | nx=120;ny=31;nz=29;n=nx*ny*nz;nens=30; | 
| 2 |  |  | %iter=68; | 
| 3 | afe | 1.2 | z=15; | 
| 4 | afe | 1.5 | disp=0; | 
| 5 | afe | 1.4 | disprms=0; | 
| 6 | afe | 1.1 |  | 
| 7 |  |  |  | 
| 8 | afe | 1.5 | %filename=sprintf('%s','../da/00/assimilate/pickup.in') | 
| 9 | afe | 1.2 | filename=sprintf('%s%03i%s','../da/00/assimilate/pickup.',iter,'.out') | 
| 10 | afe | 1.1 | fid=fopen(filename,'r','ieee-be'); | 
| 11 |  |  | foo=fread(fid,13*n+ny*nx,'float64'); | 
| 12 |  |  | %s=0; mn(k+1)=mean(foo(s*n+1:s*n+n)); | 
| 13 |  |  | i=0;truu=reshape(foo(i*n+1:(i+1)*n),[nx ny nz]); | 
| 14 |  |  | i=3;truv=reshape(foo(i*n+1:(i+1)*n),[nx ny nz]); | 
| 15 |  |  | i=6;truw=reshape(foo(i*n+1:(i+1)*n),[nx ny nz]); | 
| 16 |  |  |  | 
| 17 |  |  |  | 
| 18 |  |  |  | 
| 19 |  |  | for k=1:nens | 
| 20 |  |  | %k=0; | 
| 21 | afe | 1.2 | filename=sprintf('%s%02i%s%03i%s','../da/',k,'/assimilate/pickup.',iter,'.out') | 
| 22 | afe | 1.5 | %filename=sprintf('%s%02i%s','../da/',k,'/assimilate/pickup.in') | 
| 23 | afe | 1.1 | fid=fopen(filename,'r','ieee-be'); | 
| 24 |  |  | foo=fread(fid,13*n+ny*nx,'float64'); | 
| 25 | afe | 1.4 | fclose(fid); | 
| 26 | afe | 1.5 | %filename=sprintf('%s%02i%s%03i%s','../da/',k,'/assimilate/pickup_nh.',iter,'.out') | 
| 27 | afe | 1.1 | %s=0; mn(k+1)=mean(foo(s*n+1:s*n+n)); | 
| 28 | afe | 1.5 | %fid=fopen(filename,'r','ieee-be'); | 
| 29 |  |  | %foonh=fread(fid,2*n,'float64'); | 
| 30 |  |  | %fclose(fid); | 
| 31 | afe | 1.1 | i=0;memu(:,k)=foo(i*n+1:(i+1)*n); | 
| 32 |  |  | i=3;memv(:,k)=foo(i*n+1:(i+1)*n); | 
| 33 |  |  | i=6;memw(:,k)=foo(i*n+1:(i+1)*n); | 
| 34 | afe | 1.4 | i=0;memp(:,k)=foonh(i*n+1:(i+1)*n); | 
| 35 | afe | 1.1 | end | 
| 36 | afe | 1.2 |  | 
| 37 | afe | 1.1 | ensu(:,:,:)=reshape(mean(memu,2),[nx ny nz]); | 
| 38 |  |  | ensv(:,:,:)=reshape(mean(memv,2),[nx ny nz]); | 
| 39 |  |  | ensw(:,:,:)=reshape(mean(memw,2),[nx ny nz]); | 
| 40 | afe | 1.4 | ensp(:,:,:)=reshape(mean(memp,2),[nx ny nz]); | 
| 41 | afe | 1.2 |  | 
| 42 |  |  |  | 
| 43 | afe | 1.3 | 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 | afe | 1.4 | rmsp=reshape(std(memp,0,2),[nx ny nz]); | 
| 47 | afe | 1.3 |  | 
| 48 | afe | 1.4 | if(disprms) | 
| 49 | afe | 1.5 | iterstr=sprintf('%i',iter); | 
| 50 |  |  | figure(1);imagesc(rmsu(:,:,z));colorbar; | 
| 51 |  |  | title(strcat('U ensemble rms, iter ',iterstr)); | 
| 52 |  |  | figure(2);imagesc(rmsv(:,:,z));colorbar; | 
| 53 |  |  | title(strcat('V ensemble rms, iter ',iterstr)); | 
| 54 |  |  | figure(3);imagesc(rmsw(:,:,z));colorbar; | 
| 55 |  |  | title(strcat('W ensemble rms, iter ',iterstr)); | 
| 56 |  |  | figure(4);imagesc(rmsp(:,:,z));colorbar; | 
| 57 |  |  | title(strcat('Phi ensemble rms, iter ',iterstr)); | 
| 58 |  |  | end | 
| 59 |  |  |  | 
| 60 |  |  | if (jgp) | 
| 61 |  |  | for i=1:3 | 
| 62 |  |  | set(i,'PaperPositionMode', 'manual'); | 
| 63 |  |  | set(i,'PaperPosition',[0.25 0.25 8 10.5]); | 
| 64 |  |  | t=get(get(get(i,'CurrentAxes'),'Title'),'String'); | 
| 65 |  |  | outfilename=sprintf('%s%s%i','rms',t(1),iter); | 
| 66 |  |  | print('-djpeg', outfilename); | 
| 67 |  |  | end | 
| 68 | afe | 1.4 | end | 
| 69 | afe | 1.3 |  | 
| 70 |  |  | if (disp) | 
| 71 |  |  | subplot(3,2,1);imagesc(truu(:,:,z));colorbar; | 
| 72 |  |  | subplot(3,2,3);imagesc(truv(:,:,z));colorbar; | 
| 73 |  |  | subplot(3,2,5);imagesc(truw(:,:,z));colorbar; | 
| 74 |  |  |  | 
| 75 |  |  | subplot(3,2,2);imagesc(ensu(:,:,z));colorbar; | 
| 76 |  |  | subplot(3,2,4);imagesc(ensv(:,:,z));colorbar; | 
| 77 |  |  | subplot(3,2,6);imagesc(ensw(:,:,z));colorbar; | 
| 78 | afe | 1.5 | title(sprintf('%s%i','truth and ensemble mean after assim ',iter)); | 
| 79 | afe | 1.3 | end |