- Timestamp:
- 12/13/11 18:52:07 (13 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/extract_amsua.pro
r458 r461 77 77 ; IDL> yyyy=2006 78 78 ; IDL> mm=8 79 ; IDL> dd=1 79 ; IDL> dd=13 80 80 ; IDL> resol=1 81 81 ; IDL> lon_min=-60. … … 178 178 ; :Todo: 179 179 ; 180 ; make it work : resete un n_elements bizarre que IDL ne détecte pas à la181 ; compilation182 180 ; 183 181 ; lever le doute sur le contenu du fichier écrit par le printf (je (fplod) … … 207 205 ; decrire la limitation avec les seuils 208 206 ; 209 ; est-ce que la zon géographique ne peut pas ere déduite des min et max lus ce210 ; qui eviterait des parametres dont on avait réussi à se débarasser211 207 ; 212 208 ;- … … 218 214 219 215 nomcanal=strmid(numch,0,1) 220 nocanal=0 L216 nocanal=0 221 217 reads, strmid(numch,1,1),nocanal,format='(i1.1)' 222 218 … … 227 223 file=project_id_env+'/MASK/ETOPO1_Ice_g_gmt4.nc' 228 224 domdef,lon_min, lon_max, lat_min, lat_max 229 230 225 bate = ncdf_lec(file, var = 'z') GT 0 231 226 xxe = float(ncdf_lec(file, var = 'lon')) … … 234 229 jpje = n_elements(yye) 235 230 236 ; extraction zone donnees AMSU237 domdef,lon_min,lon_max,lat_min,lat_max238 bate = ncdf_lec(file, var = 'z') GT 0239 xxe = float(ncdf_lec(file, var = 'lon'))240 yye = float(ncdf_lec(file, var = 'lat'))241 jpie = n_elements;module lecture fichier a introduire ici242 231 243 232 ; inutile maintenant: ouverture du fichier de sortie 244 look = 'filename'245 scale = 1.246 geomin = geolocation_to_string_idl(lon_min, lat_min, look, scale)247 geomax = geolocation_to_string_idl(lon_max, lat_max, look, scale)248 fileout=project_id_env+ 'AMSU/' $249 + string(yyyy,format='(I4.4)') + '/' $250 + string(mm,format='(I2.2)') + '/' $251 + numch + '_' $252 + string(yyyy,format='(I4.4)') $253 + string(mm,format='(I2.2)') $254 + string(dd,format='(I2.2)') + '_' $255 + geomin + '_' $256 + geomax $257 + '.dat'258 print, 'ouverture pour ecriture de ', fileout259 openw, lun_obs, fileout, /get_lun233 ;look = 'filename' 234 ;scale = 1. 235 ;geomin = geolocation_to_string_idl(lon_min, lat_min, look, scale) 236 ;geomax = geolocation_to_string_idl(lon_max, lat_max, look, scale) 237 ;fileout=project_id_env+ 'AMSU/' $ 238 ; + string(yyyy,format='(I4.4)') + '/' $ 239 ; + string(mm,format='(I2.2)') + '/' $ 240 ; + numch + '_' $ 241 ; + string(yyyy,format='(I4.4)') $ 242 ; + string(mm,format='(I2.2)') $ 243 ; + string(dd,format='(I2.2)') + '_' $ 244 ; + geomin + '_' $ 245 ; + geomax $ 246 ; + '.dat' 247 ;print, 'ouverture pour ecriture de ', fileout 248 ;openw, lun_obs, fileout, /get_lun 260 249 261 250 262 251 ; appel au ssprgm qui interpole les fonctions de correction (inutile 263 252 ; de l'appeler a chaque fichier....) 264 if nomcanal eq 'a' then nbpixel=30 265 if nomcanal eq 'b' then nbpixel=90 266 interpol_correc,nomcanal,nbpixel,cor_l,cor_s,swath,track 253 254 interpol_correc,numch,nbpixel,cor_l,cor_s,swath,track 267 255 268 256 … … 282 270 filea='' 283 271 nlist=1 284 ilist= 1272 ilist=0 285 273 ; while (not eof(lun_a)) do begin 286 274 while ilist le nlist do begin … … 342 330 ; correction nadir des donnees 343 331 ch_nadir=fltarr(nbpix,n_scan) 344 lan seamask=intarr(nbpix,n_scan)332 landseamask=intarr(nbpix,n_scan) 345 333 for isc=0L,n_scan-1L do begin 346 334 for ifo=0,nbpix-1 do begin … … 355 343 bate2=bate1[*,yind] 356 344 if (mean(bate2) le 0.5) then begin 357 ch_nadir[ifo,isc]=amch[ifo,isc]-cor_s[ numcanal,ifo]345 ch_nadir[ifo,isc]=amch[ifo,isc]-cor_s[ifo] 358 346 landseamask[ifo,isc]=0 ; mer 359 347 endif else begin 360 ch_nadir[ifo,isc]=amch[ifo,isc]-cor_l[ numcanal,ifo]348 ch_nadir[ifo,isc]=amch[ifo,isc]-cor_l[ifo] 361 349 landseamask[ifo,isc]=1 ; terre 362 350 endelse … … 390 378 ; selection des taches au sol situees dans la zone d'interet 391 379 zone=where((longrid ge lon_min) and (longrid le lon_max) $ 392 and (latgrid ge lat_min) and (latgrid le lat_max),npt) 393 ;print, 'npt', npt 380 and (latgrid ge lat_min) and (latgrid le lat_max) and (tbgrid gt tbmin), npt) 394 381 if npt ne 0 then begin 395 time[zone]=tt[i]396 ; alerte: comment initialiser les tableaux qu'on concatene????397 382 if (n_elements(chint) EQ 0) then begin 383 timeint=replicate(tt[i],npt) 398 384 chint=tbgrid[zone] 399 385 latint=latgrid[zone] … … 401 387 fovint=fovgrid[zone] 402 388 maskint=maskgrid[zone] 403 timeint= time[zone]404 389 endif else begin 405 390 chint=[chint,tbgrid[zone]] … … 408 393 fovint=[fovint,fovgrid[zone]] 409 394 maskint=[maskint,maskgrid[zone]] 410 timeint=[timeint, time[zone]]395 timeint=[timeint,replicate(tt[i],npt)] 411 396 endelse 412 397 endif else begin … … 416 401 endfor 417 402 418 419 for i=0L, npt-1L do begin420 if (( chint[i] lt tbmin) or (chint[i] gt tbmax) ) then begin421 ch_adj[i]=!values.f_nan422 endif423 endfor424 425 426 print,'nb points dans la zone',n pt427 428 for i=0L, n pt-1L do begin403 nn=n_elements(chint) 404 ; for i=0L, npt-1L do begin 405 ; if (( chint[i] lt tbmin) or (chint[i] gt tbmax) ) then begin 406 ; chint[i]=!values.f_nan 407 ; endif 408 ; endfor 409 410 411 print,'nb points dans la zone',nn 412 413 for i=0L, nn-1L do begin 429 414 ;format: nosat,mois, day, lon, lat, zen,fov, time, ama_ch1:15,amb_ch1:5 430 415 ; print, 'mois::::', mm,'-----', nab-i 431 printf,lun_obs, mm, jour_ama, desc, nosat, fovint[i], landseamask, lonint[i], latint[i], timeint[i],$432 chint[i],format='(6(i3,1x),4(f8.4,1x))'416 ; printf,lun_obs, mm, jour_ama, desc, nosat, fovint[i], maskint[i], lonint[i], latint[i], timeint[i],$ 417 ; chint[i],format='(6(i3,1x),4(f8.4,1x))' 433 418 if (n_elements(data) EQ 0) then begin 434 419 data = { desc : desc $ … … 460 445 ; write outputfile 461 446 ; ajouter resol dans le header 462 header = { yyyy : yyyy $447 header1 = { yyyy : yyyy $ 463 448 , mm : mm $ 464 449 , dd : dd $ 465 450 , numch : numch $ 451 , nbpix : nbgrid $ 452 , resol : resol $ 466 453 } 467 amsu_t2={header: header, data: data} 454 header2= { lon_min: lon_min $ 455 , lon_max: lon_max $ 456 , lat_min: lat_min $ 457 , lat_max: lat_max $ 458 } 459 460 amsu_t2={header1: header1, header2: header2, data: data} 468 461 help, amsu_t2,/structure 469 462 testfilename='./new_amsu_t2.dat' 470 fileout = mem_to_file_amsu_t2(yyyy, mm, dd, numch $ 471 , lon_min, lon_max, lat_min $ 472 , lat_max, amsu_t2, testfilename) 463 fileout = mem_to_file_amsu_t2(amsu_t2, testfilename) 473 464 474 465 endif else begin … … 476 467 endelse 477 468 469 window,1 470 plot,lonint,latint,xrange=[lon_min,lon_max],yrange=[lat_min,lat_max],xstyle=1,ystyle=1,psym=2 478 471 end -
trunk/src/interpol_correc.pro
r457 r461 107 107 ; 108 108 ;- 109 PRO interpol_correc, canal,nbpix,cor_l,cor_s,swath,track109 PRO interpol_correc,numch,nbpix,cor_l,cor_s,swath,track 110 110 ; 111 111 @cm_project 112 ; mettre au carre!!!!!!!!! 113 nomcanal=canal(0) 114 numcanal=str2num(canal,1) 115 112 nomcanal=strmid(numch,0,1) 113 numcanal=0 114 reads, strmid(numch,1,1),numcanal,format='(i1.1)' 115 116 if nomcanal eq 'a' then nbpixel=30 117 if nomcanal eq 'b' then nbpixel=90 116 118 pixelsize,pixatot,pixbtot,alongatot,alongbtot 117 119 if nomcanal eq 'a' then begin … … 128 130 ndfova=nfova/2 129 131 ndfovb=nfovb/2 132 print,'nb points',numch,ndfova,ndfovb 130 133 fovb=fltarr(ndfovb) 131 134 fova=fltarr(ndfova) 132 135 alongb=fltarr(ndfovb) 133 136 alongab=alongbtot[ndfovb:nfovb-1] ; verifier l'intervalle!!!!! 134 pixb=pixbtot[ndfovb:nfovb ]135 alonga=alongatot[ndfova:nfova ]136 pixa=pixatot[ndfova:nfova ]137 pixb=pixbtot[ndfovb:nfovb-1] 138 alonga=alongatot[ndfova:nfova-1] 139 pixa=pixatot[ndfova:nfova-1] 137 140 ;ifov nadir : diametre (km) 138 141 ifova=48.05 & ifovb=16 -
trunk/src/interpolswath.pro
r457 r461 69 69 ;print,'pixatot' 70 70 ;print,pixatot 71 window,172 ploterr,ifov,fova,pixatot71 ;window,1 72 ;ploterr,ifov,fova,pixatot 73 73 74 74 distmax=-min(fova)+max(fova)+max(pixa)
Note: See TracChangeset
for help on using the changeset viewer.