- Timestamp:
- 12/18/11 23:24:49 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/cresamsu.pro
r475 r476 224 224 testfilename='' 225 225 ; lecture des fichiers 226 227 228 226 for yyyy=yyyyb,yyyye do begin 227 for mm=mmb,mme do begin 228 for dd=ddb,dde do begin 229 229 ; ouverture fichier journalier 230 231 , lon_min, lon_max, lat_min, lat_max $232 , testfilename)233 234 235 236 237 238 239 230 result=file_amsu_t2_to_mem( yyyy, mm, dd, numch $ 231 , lon_min, lon_max, lat_min, lat_max $ 232 , testfilename) 233 desc=result.data.desc 234 hour=result.data.hour 235 fov=result.data.fov 236 lon=result.data.lon 237 lat=result.data.lat 238 mask=result.data.landseamask 239 tb1=result.data.tb 240 240 ; decodage du nb de points (nn) 241 241 nn=n_elements(tb1) 242 242 ; egalement aussi des bornes en lon / lat (a retirer des parametres d'entree)++ 243 243 244 244 ; boucle sur les points du fichier 245 245 246 246 for i=0,nn do begin 247 247 248 248 ; recup de tb1,hour,lon,lat 249 249 if (tb1[i] ge tbmin and tb1[i] le tbmax) then begin 250 250 ;if ((tb1 lt tbmin) or (tb1 gt tbmax)) then goto,suite0 ;; on ne s interesse pas aux donnees aberrantes 251 251 ; a remplacer par if tb1 ne Nan then begin 252 252 ;if (cont lt 10) then print,lon,lat,fov,tb1,hour 253 253 ; test sur le debut et la fin des donnes utiles tenant compte du rayon temporel 254 254 jour=julday(mm,dd,yyyy,0)*24.+hour[i] ; en heures decimales 255 255 ;if (cont lt 10) then print,mm,dd,yyyy,'jour julien lu (en heure)',jour 256 256 if ((jour ge hrdeb-rtemphor) and (jour le hrfin+rtemphor) and (hour[i] le hfin) and (hour[i] ge hdeb) ) then begin 257 257 ; print,'on cherche les donnees dans la fenetre temporelle' 258 258 ; utilisation seulement des orbites du 259 259 ; matin - projet heat low 260 260 ; grilles temporelle et spatiale utile 261 262 261 jdp=fix((jour-hrdeb-rtemphor)/pasthor)>0 262 jfn=fix((jour-hrdeb+rtemphor)/pasthor)+1<jmax 263 263 ;print,'grille utile temporelle',jdp,jfn 264 kdp=fix((lon-lo1-rhdeg)/pash)>0265 kfn=fix((lon-lo1+rhdeg)/pash)+1<kmax266 ldp=fix((lat-la1-rhdeg)/pash)>0267 lfn=fix((lat-la1+rhdeg)/pash)+1<lmax264 kdp=fix((lon[i]-lo1-rhdeg)/pash)>0 265 kfn=fix((lon[i]-lo1+rhdeg)/pash)+1<kmax 266 ldp=fix((lat[i]-la1-rhdeg)/pash)>0 267 lfn=fix((lat[i]-la1+rhdeg)/pash)+1<lmax 268 268 ;print,'grille spatiale utile', kdp,kfn,ldp,lfn 269 269 ; calcul de la fonction de Cressman 270 if (fov gt fov_int2 and fov lt fov_int3) then begin 271 yy=lat*coef 272 xx=lon*coef 273 coyy=cos(yy) 274 coxx=cos(xx) 275 sixx=sin(xx) 276 siyy=sin(yy) 270 yy=lat[i]*coef 271 xx=lon[i]*coef 272 coyy=cos(yy) 273 coxx=cos(xx) 274 sixx=sin(xx) 275 siyy=sin(yy) 277 276 ; boucle pour le calcul des contributions aux points de la grille 278 277 ; (los, las, t) 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 278 for nj=jdp,jfn do begin 279 dij=(jour-t[nj])/rtemphor ; normalisee par le rayon de Cressmann 280 disj=dij*dij 281 for l=ldp,lfn do begin 282 coco=coyy*cos(las[l]) 283 sisi=siyy*sin(las[l]) 284 for k=kdp,kfn do begin 285 xxs=los[k] 286 ang=coco*(coxx*cos(xxs)+sixx*sin(xxs))+sisi 287 vv=ang 288 ac=acos(vv) 289 dist=rterre*rterre*ac*ac/r2 290 if (dist lt 1. and disj lt 1.) then begin 291 rnorm=2. 292 poids=(rnorm-dist-disj)/(rnorm+dist+disj) 293 stb1[k,l,nj]=stb1[k,l,nj]+tb1*poids 294 z1[k,l,nj]=z1[k,l,nj]+poids 295 kont1[k,l,nj]=kont1[k,l,nj]+1 297 296 ; print,kont1[k,l,nj] 298 endif 299 endfor 300 endfor 297 endif 301 298 endfor 302 endif 303 endif 304 endif ; fin test donnees Nan 305 endfor 299 endfor 300 endfor 301 endif 302 endif 303 endfor 304 306 305 ; fin lecture donnees fichier journalier 307 endfor308 306 endfor 309 307 endfor 308 endfor 309 310 310 ; fin boucle sur le temps 311 311 … … 329 329 jpie = n_elements(xxe) 330 330 jpje = n_elements(yye) 331 maskfin=fltarr(nblon,nblat) 331 332 maskfin=interpolate(bate,indgen(nblon),indgen(nblat),/grid) 332 333 ind=where(maskfin gt 0.5,nland) 333 if nland ne 0 then maskfin(ind)=1 334 if nland ne 0 then begin 335 maskfin(ind)=1 336 endif 334 337 ind=where(maskfin le 0.5,nsea) 335 if nsea ne 0 then maskfin(ind)=0 336 338 if nsea ne 0 then begin 339 maskfin(ind)=0 340 endif 337 341 ;toto=reform(tb1fin[*,*,0]) 338 342 ;plt,xxlon,yylat,toto
Note: See TracChangeset
for help on using the changeset viewer.