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