Changeset 572 for trunk


Ignore:
Timestamp:
06/04/12 12:35:35 (12 years ago)
Author:
lelod
Message:

maj extract_amsua et cresamsu

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/cresamsu.pro

    r564 r572  
    1 ; docformat = 'rst' 
     1 ; docformat = 'rst' 
    22;+ 
    33; 
     
    314314msg = report(['iii : ' + routine + ' : derniers points de la grille (temps) = ' + string(max(hrfin))]);----------------------------------- 
    315315t=indgen(nbjour)*pasthor+hrdeb ; en heures 
    316 print,'t',t 
     316;print,'t',t 
    317317 
    318318; initialisation des tableaux de sortie (s valeurs, z poids, kont nb points) 
     
    332332geomax = geolocation_to_string_idl(lonmax, latmax, look,1) 
    333333 
    334 fovmax=46 
    335 openr,1,project_id_env+'AMSU/AMSU'+numch+'_correcbis_t_JJAS2009.dat' 
    336 moytb=fltarr(fovmax) 
    337 readf,1,moytb,format='(46(f6.2,1X))' 
    338 close,1 
    339 moytbliss=smooth(moytb,5) 
    340 correction_t=moytbliss-mean(moytbliss[21:26]) 
    341 ;print, correction 
    342 openr,2,project_id_env+'AMSU/AMSU'+numch+'_correcbis_m_JJAS2009.dat' 
    343 moytb=fltarr(fovmax) 
    344 readf,2,moytb,format='(46(f6.2,1X))' 
    345 close,2 
    346 close,/all 
    347 moytbliss=smooth(moytb,5) 
    348 correction_m=moytbliss-mean(moytbliss[22:24]) 
     334; correction supplementaire si necessaire 
     335correcbis='non' 
     336if correcbis eq 'oui' then begin 
     337    fovmax=46 
     338    openr,1,project_id_env+'AMSU/AMSU'+numch+'_correcbis_t_JJAS2009.dat' 
     339    moytb=fltarr(fovmax) 
     340    readf,1,moytb,format='(46(f6.2,1X))' 
     341    close,1 
     342    moytbliss=smooth(moytb,5) 
     343    correction_t=moytbliss-mean(moytbliss[21:26]) 
     344    openr,2,project_id_env+'AMSU/AMSU'+numch+'_correcbis_m_JJAS2009.dat' 
     345    moytb=fltarr(fovmax) 
     346    readf,2,moytb,format='(46(f6.2,1X))' 
     347    close,2 
     348    close,/all 
     349    moytbliss=smooth(moytb,5) 
     350    correction_m=moytbliss-mean(moytbliss[22:24]) 
     351endif 
    349352 
    350353 
     
    393396 
    394397; boucle sur les points du fichier 
     398         tb1=tbinit 
     399         if correcbis eq "oui" then begin 
     400             print,"ATTENTION: correction supplementaire activee" 
    395401; application de la correction bis 
    396          tb1=fltarr(nn) 
    397          print,'fauchee',min(fov),max(fov) 
    398          for ifov=min(fov)+1,fovmax-1 do begin 
    399             ind=where(fov eq ifov and mask eq 1,nbfov) 
    400             if nbfov ne 0 then begin 
    401                tb1[ind]=tbinit[ind] -correction_t[ifov] 
    402             endif 
    403          endfor 
    404          ind=where(fov eq 1,smallfov) 
    405          if smallfov ne 0 then begin 
    406             tb1[ind]=tbinit[ind] -correction_t[0] 
     402             tb1=fltarr(nn) 
     403             print,'fauchee',min(fov),max(fov) 
     404             for ifov=min(fov)+1,fovmax-1 do begin 
     405                 ind=where(fov eq ifov and mask eq 1,nbfov) 
     406                 if nbfov ne 0 then begin 
     407                     tb1[ind]=tbinit[ind] -correction_t[ifov] 
     408                 endif 
     409             endfor 
     410             ind=where(fov eq 1,smallfov) 
     411             if smallfov ne 0 then begin 
     412                 tb1[ind]=tbinit[ind] -correction_t[0] 
     413             endif 
     414             ind=where(fov ge fovmax,bigfov) 
     415             if bigfov ne 0 then begin 
     416                 tb1[ind]=tbinit[ind] -correction_t[fovmax-1] 
     417             endif 
     418             for ifov=min(fov)+1,fovmax-1 do begin 
     419                 ind=where(fov eq ifov and mask eq 0,nbfov) 
     420                 if nbfov ne 0 then begin 
     421                     tb1[ind]=tbinit[ind]-correction_m[ifov] 
     422                 endif 
     423             endfor 
     424             ind=where(fov eq 1,smallfov) 
     425             if smallfov ne 0 then begin 
     426                 tb1[ind]=tbinit[ind] -correction_m[0] 
     427             endif 
     428             ind=where(fov ge fovmax,bigfov) 
     429             if bigfov ne 0 then begin 
     430                 tb1[ind]=tbinit[ind] -correction_m[fovmax-1] 
     431             endif 
    407432         endif 
    408          ind=where(fov ge fovmax,bigfov) 
    409          if bigfov ne 0 then begin 
    410             tb1[ind]=tbinit[ind] -correction_t[fovmax-1] 
    411         endif 
    412          for ifov=min(fov)+1,fovmax-1 do begin 
    413             ind=where(fov eq ifov and mask eq 0,nbfov) 
    414             if nbfov ne 0 then begin 
    415                tb1[ind]=tbinit[ind] -correction_m[ifov] 
    416             endif 
    417          endfor 
    418          ind=where(fov eq 1,smallfov) 
    419          if smallfov ne 0 then begin 
    420             tb1[ind]=tbinit[ind] -correction_m[0] 
    421          endif 
    422          ind=where(fov ge fovmax,bigfov) 
    423          if bigfov ne 0 then begin 
    424             tb1[ind]=tbinit[ind] -correction_m[fovmax-1] 
    425         endif 
    426  
    427  
    428 ;         print,'effet de la correction' 
    429 ;         print,'moyenne, min, max',mean(tb1-tbinit),min(tb1-tbinit),max(tb1-tbinit) 
    430433 
    431434         for i=0,nn-1 do begin 
  • trunk/src/extract_amsua.pro

    r570 r572  
    332332s = size(SCOPE_TRACEBACK(/STRUCTURE),/DIMENSION) 
    333333routine = (SCOPE_TRACEBACK(/STRUCTURE))[s-1].Routine 
    334 key_performance=0 
     334key_performance=1 
    335335 
    336336if key_performance EQ 1 THEN BEGIN 
     
    377377 
    378378IF key_performance EQ 1 THEN BEGIN 
    379     msg = report(['ppp : ' + routine + ' :  durï¿œe intermediaire demarrage boucle sur fichier ' $ 
     379    msg = report(['ppp : ' + routine + ' :  duree intermediaire demarrage boucle sur fichier ' $ 
    380380                   + string(SYSTIME(1)-time1,format='(F12.6)')]) 
    381381ENDIF 
     
    386386   COMMON amsua_data  ,ama_scan 
    387387   IF key_performance EQ 1 THEN BEGIN 
    388        msg = report(['ppp : ' + routine + ' : durï¿œe intermediaire ouverture et lecture du fichier' $ 
     388       msg = report(['ppp : ' + routine + ' : duree intermediaire ouverture et lecture du fichier' $ 
    389389                   + string(SYSTIME(1)-time1,format='(F12.6)')]) 
    390390   ENDIF 
     
    395395   na_fov=na[1]                 ; nb points dans la fauchee 
    396396   nbpix= na_fov 
    397    nosat=ama_head.h_satid       ; numero du satellite NOAA (15 a 19) 
     397   nosat=ama_head.h_satid       ; numero du satellite NOAA (15 a 19) ou METOP 2 
    398398   print,'NUMERO DU SATELLITE ',nosat 
    399399   print,'INSTRUMENT',ama_head.h_instrument 
     
    419419   midpix=fix(nbpix/2) 
    420420   amalong=REFORM(ama_scan.latlon[1,*,*]/1.E4) 
    421   print, 'amalong',amalong 
     421  ; print, 'amalong',amalong 
    422422   amalati=REFORM(ama_scan.latlon[0,*,*]/1.E4) 
    423423   amcha=REFORM(ama_scan.btemps[nocanal-1,*,*]/100.) 
     
    452452;      endelse 
    453453; 
    454 ; correction nadir des donnees 
     454; correction nadir des donnees. En principe le 17 est elimine des listes 
    455455         isat=0 
    456456         if nosat eq 15 then begin 
     
    507507                   + string(SYSTIME(1)-time1,format='(F12.6)')]) 
    508508        ENDIF 
    509         ; moych=fltarr(nbpix) 
    510 ;nfov=nbpix 
    511  
    512 ;moytb=fltarr(nfov) 
    513 ;sigtb=fltarr(nfov) 
    514 ;for ifov=0,nfov-1 do begin  
    515 ;   ind=where(landseamask[ifov,*] eq 1 ,nifov)  
    516 ;      moytb[ifov]=mean(ch_nadir[ifov,ind])  
    517 ;      sigtb[ifov]=stdev(ch_nadir[ifov,ind])  
    518 ;   endfor  
    519 ;window,2 
    520 ;plot,indgen(nfov)+1,moytb,psym=7,xstyle=1,ystyle=1,yrange=[min(moytb)-max(sigtb),max(moytb)+max(sigtb)] 
    521  
    522 ;errplot,moytb-sigtb,moytb+sigtb 
    523509 
    524510 
Note: See TracChangeset for help on using the changeset viewer.