Changeset 476 for trunk


Ignore:
Timestamp:
12/18/11 23:24:49 (12 years ago)
Author:
lelod
Message:

enlever ligne perimee mais encore bug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/cresamsu.pro

    r475 r476  
    224224testfilename='' 
    225225; lecture des fichiers 
    226    for yyyy=yyyyb,yyyye do begin 
    227       for mm=mmb,mme do begin 
    228          for dd=ddb,dde do begin 
     226for yyyy=yyyyb,yyyye do begin 
     227   for mm=mmb,mme do begin 
     228      for dd=ddb,dde do begin 
    229229; ouverture fichier journalier 
    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 
     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 
    240240            ; decodage du nb de points (nn) 
    241             nn=n_elements(tb1) 
     241         nn=n_elements(tb1) 
    242242; egalement aussi des bornes en lon / lat (a retirer des parametres d'entree)++ 
    243243 
    244244; boucle sur les points du fichier 
    245245 
    246             for i=0,nn do begin 
     246         for i=0,nn do begin 
    247247 
    248248; recup de tb1,hour,lon,lat 
    249                if (tb1[i] ge tbmin and tb1[i] le tbmax) then begin 
     249            if (tb1[i] ge tbmin and tb1[i] le tbmax) then begin 
    250250;if  ((tb1 lt tbmin) or (tb1 gt tbmax)) then goto,suite0 ;; on ne s interesse pas aux donnees aberrantes 
    251251; a remplacer par if tb1 ne Nan then begin 
    252252;if (cont lt 10) then print,lon,lat,fov,tb1,hour 
    253253; test sur le debut et la fin des donnes utiles tenant compte du rayon temporel 
    254                   jour=julday(mm,dd,yyyy,0)*24.+hour[i] ; en heures decimales 
     254               jour=julday(mm,dd,yyyy,0)*24.+hour[i] ; en heures decimales 
    255255                                ;if (cont lt 10) then print,mm,dd,yyyy,'jour julien lu (en heure)',jour 
    256                   if ((jour ge hrdeb-rtemphor) and (jour le hrfin+rtemphor) and (hour[i] le hfin) and (hour[i] ge hdeb) ) then begin 
     256               if ((jour ge hrdeb-rtemphor) and (jour le hrfin+rtemphor) and (hour[i] le hfin) and (hour[i] ge hdeb) ) then begin 
    257257                                ; print,'on cherche les donnees dans la fenetre temporelle' 
    258258                                ; utilisation seulement des orbites du 
    259259                                ; matin - projet heat low 
    260260                                ; grilles temporelle et spatiale utile 
    261                      jdp=fix((jour-hrdeb-rtemphor)/pasthor)>0 
    262                      jfn=fix((jour-hrdeb+rtemphor)/pasthor)+1<jmax 
     261                  jdp=fix((jour-hrdeb-rtemphor)/pasthor)>0 
     262                  jfn=fix((jour-hrdeb+rtemphor)/pasthor)+1<jmax 
    263263                                ;print,'grille utile temporelle',jdp,jfn 
    264                      kdp=fix((lon-lo1-rhdeg)/pash)>0 
    265                      kfn=fix((lon-lo1+rhdeg)/pash)+1<kmax 
    266                      ldp=fix((lat-la1-rhdeg)/pash)>0 
    267                      lfn=fix((lat-la1+rhdeg)/pash)+1<lmax 
     264                  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 
    268268                                ;print,'grille spatiale utile', kdp,kfn,ldp,lfn 
    269269                                ; 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) 
    277276                                ; boucle pour le calcul des contributions aux points de la grille 
    278277                                ; (los, las, t) 
    279                         for nj=jdp,jfn do begin 
    280                            dij=(jour-t[nj])/rtemphor ; normalisee par le rayon de Cressmann 
    281                            disj=dij*dij 
    282                            for l=ldp,lfn do begin 
    283                               coco=coyy*cos(las[l]) 
    284                               sisi=siyy*sin(las[l]) 
    285                               for k=kdp,kfn do begin 
    286                                  xxs=los[k] 
    287                                  ang=coco*(coxx*cos(xxs)+sixx*sin(xxs))+sisi 
    288                                  vv=ang 
    289                                  ac=acos(vv) 
    290                                  dist=rterre*rterre*ac*ac/r2 
    291                                  if (dist lt 1. and disj lt 1.) then begin 
    292                                     rnorm=2. 
    293                                     poids=(rnorm-dist-disj)/(rnorm+dist+disj) 
    294                                     stb1[k,l,nj]=stb1[k,l,nj]+tb1*poids 
    295                                     z1[k,l,nj]=z1[k,l,nj]+poids 
    296                                     kont1[k,l,nj]=kont1[k,l,nj]+1 
     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 
    297296                                ; print,kont1[k,l,nj] 
    298                                  endif 
    299                               endfor 
    300                            endfor 
     297                           endif 
    301298                        endfor 
    302                      endif 
    303                   endif 
    304                endif            ; fin test donnees Nan 
    305             endfor 
     299                     endfor 
     300                  endfor 
     301               endif 
     302            endif 
     303         endfor 
     304          
    306305           ; fin lecture donnees fichier journalier 
    307          endfor 
    308306      endfor 
    309307   endfor 
     308endfor 
     309 
    310310; fin boucle sur le temps 
    311311 
     
    329329jpie = n_elements(xxe) 
    330330jpje = n_elements(yye) 
     331maskfin=fltarr(nblon,nblat) 
    331332maskfin=interpolate(bate,indgen(nblon),indgen(nblat),/grid) 
    332333ind=where(maskfin gt 0.5,nland) 
    333 if nland ne 0 then maskfin(ind)=1 
     334if nland ne 0 then begin 
     335   maskfin(ind)=1 
     336endif 
    334337ind=where(maskfin le 0.5,nsea) 
    335 if nsea ne 0 then  maskfin(ind)=0 
    336  
     338if nsea ne 0 then begin 
     339   maskfin(ind)=0 
     340endif 
    337341;toto=reform(tb1fin[*,*,0]) 
    338342                                ;plt,xxlon,yylat,toto 
Note: See TracChangeset for help on using the changeset viewer.