source: altifloat/matlab_toolbox/takecorrectionasbck.m @ 160

Last change on this file since 160 was 129, checked in by jbrlod, 10 years ago

last version of Varanth

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