Changeset 594


Ignore:
Timestamp:
07/23/12 15:06:54 (12 years ago)
Author:
lelod
Message:

adaptation de cresamsu a amsub

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/cresamsu.pro

    r593 r594  
    234234   hdeb=0 
    235235   hfin=24                      ; on prend toutes les orbites de la journee (regule par rtemp)   
    236    if rtemp eq 0.5 then pastemp=0.5 
    237236   if rtemp gt 0.5 then pastemp=1 
    238    if rtemp lt 0.5 then pastemp=0.25 
     237   if rtemp le 0.5 then pastemp=0.5 
     238   if rtemp le 0.175 then pastemp=0.25 
    239239endif 
    240240pasthor=pastemp*24. 
     
    510510 
    511511if nbfile GT 0 THEN BEGIN 
    512     good=where (kont1 ge 1,nb) 
     512    good=where (kont1 ge 3,nb) 
    513513    msg = report(['iii : ' + routine + ' : points valides = ' + string(nb)]) 
    514514    if (nb ne 0) then tb1fin[good]=stb1[good]/z1[good] 
     
    519519    msg = report(['iii : ' + routine + ' : extremes du compteur = ' + string(min(kont1)) + ' ' + string(max(kont1))]) 
    520520 
    521     result=idl_amsu_netcdf(numch, temp,rtemp,rhdeg, tb1fin, yylat, xxlon, jjours) 
     521    result=idl_amsu_netcdf(numch, temp,rtemp,rhdeg, tb1fin,z1, yylat, xxlon, jjours) 
    522522    result_type=size(result,/type) 
    523523    IF (result_type EQ 3) THEN BEGIN 
  • trunk/src/idl_amsu_netcdf.pro

    r544 r594  
    163163; 
    164164;- 
    165 function idl_amsu_netcdf, numch, temp, rtemp, rhdeg, datain, lats, lons, timesin 
     165function idl_amsu_netcdf, numch, temp, rtemp, rhdeg, datain, weight, lats, lons, timesin 
    166166; 
    167167compile_opt idl2, strictarrsubs 
     
    220220; dans les fichiers NetCDF 
    221221moyenne_tb = fltarr(nblon, nblat, nbtime) 
     222poids = fltarr(nblon, nblat, nbtime) 
    222223xlon = fltarr(nblon) 
    223224ylat = fltarr(nblat) 
     
    225226; 
    226227moyenne_tb[*,*,*] = datain[*,*,*] 
     228poids[*,*,*] = weight[*,*,*] 
    227229xlon[*] = lons 
    228230ylat[*] = lats 
     
    233235if nnbad ne 0 then begin 
    234236   moyenne_tb[ind]=-9999. 
     237   poids[ind]=-9999. 
    235238endif 
    236239msg = report(['iii : ' + routine + ' : nb valeurs manquantes = ' + string(nnbad)]) 
     
    268271; 
    269272; declaration des variables 
    270 varid = lonarr(4) 
     273varid = lonarr(5) 
    271274varid[0] = ncdf_vardef(id, 'xlon', [dimidx], /float) 
    272275varid[1] = ncdf_vardef(id, 'ylat', [dimidy], /float) 
    273276varid[2] = ncdf_vardef(id, 'time', [dimidt], /float) 
    274277varid[3] = ncdf_vardef(id, 'moyenne_tb',[dimidx,dimidy,dimidt], /float) 
     278varid[4] = ncdf_vardef(id, 'poids',[dimidx,dimidy,dimidt], /float) 
    275279; 
    276280; attributs de chaque variable 
     
    291295ncdf_attput, id, varid[3], 'unit', 'degree_kelvin' 
    292296; 
     297ncdf_attput, id, varid[4], 'short_name', 'poids' 
     298ncdf_attput, id, varid[4], 'missing_value', -9999.00 
     299ncdf_attput, id, varid[4], 'unit', 'valeur entre 0 et 1' 
     300 
    293301; remplissage de l'entete 
    294302ncdf_control, id, /endef 
     
    299307; remplissage des variables 
    300308ncdf_varput, id, varid[3], moyenne_tb 
     309ncdf_varput, id, varid[4], poids 
    301310; 
    302311; fermeture du fichier 
Note: See TracChangeset for help on using the changeset viewer.