Changeset 456 for trunk


Ignore:
Timestamp:
12/11/11 22:01:00 (13 years ago)
Author:
lelod
Message:

preparation vf de extract

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/extract_amsua.pro

    r451 r456  
    7777;   ${PROJECT_ID}/AMSU/2006/08/a5_20060801_060w30s_050e45n.dat must have been created. 
    7878; 
     79; TODO 
     80; 
     81; lelod 20111211 
     82; attention, il faut transformer les donnees 2D en 1D 
     83; reprendre methode "extract_amsuab", qui utilisait un "where"? 
     84; ou passer directement dans l'ecriture??? 
     85; 
    7986; :History: 
    8087; 
    8188; $Id$ 
    8289; 
     90; lelod 20111211 
     91; mis en commentaires la partie interpolation 
     92; prevu decodage de numch pour connaitre le nom instrument et le 
     93;numero du canal (pas fini, au debut) 
    8394; $URL: svn+ssh://lelod@forge.ipsl.jussieu.fr/ipsl/forge/projets/varamma/svn/trunk/src/extract_amsuab.pro $ 
    8495; 
    85 ; evolution (lelod, dec 2011) pour extraire amsua seul avec resolution 
    86 ; amelioree 
    8796; 
    8897; - fplod 20111209T125312Z aedon.locean-ipsl.upmc.fr (Darwin) 
     
    184193; 
    185194@cm_project 
    186  
    187 ;=================================== 
    188 ; fichier de sortie comportant les observations amsu 
    189 ; 
    190 ;==================================== 
     195nomcanal=strmid(numch,0,1) 
     196;nocanal=strmid(numch,1,1) 
     197;??????? passage en numerique 
     198nocanal=5 
    191199 
    192200 
     
    263271; latitude, et les Tbs des differents canaux (15 pour AMSUA) 
    264272 
    265     ;amch1=REFORM(ama_scan.btemps[0,*,*]/100.) 
    266    ; amch2=REFORM(ama_scan.btemps[1,*,*]/100.) 
    267     ;amch3=REFORM(ama_scan.btemps[2,*,*]/100.) 
    268    ; amch4=REFORM(ama_scan.btemps[3,*,*]/100.) 
    269    ; amch5=REFORM(ama_scan.btemps[4,*,*]/100.) 
    270    ; amch6=REFORM(ama_scan.btemps[5,*,*]/100.) 
    271    ; amch7=REFORM(ama_scan.btemps[6,*,*]/100.) 
    272    ; amch8=REFORM(ama_scan.btemps[7,*,*]/100.) 
    273    ; amch9=REFORM(ama_scan.btemps[8,*,*]/100.) 
    274    ; amch10=REFORM(ama_scan.btemps[9,*,*]/100.) 
    275    ; amch11=REFORM(ama_scan.btemps[10,*,*]/100.) 
    276    ; amch12=REFORM(ama_scan.btemps[11,*,*]/100.) 
    277    ; amch13=REFORM(ama_scan.btemps[12,*,*]/100.) 
    278    ; amch14=REFORM(ama_scan.btemps[13,*,*]/100.) 
    279    ; amch15=REFORM(ama_scan.btemps[14,*,*]/100.) 
    280273; extraction du canal traite 
    281     nocanal=5 
     274 
    282275    amch=REFORM(ama_scan.btemps[nocanal,*,*]/100.) 
    283276    amzen=REFORM(ama_scan.angles[0,*,*]/100.) 
     
    296289        desc=0 
    297290    endelse 
     291; attention tableaux a deux dimensions 
     292 
     293 
    298294 
    299295; appel a interpolswatw pour ajuster les pixels amsua sur une grille 
     
    301297; et selection de la zone conservee 
    302298;tek_color 
    303 resol=1 
     299;resol=1 
    304300;nbgrid=0 
    305 chint=fltarr(100) 
    306 latint=fltarr(100) 
    307 lonint=fltarr(100) 
    308 fovint=fltarr(100) 
    309 timeint=fltarr(100) 
    310 time=fltarr(100) 
     301;chint=fltarr(100) 
     302;latint=fltarr(100) 
     303;lonint=fltarr(100) 
     304;fovint=fltarr(100) 
     305;timeint=fltarr(100) 
     306;time=fltarr(100) 
    311307;n_scan-1L 
    312 for i=0L,10L do begin 
    313    tb=amch[*,i] 
    314    lon=amalon[*,i] 
    315    lat=amalat[*,i] 
     308;for i=0L,10L do begin 
     309;   tb=amch[*,i] 
     310;   lon=amalon[*,i] 
     311;   lat=amalat[*,i] 
    316312  ; nbgrid1=nbgrid 
    317    interpolswath,tb,lat,lon,resol,nbgrid,tbgrid,latgrid,longrid 
    318      if i eq 0L then begin 
     313;   interpolswath,tb,lat,lon,resol,nbgrid,tbgrid,latgrid,longrid 
     314;     if i eq 0L then begin 
    319315       ; plot,lon,tb,psym=1 
    320        ; oplot,longrid,tbgrid,psym=4 
    321         fovgrid=indgen(nbgrid)+1 
    322      endif 
     316       ; oplot,longrid,tbgrid,psym=4; 
     317;        fovgrid=indgen(nbgrid)+1 
     318;     endif 
    323319  ; if nbgrid ne nbgrid1 then begin 
    324320  ;    oplot,lon,tb,psym=1,color=3 
    325321   ;   oplot,longrid,tbgrid,psym=4,color=5 
    326322   ;   endif 
    327   zone=where((longrid ge lon_min) and (longrid le lon_max) $ 
    328              and (latgrid ge lat_min) and (latgrid le lat_max),npt) 
    329 print, 'npt', npt 
    330   if npt ne 0 then begin 
    331      time[zone]=tt[i] 
    332      chint=[chint,tbgrid[zone]] 
    333      latint=[latint,latgrid[zone]] 
    334      lonint=[lonint,longrid[zone]] 
    335      fovint=[fovint,fovgrid[zone]] 
    336      timeint=[timeint,time[zone]] 
    337   endif else begin 
    338      print, 'www : aucun point dans la zone' 
    339   endelse 
    340  
    341  endfor 
    342  
    343  if (npt ne 0) then begin 
    344  ; partie a remplacer par module ecriture standardise FP 
    345 ; 
     323;  zone=where((longrid ge lon_min) and (longrid le lon_max) $ 
     324;             and (latgrid ge lat_min) and (latgrid le lat_max),npt) 
     325;print, 'npt', npt 
     326;  if npt ne 0 then begin 
     327;     time[zone]=tt[i] 
     328;     chint=[chint,tbgrid[zone]] 
     329;     latint=[latint,latgrid[zone]] 
     330;     lonint=[lonint,longrid[zone]] 
     331;     fovint=[fovint,fovgrid[zone]] 
     332;     timeint=[timeint,time[zone]] 
     333;  endif else begin 
     334;     print, 'www : aucun point dans la zone' 
     335;  endelse 
     336 
     337; endfor 
     338 
     339 
     340 
    346341      ; replace missing values -9999.99 by NaN 
    347342  index_missing = where(chint EQ -9999.99, nb_missing) 
    348343  if (nb_missing NE 0) THEN BEGIN 
    349      chint[index_missing]=!values.f_nan 
     344     tb[index_missing]=!values.f_nan 
    350345  endif 
    351346; param landseamask mis fictivement pour unification du format 
    352347        landseamask=!values.f_nan 
    353 nn=max(size(chint)) 
     348 
    354349print,'nb points dans la zone',nn 
    355350 
     
    376371                          , landseamask: 9$ 
    377372                          , tb : chint[i] $ 
    378                        }] 
    379          endelse 
    380      endfor 
    381   endif else begin 
    382      print, 'www : 2 aucun point dans la zone' 
    383   endelse 
     373 
    384374 
    385375; fin boucle sur les fichiers lus 
Note: See TracChangeset for help on using the changeset viewer.