Changeset 477 for trunk


Ignore:
Timestamp:
01/04/12 11:42:48 (12 years ago)
Author:
lelod
Message:

ca marche???

Location:
trunk/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/amsu2ncdf.pro

    r415 r477  
    249249;domaine -25 0 W, 0 - 20 N 
    250250; old grid filemsgref=project_id_env + '/MSG/2006/08/01/200608010000_msg-tb108_map_15min.nc' 
    251 filemsgref=project_id_env + '/MSG/2006/06/01/msg_IR108_20060601.nc' 
     251filemsgref=project_id_env + '/EPSAT/extracted-surf-rr_epsat-sg_multi-sat_010d_30min_20060801_v3.1-02c.nc' 
    252252print, 'Lecture de la grille reguliere ',filemsgref 
    253253reggrid=read_regular_grid(filemsgref) 
  • trunk/src/cresamsu.pro

    r476 r477  
    5656; aligner lal/lon de l'exemple sur les autres modules amsu 
    5757; 
    58 ; lelod 2011/12/15 
    59 ; modifier la creation du ncdf pour ajouter la variable "mask" 
    60 ; 
    6158; lelod 2011/10/24 
    6259; actuellement codes en dur 
     
    147144 
    148145; rayons de cressmann 
    149 rhor=60. ; en gros deux fois la resol de AMSUB, et proche de celle d'AMSUA 
     146rhor=120. ; en gros deux fois la resol de AMSUA 
    150147rtemp=0.5 ;en jours rayon de Cressmann (0.25, 0.5, 1, 2,... - nb entiers!) 
    151148r2=rhor*rhor 
     
    244241; boucle sur les points du fichier 
    245242 
    246          for i=0,nn do begin 
     243         for i=0,nn-1 do begin 
    247244 
    248245; recup de tb1,hour,lon,lat 
     
    256253               if ((jour ge hrdeb-rtemphor) and (jour le hrfin+rtemphor) and (hour[i] le hfin) and (hour[i] ge hdeb) ) then begin 
    257254                                ; print,'on cherche les donnees dans la fenetre temporelle' 
    258                                 ; utilisation seulement des orbites du 
    259                                 ; matin - projet heat low 
     255                                ; utilisation seulement des orbites du matin - projet heat low 
    260256                                ; grilles temporelle et spatiale utile 
    261257                  jdp=fix((jour-hrdeb-rtemphor)/pasthor)>0 
     
    291287                              rnorm=2. 
    292288                              poids=(rnorm-dist-disj)/(rnorm+dist+disj) 
    293                               stb1[k,l,nj]=stb1[k,l,nj]+tb1*poids 
     289                              stb1[k,l,nj]=stb1[k,l,nj]+tb1[i]*poids 
    294290                              z1[k,l,nj]=z1[k,l,nj]+poids 
    295291                              kont1[k,l,nj]=kont1[k,l,nj]+1 
     
    301297               endif 
    302298            endif 
     299; fin test sur donnees valides (inutil normalement) 
    303300         endfor 
    304301          
     
    321318print,'extremes du compteur',min(kont1),max(kont1) 
    322319 
    323 ; recreation du masque en 2D. On pourrait le deplacer dans idl_amsu_netcdf? 
    324 file=project_id_env+'/MASK/ETOPO1_Ice_g_gmt4.nc' 
    325 domdef,min(xxlon), max(xxlon), min(yylat), max(yylat) 
    326 bate = ncdf_lec(file, var = 'z') GT 0 
    327 xxe = float(ncdf_lec(file, var = 'lon')) 
    328 yye = float(ncdf_lec(file, var = 'lat')) 
    329 jpie = n_elements(xxe) 
    330 jpje = n_elements(yye) 
    331 maskfin=fltarr(nblon,nblat) 
    332 maskfin=interpolate(bate,indgen(nblon),indgen(nblat),/grid) 
    333 ind=where(maskfin gt 0.5,nland) 
    334 if nland ne 0 then begin 
    335    maskfin(ind)=1 
    336 endif 
    337 ind=where(maskfin le 0.5,nsea) 
    338 if nsea ne 0 then begin 
    339    maskfin(ind)=0 
    340 endif 
    341320;toto=reform(tb1fin[*,*,0]) 
    342321                                ;plt,xxlon,yylat,toto 
    343 idl_amsu_netcdf, numch, tb1fin, yylat, xxlon, jjours, maskfin 
    344  
    345  
    346  
     322idl_amsu_netcdf, numch, tb1fin, yylat, xxlon, jjours 
     323 
     324 
     325print,'fin cresamsu' 
    347326end 
  • trunk/src/extract_amsua.pro

    r471 r477  
    422422; selection des taches au sol situees dans la zone d'interet 
    423423         zone=where((longrid ge lon_min) and (longrid le lon_max) $ 
    424                     and (latgrid ge lat_min) and (latgrid le lat_max) and (tbgrid gt tbmin), npt) 
     424                    and (latgrid ge lat_min) and (latgrid le lat_max) and (tbgrid gt tbmin) and (tbgrid lt tbmax), npt) 
    425425         if npt ne 0 then begin 
    426426            if (n_elements(chint) EQ 0) then begin 
     
    450450 
    451451   nn=n_elements(chint) 
    452  ;  for i=0L, npt-1L do begin 
    453  ;     if (( chint[i] lt tbmin) or (chint[i] gt tbmax) ) then begin 
    454  ;        chint[i]=!values.f_nan 
    455  ;     endif 
    456  ;  endfor 
    457  
    458452 
    459453   print,'nb points dans la zone',nn 
  • trunk/src/idl_amsu_netcdf.pro

    r475 r477  
    2727;           lats [shape=tab, label="latitude 1d array"] 
    2828;           timesin [shape=tab, label="time 1d array"] 
    29 ;           maskin [shape=tab, label="landseamask 3d array lon, lat, time"] 
    3029; 
    3130;           amsu_t5 [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/AMSU/numch_yyyymmdd_yyyymmdd_geomin_geomax.nc"]; 
     
    5150;   IDL> timesin = indgen(12) + julday(8,1,2006L) 
    5251;   IDL> datain = findgen(size(lons,/dim), size(lats,/dim), size(timesin,/dim)) 
    53 ;   IDL> maskin = findgen(size(lons,/dim), size(lats,/dim)) 
    54 ;   IDL> idl_amsu_netcdf, numch , datain, lats, lons, timesin, maskin 
     52;   IDL> idl_amsu_netcdf, numch , datain, lats, lons, timesin 
    5553; 
    5654; SEE ALSO 
     
    10098; - fplod 20111216T160934Z cratos (Linux) 
    10199; 
    102 ;   * add maskin in the example and graph 
    103100;   * add a print to see filename on log 
    104101;   * fix landseamask unit 
     
    130127; 
    131128;- 
    132 pro idl_amsu_netcdf, numch, datain, lats, lons, timesin, maskin 
     129pro idl_amsu_netcdf, numch, datain, lats, lons, timesin 
    133130; 
    134131compile_opt idl2, strictarrsubs 
     
    161158; definition des tableaux qui vont contenir les valeurs des fichiers ascii 
    162159moyenne_tb = fltarr(nblon, nblat, nbtime) 
    163 landseamask= intarr(nblon, nblat) 
    164160xlon = fltarr(nblon) 
    165161ylat = fltarr(nblat) 
     
    167163; 
    168164moyenne_tb[*,*,*] = datain[*,*,*] 
    169 landseamask[*,*] = maskin[*,*] 
    170165xlon[*] = lons 
    171166ylat[*] = lats 
     
    173168; 
    174169; masque des valeurs aberrantes 
    175 ind = where((moyenne_tb le 0L) OR (moyenne_tb GT 350L), nnbad) 
     170ind = where(finite(moyenne_tb,/nan), nnbad) 
     171if nnbad ne 0 then begin 
     172   moyenne_tb[ind]=-9999. 
     173endif 
    176174print,"nb valeurs manquantes", nnbad 
    177175; 
     
    192190ncdf_attput, id, 'File_Name', cdfout, /GLOBAL 
    193191ncdf_attput, id, 'IDL_Program_Name', 'idl_amsu_netcdf', /GLOBAL 
    194 creation_date = string(jul2date(SYSTIME( /JULIAN , /UTC )), format='(I8)') 
    195 ncdf_attput, id, 'Creation_date', creation_date, /GLOBAL 
     192;print,'creation date' 
     193;creation_date = string(jul2date(SYSTIME(/JULIAN, /UTC )), format='(I8)') 
     194;ncdf_attput, id, 'Creation_date', creation_date, /GLOBAL 
     195;print,creation_date 
    196196; 
    197197; declaration des variables 
    198 varid = lonarr(5) 
     198varid = lonarr(4) 
    199199varid[0] = ncdf_vardef(id, 'xlon', [dimidx], /double) 
    200200varid[1] = ncdf_vardef(id, 'ylat', [dimidy], /double) 
    201201varid[2] = ncdf_vardef(id, 'time', [dimidt], /double) 
    202202varid[3] = ncdf_vardef(id, 'moyenne_tb',[dimidx,dimidy,dimidt], /float) 
    203 varid[4] = ncdf_vardef(id, 'landseamask',[dimidx,dimidy,dimidt], /short) 
    204203; 
    205204; attributs de chaque variable 
     
    212211ncdf_attput, id, varid[3], 'time_origin', '2000-01-01 00:00:00' 
    213212ncdf_attput, id, varid[3], 'short_name', 'amsu_tb' 
    214 ncdf_attput, id, varid[3], 'missing_value', '-999' 
     213ncdf_attput, id, varid[3], 'missing_value', '-9999.00' 
    215214ncdf_attput, id, varid[3], 'unit', 'degree_kelvin' 
    216 ncdf_attput, id, varid[4], 'short_name', 'mask' 
    217 ncdf_attput, id, varid[4], 'unit', 'number (0 ocean, 1 land)' 
    218215; 
    219216; remplissage de l'entete 
     
    225222; remplissage des variables 
    226223ncdf_varput, id, varid[3], moyenne_tb 
    227 ncdf_varput, id, varid[4], landseamask 
    228224; 
    229225; fermeture du fichier 
Note: See TracChangeset for help on using the changeset viewer.