Changeset 144
- Timestamp:
- 04/01/15 18:20:38 (9 years ago)
- Location:
- altifloat
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
altifloat/matlab_toolbox/script_perso.m
r143 r144 7 7 %vt=load([ indir 'vzero.dat']); 8 8 robs=load([ indir 'rfloat_total.dat']); 9 rsim=load([ indir 'rfloat_total_jum0.dat']); 9 10 uvb=load([ indir 'uv_bck_dan.dat']); 10 uv=load([indir 'uv_total .dat']);11 uv=load([indir 'uv_total_jum0.dat']); 11 12 meshg=load([indir 'meshgrid_dan.dat']); 12 13 drifterdir='../altifloat/'; … … 57 58 58 59 for j=1:nfloat 60 data= load([drifterdir fname{j}]); 61 59 62 rfloat=robs(robs(:,2)==j-1&robs(:,end)>0,[end-1 end]); 60 63 rfloat_lon=interp1(1:nlon,lon,rfloat(:,2)+1); 61 64 rfloat_lat=interp1(1:nlat,lat',rfloat(:,1)+1); 65 Hobs=plot([data.lon(1);rfloat_lon],[data.lat(1);rfloat_lat],'.-b'); 66 67 rfloat=rsim(rsim(:,2)==j-1&rsim(:,end)>0,[end-1 end]); 68 rfloat_lon=interp1(1:nlon,lon,rfloat(:,2)+1); 69 rfloat_lat=interp1(1:nlat,lat',rfloat(:,1)+1); 70 Hsim=plot([data.lon(1);rfloat_lon],[data.lat(1);rfloat_lat],'.-r'); 71 72 62 73 % plot(rfloat(:,2)+1,rfloat(:,1)+1,'.-m'); 63 data= load([drifterdir fname{j}]); 64 H obs=plot(data.lon(1:4),data.lat(1:4),'.-k')74 75 Hreal=plot(data.lon(1:4),data.lat(1:4),'.-k') 65 76 66 Hsim=plot([data.lon(1);rfloat_lon],[data.lat(1);rfloat_lat],'.-m');67 77 end 68 78 -
altifloat/matlab_toolbox/script_prepare_exp_modele.m
r143 r144 39 39 end % for j 40 40 dlmwrite(['../exp_forw_dan/' initfile],MM,'\t'); 41 42 %STEP OBS : modify obs file 43 -
altifloat/scripts/floater_model_forward.i
r143 r144 16 16 17 17 #Conditions initiales : 18 #loadstate r_float 0 i 0 A 1 ../obs_float/init.dat D 18 19 19 setstate r_float_d 0 20 20 21 loadstate cfil 0 ij 0 A 1 ../obs_float/CC.dat D 22 loadstate dfil 0 ij 0 A 1 ../obs_float/DD.dat D 23 loadstate mask 0 ij 0 A 1 ../obs_float/Mask.dat D 24 loadstate u_norm 0 ij 0 A 1 ../obs_float/NU.dat D 25 loadstate v_norm 0 ij 0 A 1 ../obs_float/NV.dat D 21 loadstate cfil 0 ij 0 A 1 ../exp_forw_dan/CC.dat D 22 loadstate dfil 0 ij 0 A 1 ../exp_forw_dan/DD.dat D 23 loadstate u_norm 0 ij 0 A 1 ../exp_forw_dan/NU.dat D 24 loadstate v_norm 0 ij 0 A 1 ../exp_forw_dan/NV.dat D 26 25 27 26 #Observations : -
altifloat/src/floater.h
r143 r144 39 39 //YREAL c2,c3,c4,c5; 40 40 //YREAL dtfil=26042000; 41 YREAL dtfil=2.604166666666667e+07;42 41 //YREAL dtfil=2.604166666666667e+07; 42 YREAL dtfil=200000; 43 43 #endif 44 44 … … 213 213 status=fscanf(fid,"%f",&val); 214 214 mask[ilon][ilat]=(int)val; 215 YS1_mask(ilon,ilat)=mask[ilon][ilat]; 215 216 if (status!=1) { 216 217 fprintf(stderr,"(read_mask) unable to read mask value (lon=%d,lat=%d)\n",ilon,ilat); … … 267 268 268 269 } 269 270 271 void read_obs_2(int argv, char *argc[]) { 272 /* Read observation in a ascii file compatible with save_output_rfloat 273 format 274 Column 1 (%d) : time step (from 0 to jptfl-1) 275 Column 2 (%d) : idfloat (from 0 to jpnfl-1) 276 Column 3 (%f) : grid point piret (lon) 277 Column 4 (%f) : grid point pjret (lat) 278 */ 279 if (argv!=2) { 280 printf("(read_obs) Error : read_obs with %d (1 nedded)\n",argv-1); 281 printf("No obs read\n"); 282 return; 283 } 284 FILE *fid; 285 int count=0; 286 fid=fopen(argc[1],"r"); 287 if (fid==NULL) { 288 printf("(read_obs) Error : unable to open %s\n",argc[1]); 289 return; 290 } 291 int it,id; 292 YREAL posi,posj; 293 int status=4; 294 while(status==4) { 295 status=fscanf(fid,"%d %d %lf %lf",&it,&id,&posi,&posj); 296 if (status!=4) break; 297 count++; 298 piobs[it][id]=posi; 299 pjobs[it][id]=posj; 300 pmask[it][id]=1; 301 }//while (status==4) 302 fclose(fid); 303 fprintf(stdout,"(read_obs) %d data were loaded as observations\n",count); 304 } 305 270 306 void read_obs(int argv, char *argc[]) { 271 307 /* Read observation in a ascii file -
altifloat/src/floater_delta.d
r143 r144 18 18 #ifdef FILTER 19 19 defval K_FILTER //create a define K_FILTER in the source code 20 defval OFIL 6//order of the filter20 defval OFIL 5 //order of the filter 21 21 #else 22 22 defval OFIL 0 //Offtime of the main trajectory (0 since there is no filter) … … 237 237 insert_fct arg run_inc 238 238 insert_fct arg read_obs 239 insert_fct arg read_obs_2 239 240 insert_fct multirun 240 241 insert_fct arg save_output_uv
Note: See TracChangeset
for help on using the changeset viewer.