- Timestamp:
- 01/04/12 11:42:48 (12 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/amsu2ncdf.pro
r415 r477 249 249 ;domaine -25 0 W, 0 - 20 N 250 250 ; 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'251 filemsgref=project_id_env + '/EPSAT/extracted-surf-rr_epsat-sg_multi-sat_010d_30min_20060801_v3.1-02c.nc' 252 252 print, 'Lecture de la grille reguliere ',filemsgref 253 253 reggrid=read_regular_grid(filemsgref) -
trunk/src/cresamsu.pro
r476 r477 56 56 ; aligner lal/lon de l'exemple sur les autres modules amsu 57 57 ; 58 ; lelod 2011/12/1559 ; modifier la creation du ncdf pour ajouter la variable "mask"60 ;61 58 ; lelod 2011/10/24 62 59 ; actuellement codes en dur … … 147 144 148 145 ; rayons de cressmann 149 rhor= 60. ; en gros deux fois la resol de AMSUB, et proche de celle d'AMSUA146 rhor=120. ; en gros deux fois la resol de AMSUA 150 147 rtemp=0.5 ;en jours rayon de Cressmann (0.25, 0.5, 1, 2,... - nb entiers!) 151 148 r2=rhor*rhor … … 244 241 ; boucle sur les points du fichier 245 242 246 for i=0,nn do begin243 for i=0,nn-1 do begin 247 244 248 245 ; recup de tb1,hour,lon,lat … … 256 253 if ((jour ge hrdeb-rtemphor) and (jour le hrfin+rtemphor) and (hour[i] le hfin) and (hour[i] ge hdeb) ) then begin 257 254 ; 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 260 256 ; grilles temporelle et spatiale utile 261 257 jdp=fix((jour-hrdeb-rtemphor)/pasthor)>0 … … 291 287 rnorm=2. 292 288 poids=(rnorm-dist-disj)/(rnorm+dist+disj) 293 stb1[k,l,nj]=stb1[k,l,nj]+tb1 *poids289 stb1[k,l,nj]=stb1[k,l,nj]+tb1[i]*poids 294 290 z1[k,l,nj]=z1[k,l,nj]+poids 295 291 kont1[k,l,nj]=kont1[k,l,nj]+1 … … 301 297 endif 302 298 endif 299 ; fin test sur donnees valides (inutil normalement) 303 300 endfor 304 301 … … 321 318 print,'extremes du compteur',min(kont1),max(kont1) 322 319 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 0327 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 begin335 maskfin(ind)=1336 endif337 ind=where(maskfin le 0.5,nsea)338 if nsea ne 0 then begin339 maskfin(ind)=0340 endif341 320 ;toto=reform(tb1fin[*,*,0]) 342 321 ;plt,xxlon,yylat,toto 343 idl_amsu_netcdf, numch, tb1fin, yylat, xxlon, jjours , maskfin344 345 346 322 idl_amsu_netcdf, numch, tb1fin, yylat, xxlon, jjours 323 324 325 print,'fin cresamsu' 347 326 end -
trunk/src/extract_amsua.pro
r471 r477 422 422 ; selection des taches au sol situees dans la zone d'interet 423 423 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) 425 425 if npt ne 0 then begin 426 426 if (n_elements(chint) EQ 0) then begin … … 450 450 451 451 nn=n_elements(chint) 452 ; for i=0L, npt-1L do begin453 ; if (( chint[i] lt tbmin) or (chint[i] gt tbmax) ) then begin454 ; chint[i]=!values.f_nan455 ; endif456 ; endfor457 458 452 459 453 print,'nb points dans la zone',nn -
trunk/src/idl_amsu_netcdf.pro
r475 r477 27 27 ; lats [shape=tab, label="latitude 1d array"] 28 28 ; timesin [shape=tab, label="time 1d array"] 29 ; maskin [shape=tab, label="landseamask 3d array lon, lat, time"]30 29 ; 31 30 ; amsu_t5 [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/AMSU/numch_yyyymmdd_yyyymmdd_geomin_geomax.nc"]; … … 51 50 ; IDL> timesin = indgen(12) + julday(8,1,2006L) 52 51 ; 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 55 53 ; 56 54 ; SEE ALSO … … 100 98 ; - fplod 20111216T160934Z cratos (Linux) 101 99 ; 102 ; * add maskin in the example and graph103 100 ; * add a print to see filename on log 104 101 ; * fix landseamask unit … … 130 127 ; 131 128 ;- 132 pro idl_amsu_netcdf, numch, datain, lats, lons, timesin , maskin129 pro idl_amsu_netcdf, numch, datain, lats, lons, timesin 133 130 ; 134 131 compile_opt idl2, strictarrsubs … … 161 158 ; definition des tableaux qui vont contenir les valeurs des fichiers ascii 162 159 moyenne_tb = fltarr(nblon, nblat, nbtime) 163 landseamask= intarr(nblon, nblat)164 160 xlon = fltarr(nblon) 165 161 ylat = fltarr(nblat) … … 167 163 ; 168 164 moyenne_tb[*,*,*] = datain[*,*,*] 169 landseamask[*,*] = maskin[*,*]170 165 xlon[*] = lons 171 166 ylat[*] = lats … … 173 168 ; 174 169 ; masque des valeurs aberrantes 175 ind = where((moyenne_tb le 0L) OR (moyenne_tb GT 350L), nnbad) 170 ind = where(finite(moyenne_tb,/nan), nnbad) 171 if nnbad ne 0 then begin 172 moyenne_tb[ind]=-9999. 173 endif 176 174 print,"nb valeurs manquantes", nnbad 177 175 ; … … 192 190 ncdf_attput, id, 'File_Name', cdfout, /GLOBAL 193 191 ncdf_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 196 196 ; 197 197 ; declaration des variables 198 varid = lonarr( 5)198 varid = lonarr(4) 199 199 varid[0] = ncdf_vardef(id, 'xlon', [dimidx], /double) 200 200 varid[1] = ncdf_vardef(id, 'ylat', [dimidy], /double) 201 201 varid[2] = ncdf_vardef(id, 'time', [dimidt], /double) 202 202 varid[3] = ncdf_vardef(id, 'moyenne_tb',[dimidx,dimidy,dimidt], /float) 203 varid[4] = ncdf_vardef(id, 'landseamask',[dimidx,dimidy,dimidt], /short)204 203 ; 205 204 ; attributs de chaque variable … … 212 211 ncdf_attput, id, varid[3], 'time_origin', '2000-01-01 00:00:00' 213 212 ncdf_attput, id, varid[3], 'short_name', 'amsu_tb' 214 ncdf_attput, id, varid[3], 'missing_value', '-999 '213 ncdf_attput, id, varid[3], 'missing_value', '-9999.00' 215 214 ncdf_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)'218 215 ; 219 216 ; remplissage de l'entete … … 225 222 ; remplissage des variables 226 223 ncdf_varput, id, varid[3], moyenne_tb 227 ncdf_varput, id, varid[4], landseamask228 224 ; 229 225 ; fermeture du fichier
Note: See TracChangeset
for help on using the changeset viewer.