source: altifloat/matlab_toolbox/cut_back_obs.m @ 160

Last change on this file since 160 was 155, checked in by jbrlod, 9 years ago

few modif in script_perso.m

File size: 452 bytes
Line 
1function [uvbb vv]=cut_back_obs(outfile1,outfile2,ufile,obsfile,timecut,nlon,nlat)
2
3
4cutat=timecut;
5
6%if you want to cut the background
7uvb=load(ufile);
8
9uvbb=uvb(1:(cutat+0)*nlon*nlat,:);
10
11dlmwrite(outfile1,uvbb,'\t');
12
13
14robs=load(obsfile);
15
16Nf=length(unique(robs(:,2)));
17
18vv=[];
19for k=0:Nf-1
20    II=find(robs(:,2)==k);
21    oob=robs(II,:);
22    ooob=oob(1:cutat,:);
23    vv=[vv;ooob];
24end
25
26dlmwrite(outfile2,vv,'\t');
27
28
29
30end
Note: See TracBrowser for help on using the repository browser.