Changeset 588
- Timestamp:
- 07/18/12 14:19:02 (12 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/extract_amsu.pro
r587 r588 13 13 ; prgm de lecture des fichiers AMSU (A et B) 14 14 ; 15 ; decode les noms des fichiers donn és en argument dans **files_list**15 ; decode les noms des fichiers donnés en argument dans **files_list** 16 16 ; dans la date choisie, puis appelle le prgm de lecture 17 17 ; … … 29 29 ; no satellite, le no de fov (1 a 40 ou 1 a 90), long, lat, tb 30 30 ; 31 ; Les valeurs manquantes sont cod ées par NaN.31 ; Les valeurs manquantes sont codées par NaN. 32 32 ; 33 33 ; .. only:: man … … 96 96 ; lat_max=20. 97 97 ; files_list = search_amsufiles(numch, yyyy, mm, dd) 98 ; extract_amsu, numch, files_list, yyyy, mm, dd, resol, lon_min, lon_max, lat_min, lat_max 99 ; result = file_bathy_to_mem(lon_min, lon_max, lat_min, lat_max) 98 100 ; extract_amsua, numch, files_list, yyyy, mm, dd, resol, lon_min, lon_max, lat_min, lat_max 99 101 ; … … 125 127 ; interpolswath ne gere pas cette situation 126 128 ; 127 ; lever le doute sur le contenu du fichier écrit par le printf (je (fplod)129 ; lever le doute sur le contenu du fichier écrit par le printf (je (fplod) 128 130 ; crains des zeros louches!!).louche 129 131 ; … … 133 135 ; eviter la creation d'un fichier vide (si pas de points dans la zone) 134 136 ; 135 ; tester la coh érence entre les fichiers présents dans files_list136 ; en terme de date avec yyyy, mm et dd donn és en paramètre137 ; tester la cohérence entre les fichiers présents dans files_list 138 ; en terme de date avec yyyy, mm et dd donnés en paramÚtre 137 139 ; 138 140 ; improve log … … 154 156 ; - lelod 20120420 155 157 ; 156 ; * extension de extract_amsua àamsub158 ; * extension de extract_amsua à amsub 157 159 ; 158 160 ; - lelod 20120418 … … 272 274 ;- 273 275 PRO extract_amsu, numch, files_list, yyyy, mm, dd, resol $ 274 , lon _min, lon_max, lat_min, lat_max276 , lonmin, lonmax, latmin, latmax 275 277 ; 276 278 compile_opt idl2, strictarrsubs … … 278 280 @cm_project 279 281 @common 280 282 s = size(SCOPE_TRACEBACK(/STRUCTURE),/DIMENSION) 283 routine = (SCOPE_TRACEBACK(/STRUCTURE))[s-1].Routine 284 key_performance=1 285 286 if key_performance EQ 1 THEN BEGIN 287 time1 = SYSTIME(1) 288 ENDIF 289 ; 281 290 ; test if some files to read 282 291 CASE size(files_list,/DIMENSION) OF … … 312 321 ; boucle sur les elements de la liste 313 322 desc=0 314 print, 'iii : traitement du jour ',yyyy,mm,dd 323 msg = report(['iii : ' + routine + ' : traitement du jour' $ 324 + string(yyyy, format='(1x,I4.4)') $ 325 + string(mm, format='(I2.2)') $ 326 + string(dd, format='(I2.2)')]) 315 327 a = STRARR(nb_file) 316 ;PRINT,'demarrage boucle sur lichiers', SYSTIME() 328 329 IF key_performance EQ 1 THEN BEGIN 330 msg = report(['ppp : ' + routine + ' : duree intermediaire demarrage boucle sur fichier ' $ 331 + string(SYSTIME(1)-time1,format='(F12.6)')]) 332 ENDIF 333 317 334 FOR ifile = 0, nb_file - 1 do begin 318 335 if nomcanal eq 'a' then begin … … 320 337 COMMON amsua_header,ama_head 321 338 COMMON amsua_data ,ama_scan 322 print, 'ouverture et lecture du fichier ', filea, SYSTIME() 323 ;openr,lu1,filea,Error=erra,/get_lun 339 IF key_performance EQ 1 THEN BEGIN 340 msg = report(['ppp : ' + routine + ' : duree intermediaire ouverture et lecture du fichier' $ 341 + string(SYSTIME(1)-time1,format='(F12.6)')]) 342 ENDIF 324 343 read_amsua1c,filea, flag1 325 ;close,lu1326 ;free_lun,lu1327 344 if (flag1 eq 0) then goto, labfile 328 345 na=SIZE(reform(ama_scan.btemps[0,*,*])) … … 333 350 nbpix= na_fov 334 351 n_fov=na_fov 335 nosat=ama_head.h_satid 352 nosat=ama_head.h_satid ; numero du satellite NOAA (15 a 19) ou METOP 2 353 print,'NUMERO DU SATELLITE ',nosat 354 print,'INSTRUMENT',ama_head.h_instrument 336 355 ; on lit la structure et on extrait les infos: temps, longitude, 337 356 ; latitude, et les Tbs des differents canaux (15 pour AMSUA) 338 ; extraction du canal traite dans un domaine enveloppant la zone choisie339 357 amalong=REFORM(ama_scan.latlon[1,*,*]/1.E4) 340 358 amalati=REFORM(ama_scan.latlon[0,*,*]/1.E4) … … 345 363 endif 346 364 if nomcanal eq 'b' then begin 365 fileb = files_list[ifile] 347 366 COMMON amsub_header,amb_head 348 367 COMMON amsub_data ,amb_scan 349 fileb = files_list[ifile] 350 print, 'ouverture et lecture du fichier ', fileb, SYSTIME() 351 ;openr,lu1,fileb,Error=errb,/get_lun 352 read_amsub1c,fileb, flag2 353 ;close,lu1 354 ;free_lun,lu1 355 if (flag2 eq 0) then goto, labfile 368 IF key_performance EQ 1 THEN BEGIN 369 msg = report(['ppp : ' + routine + ' : duree intermediaire ouverture et lecture du fichier' $ 370 + string(SYSTIME(1)-time1,format='(F12.6)')]) 371 ENDIF 372 read_amsub1c,fileb, flag2 373 if (flag2 eq 0) then goto, labfile 356 374 nb=SIZE(reform(amb_scan.btemps[0,*,*])) 357 375 nb_scan=nb[2] ; nb lignes (ou fauchees) … … 359 377 nb_fov=nb[1] ; nb pixels dans la fauchee 360 378 nbpix = nb_fov ; nb pixels dans la fauchee AMSUB 361 nosat=amb_head.h_satid ; on le lit dans le fichier, donc pas besoin de l'info dans la liste 379 nosat=amb_head.h_satid ; numero du satellite NOAA (15 a 19) ou METOP 2 380 print,'NUMERO DU SATELLITE ',nosat 381 print,'INSTRUMENT',amb_head.h_instrument 382 ; on lit la structure et on extrait les infos: temps, longitude, 383 ; latitude, et les Tbs des differents canaux (5 pour AMSUB) 362 384 amalong=REFORM(amb_scan.latlon[1,*,*]/1.E4) 363 385 amalati=REFORM(amb_scan.latlon[0,*,*]/1.E4) … … 368 390 endif 369 391 370 fov=indgen(nbpix) ; nb pixels dans la fauchee AMSU ne sert a rien???371 392 ntime_1=fltarr(nbpix,n_scan) 372 393 fovy_1=fltarr(nbpix,n_scan) … … 374 395 fovy_1[j,*]=j+1 ; on remplit un tableau de nscan lignes avec les valeurs de no de pixel 375 396 endfor 397 ; extraction du canal traite dans un domaine enveloppant la zone choisie 376 398 midpix=fix(nbpix/2) 377 jnd=where(amalong[midpix,*] gt lon_min-15 and amalong[midpix,*] lt lon_max+15 and amalati[midpix,*] gt lat_min-15 and amalati[midpix,*] lt lat_max+15 ,nzon) 378 print,"iii : nb de points du fichier dans le domaine geographique +15deg ",nzon, SYSTIME() 399 jnd=where(amalong[midpix,*] gt lonmin-15 and amalong[midpix,*] lt lonmax+15 and amalati[midpix,*] gt latmin-15 and amalati[midpix,*] lt latmax+15 ,nzon) 400 msg = report(['iii : ' + routine + ' : nb de points du fichier dans le domaine geographique +15deg ' + string(nzon,format='(I8.8)')]) 401 IF key_performance EQ 1 THEN BEGIN 402 msg = report(['ppp : ' + routine + ' : durï¿œe intermediaire avant test nzon' $ 403 + string(SYSTIME(1)-time1,format='(F12.6)')]) 404 ENDIF 379 405 if nzon gt 1 then begin 380 406 amalat=amalati[*,jnd] … … 389 415 amafov= fovy_1 390 416 jour_ama=amaday[0] ; jour du passage 391 392 ; 393 ; correction nadir des donnees 417 desc=desc+1 418 ; 419 ; correction nadir des donnees.En principe le 17 est elimine des 420 ; listes 421 isat=0 422 if nosat eq 15 then begin 423 isat=0 424 print,'no satellite',nosat, isat 425 endif 426 if nosat eq 16 then isat=1 427 if nosat eq 18 then isat=2 428 if nosat eq 19 then isat=3 429 if nosat eq 2 then isat=4 430 394 431 ch_nadir=fltarr(nbpix,nzon) 395 432 landseamask=intarr(nbpix,nzon)+2 ; valeur hors zone selectionnee 396 ; PRINT,'boucle sur les points du fichier, correction nadir', SYSTIME() 433 IF key_performance EQ 1 THEN BEGIN 434 msg = report(['ppp : ' + routine + ' : durï¿œe intermediaire boucle sur les points du fichier, correction nadir ' $ 435 + string(SYSTIME(1)-time1,format='(F12.6)')]) 436 ENDIF 437 397 438 for isc=0L,nzon-1L do begin 398 439 ;recherche de la zone xxe,yye englobant la fauchee … … 417 458 bate2=bate1[*,yind] 418 459 if (mean(bate2) le 0.5) then begin 419 ch_nadir[ifo,isc]=amch[ifo,isc]-cor_s[ifo ]460 ch_nadir[ifo,isc]=amch[ifo,isc]-cor_s[ifo,isat] 420 461 landseamask[ifo,isc]=0 ; mer 421 462 endif else begin 422 ch_nadir[ifo,isc]=amch[ifo,isc]-cor_l[ifo ]463 ch_nadir[ifo,isc]=amch[ifo,isc]-cor_l[ifo,isat] 423 464 landseamask[ifo,isc]=1 ; terre 424 465 endelse … … 429 470 430 471 endfor 431 ; PRINT, 'fin boucle ',SYSTIME() 472 IF key_performance EQ 1 THEN BEGIN 473 msg = report(['ppp : ' + routine + ' : durï¿œe intermediaire fin boucle ' $ 474 + string(SYSTIME(1)-time1,format='(F12.6)')]) 475 ENDIF 432 476 moych=fltarr(nbpix) 433 477 print,'valeurs extremes tb',min(amch),min(ch_nadir),max(amch),max(ch_nadir) 434 478 ; appel a interpolswath pour ajuster les pixels amsua sur une grille 435 479 ; reguliere dans la fauchee 436 480 ; et selection de la zone conservee 437 ; attention test sur la longitude code en dur:438 ; pbs avec les fauchees qui traversent le meridien 180deg!!!!439 ; l'interpolation ajoute des points parasites dans la zone...440 481 nbgrid=0 441 482 cont=0L … … 447 488 mask=landseamask[*,i] 448 489 ind=where(tb gt tbmin,nbon) 490 print,'nbon',nbon 449 491 ; test pour eviter pb d'interpolation de longitude (meridien 180) 450 492 if nbon eq nbpix then begin … … 455 497 ;print,'wwwtest: nb points fov interpole ',n_elements(tbgrid) 456 498 ; selection des taches au sol situees dans la zone d'interet 457 zone=where((longrid ge lon _min) and (longrid le lon_max) $458 and (latgrid ge lat _min) and (latgrid le lat_max) and (tbgrid gt tbmin) and (tbgrid lt tbmax), npt)499 zone=where((longrid ge lonmin) and (longrid le lonmax) $ 500 and (latgrid ge latmin) and (latgrid le latmax) and (tbgrid gt tbmin) and (tbgrid lt tbmax), npt) 459 501 ;print,'wwwtest: nb points zone d interet ',npt 460 502 if npt ne 0 then begin … … 479 521 endif 480 522 endfor 481 ; PRINT,'fin interpolation et selection des points de la zone ', SYSTIME() 523 IF key_performance EQ 1 THEN BEGIN 524 msg = report(['ppp : ' + routine + ' : durï¿œe intermediaire fin interpolation et selection des points de la zone ' $ 525 + string(SYSTIME(1)-time1,format='(F12.6)')]) 526 ENDIF 482 527 483 528 nn=n_elements(chint) 484 485 print,'www : nb points dans la zone en fin de traitement de l''orbite ',nn 529 msg = report(['www : ' + routine + ' : nb points dans la zone en fin de traitement de l''orbite ' + string(nn,format='(I10.10)')]) 486 530 if nn gt 1 then begin 487 531 for i=0L, nn-1L do begin … … 511 555 ; fin boucle sur les fichiers lus 512 556 endif 513 PRINT,'www : passage au fichier suivant ', SYSTIME() 557 IF key_performance EQ 1 THEN BEGIN 558 msg = report(['ppp : ' + routine + ' : durï¿œe intermediaire au passage au fichier suivant ' $ 559 + string(SYSTIME(1)-time1,format='(F12.6)')]) 560 ENDIF 514 561 endfor 515 562 labfile: … … 523 570 , resol : resol $ 524 571 } 525 header2= { lon _min: lon_min $526 , lon _max: lon_max $527 , lat _min: lat_min $528 , lat _max: lat_max $572 header2= { lonmin: lonmin $ 573 , lonmax: lonmax $ 574 , latmin: latmin $ 575 , latmax: latmax $ 529 576 } 530 577 … … 535 582 536 583 endif else begin 537 print, 'www : no data to write'584 msg = report(['www : ' + routine + ' : no data to write']) 538 585 goto, realend 539 586 endelse 540 587 541 588 nofile: 542 print, 'www : no data to read'589 msg = report(['www : ' + routine + ' : no data to read']) 543 590 goto, realend 544 591 545 592 realend: 546 PRINT, 'www : fin programme extract_amsua ',SYSTIME() 593 IF key_performance EQ 1 THEN BEGIN 594 msg = report(['ppp : ' + routine + ' : durï¿œe totale ' $ 595 + string(SYSTIME(1)-time1,format='(F12.6)')]) 596 ENDIF 547 597 end -
trunk/src/interpolswath.pro
r586 r588 65 65 ; 66 66 pixelsize,pixatot,pixbtot,alongatot,alongbtot 67 if type ='a' then begin67 if type eq 'a' then begin 68 68 na=max(size(pixatot)) 69 69 nnadir=na/2 70 70 pixa=pixatot[nnadir:(na-1)] 71 endif else begin 71 endif 72 if type eq 'b' then begin 72 73 na=max(size(pixbtot)) 73 74 nnadir=na/2 74 75 pixa=pixbtot[nnadir:(na-1)] 75 end else76 endif 76 77 fova=fltarr(na) 77 78 fova[nnadir]=pixa[0]/2. … … 158 159 endif 159 160 endelse 160 161 print,mean(lonlu),mean(longrid) 161 162 ;print,tbint 162 163 IF key_performance EQ 1 THEN BEGIN -
trunk/src/search_amsufiles.pro
r536 r588 51 51 ; ========== 52 52 ; 53 ; lelod 20120716 54 ; ajout de MHS dans la liste 53 55 ; $Id$ 54 56 ; … … 173 175 nomcanal_upper = STRUPCASE(nomcanal) 174 176 ; 175 files_expr = project_id_env $177 files_expr1 = project_id_env $ 176 178 + 'AMSU/AMSU' + nomcanal_upper + '*/L1C/' $ 177 179 + string(yyyy,format='(i4.4)') + '/' $ … … 179 181 + string(mm,format='(i2.2)') + '_' $ 180 182 + string(dd,format='(i2.2)') +'/'+'*.L1C' 183 files_expr2 = project_id_env $ 184 + 'AMSU/MHS' + '*/L1C/' $ 185 + string(yyyy,format='(i4.4)') + '/' $ 186 + string(yyyy,format='(i4.4)') + '_' $ 187 + string(mm,format='(i2.2)') + '_' $ 188 + string(dd,format='(i2.2)') +'/'+'*.L1C' 189 files_expr=[files_expr1,files_expr2] 181 190 ; 182 191 ;print, files_expr -
trunk/src/traite_amsuab.sh
r579 r588 315 315 # !! when change 316 316 yyyymmddb_min=19991230 317 yyyymmdde_max=201 30101317 yyyymmdde_max=20150102 318 318 # 319 319 # default … … 579 579 print, 'iii : nb de fichiers', size(files_list,/DIMENSION) 580 580 resol=1 581 extract_amsu a, '${numch}', files_list, ${yyyy}, ${mm}, ${dd}, resol, ${lonmin}, ${lonmax}, ${latmin}, ${latmax}581 extract_amsu, '${numch}', files_list, ${yyyy}, ${mm}, ${dd}, resol, ${lonmin}, ${lonmax}, ${latmin}, ${latmax} 582 582 END 583 583 ENDCASE … … 601 601 ; compile users procedures to be scan by Profiler 602 602 .compile interpol_correc 603 .compile extract_amsu a603 .compile extract_amsu 604 604 .compile read_amsua1c 605 .compile read_amsub1c 605 606 .compile define_amsua_header_struct 606 607 .compile define_amsua_struct
Note: See TracChangeset
for help on using the changeset viewer.