source: altifloat/exp_twin_aviso/script_prepare_exp_twin.m @ 199

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

finalize wind effect

File size: 2.2 KB
Line 
1
2addpath('../matlab_toolbox');
3rootdir = './'
4
5%STEP ONE : produce the meshfile
6
7%meshgrid Aviso
8meshfile=[rootdir 'meshgrid_aviso.dat'];
9
10%important variables because it is read by script bash
11%WARNING : PUT A SPACE AROUND EQUAL SIGN AND BEFORE SEMI-COLON
12nlon = 87 ;
13nlat = 58 ;
14make_meshgrid(meshfile,30.0625,26.1875,37.1875,36.9375,nlon,nlat);
15
16%% STEP TWO : transform and interpolate aviso file to YAO file to make the truth
17dir_uvfiles='../../data/AVISO/';
18aviso_netcdf={[dir_uvfiles 'dt_med_allsat_madt_uv_20130828_20140704.nc'],...
19              [dir_uvfiles 'dt_med_allsat_madt_uv_20130829_20140704.nc'],...
20              [dir_uvfiles 'dt_med_allsat_madt_uv_20130830_20140704.nc']};
21
22it=1:24:1+24*(length(aviso_netcdf)-1);
23
24outfile=[rootdir 'uv_truth.dat'];
25outmask=[rootdir 'mask.dat'];
26
27dt=1;
28
29interp_bck(aviso_netcdf,it,dt,meshfile,outfile,outmask);
30
31%% STEP THREE : Prepare filter
32make_filter(meshfile,outmask,20000,rootdir);
33
34%% STEP THREE BIS : Prepare wind
35windfile = [rootdir 'wind_interp.nc'];
36infile = '../../data/wind/wind_20130825-20130930.nc';
37interp_wind(infile,meshfile,windfile);
38
39
40%% STEP FOUR: Prepare init
41initfile=[rootdir 'init5.dat'];
42
43%% STEP FIVE
44% RUN forward.sh to set grid and filter parameters
45% Modify if necessary the number of floater and the number of time steps
46% make the project (with -DINC_FIL and -DINC_GRID options)
47% Make a symbolic link on the executable
48% run the project with forward.i
49
50%% STEP SIX : modify obs file (e.g. subsampling)
51obsallfile=[rootdir 'rfloat_total.dat'];
52obsfile=[rootdir 'obs_jum.dat'];
53
54init=load(initfile);
55obs=load(obsallfile);
56
57istep=5;
58I=find(obs(:,end)>1e-8);
59obs=obs(I,:);
60
61obs=[init;obs];
62obs=sortrows(obs,[2 1]);
63
64t=unique(obs(:,1));
65tech=t(1:istep:end);
66
67I=find(ismember(obs(:,1),tech));
68obs=obs(I,:);
69dlmwrite(obsfile,obs,'\t');
70
71%% STEP SEVEN : Create bck
72aviso_netcdf={[dir_uvfiles 'dt_med_allsat_madt_uv_20130912_20140704.nc'],...
73              [dir_uvfiles 'dt_med_allsat_madt_uv_20130913_20140704.nc'],...
74              [dir_uvfiles 'dt_med_allsat_madt_uv_20130914_20140704.nc']};
75
76outfile=[rootdir 'uv_bck.dat'];
77interp_bck(aviso_netcdf,it,dt,meshfile,outfile,outmask);
78
79
80%% STEP EIGHT : ASSIMILATION
81% run the project with assim.i
Note: See TracBrowser for help on using the repository browser.