Rev | Line | |
---|
[129] | 1 | function [ output_args ] = make_mean( ) |
---|
| 2 | %UNTITLED Summary of this function goes here |
---|
| 3 | % Detailed explanation goes here |
---|
| 4 | |
---|
| 5 | outfile='obs_float/ucorr.dat'; |
---|
| 6 | load obs_float/uv_total.dat; |
---|
| 7 | load obs_float/uzero.dat |
---|
| 8 | |
---|
| 9 | umean(:,1)=uzero(:,1); |
---|
| 10 | umean(:,2)=uzero(:,2); |
---|
| 11 | umean(:,3)=uzero(:,3); |
---|
| 12 | U1=zeros(5046,1); |
---|
| 13 | V1=zeros(5046,1); |
---|
| 14 | e=1; |
---|
| 15 | for r=1:1:54 |
---|
| 16 | |
---|
| 17 | Unew=zeros(1,5046); |
---|
| 18 | Vnew=zeros(1,5046); |
---|
| 19 | for count=1:5046 |
---|
| 20 | Unew(count)=uv_total(e,end-1); |
---|
| 21 | Vnew(count)=uv_total(e,end); |
---|
| 22 | e=e+1; |
---|
| 23 | end |
---|
| 24 | U1=U1+Unew'; |
---|
| 25 | V1=V1+Vnew'; |
---|
| 26 | |
---|
| 27 | |
---|
| 28 | end |
---|
| 29 | |
---|
| 30 | U1=U1./54; |
---|
| 31 | V1=V1./54; |
---|
| 32 | %%% Because if the jtlag is 3 we have a set of zeros each 3 time steps in |
---|
| 33 | %%% the uv_total. |
---|
| 34 | U1=U1*1.5; |
---|
| 35 | V1=V1*1.5; |
---|
| 36 | umean(:,4)=U1; |
---|
| 37 | |
---|
| 38 | |
---|
| 39 | fid=fopen(outfile,'w'); |
---|
| 40 | fprintf(fid,'%d %d %d %f\n',umean'); |
---|
| 41 | fclose(fid); |
---|
| 42 | |
---|
| 43 | outfile='obs_float/vcorr.dat'; |
---|
| 44 | load obs_float/uv_total.dat; |
---|
| 45 | load obs_float/uzero.dat |
---|
| 46 | |
---|
| 47 | vmean(:,1)=uzero(:,1); |
---|
| 48 | vmean(:,2)=uzero(:,2); |
---|
| 49 | vmean(:,3)=uzero(:,3); |
---|
| 50 | U1=zeros(5046,1); |
---|
| 51 | V1=zeros(5046,1); |
---|
| 52 | e=1; |
---|
| 53 | for r=1:1:81 |
---|
| 54 | |
---|
| 55 | Unew=zeros(1,5046); |
---|
| 56 | Vnew=zeros(1,5046); |
---|
| 57 | for count=1:5046 |
---|
| 58 | Unew(count)=uv_total(e,end-1); |
---|
| 59 | Vnew(count)=uv_total(e,end); |
---|
| 60 | e=e+1; |
---|
| 61 | end |
---|
| 62 | U1=U1+Unew'; |
---|
| 63 | V1=V1+Vnew'; |
---|
| 64 | |
---|
| 65 | |
---|
| 66 | end |
---|
| 67 | |
---|
| 68 | U1=U1./81; |
---|
| 69 | V1=V1./81; |
---|
| 70 | %%% Because if the jtlag is 3 we have a set of zeros each 3 time steps in |
---|
| 71 | %%% the uv_total. |
---|
| 72 | U1=U1*2.25; |
---|
| 73 | V1=V1*2.25; |
---|
| 74 | vmean(:,4)=V1; |
---|
| 75 | |
---|
| 76 | |
---|
| 77 | fid=fopen(outfile,'w'); |
---|
| 78 | fprintf(fid,'%d %d %d %f\n',vmean'); |
---|
| 79 | fclose(fid); |
---|
| 80 | end |
---|
| 81 | |
---|
Note: See
TracBrowser
for help on using the repository browser.