Changeset 231 for trunk/SRC/ToBeReviewed/GRILLE/grille.pro
- Timestamp:
- 03/19/07 18:15:51 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/ToBeReviewed/GRILLE/grille.pro
r172 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 7 4 ; Choose the grid which must be used to do the graph in function of 8 5 ; vargrid and send back corresponding parameters calculated in 9 ; domdef.pro and reduced at the domain defined by domdef (contrarily10 ; to grandegrille.pro)11 ; BEWARE!! The choice of the grid is made from the value of the 6 ; <pro>domdef</pro> and reduced at the domain defined by 7 ; <pro>domdef</pro> (contrarily to <pro>grandegrille</pro>) 8 ; BEWARE!! The choice of the grid is made from the value of the 12 9 ; global variable vargrid, which can be equal to 'T', 'U', 'V', 'W' ou 'F'. 13 10 ; 14 11 ; @categories 15 12 ; 16 ; @keyword TRI 13 ; @keyword TRI 17 14 ; This keyword serve to obtain, thanks to grille, the triangulation which 18 15 ; refer to the grid but only on the part of the zoom. This of triangulation 19 16 ; is passed in the variable we have equate at TRI. 20 17 ; For example: grille,...,tri=triangulation_reduite. 21 ; This keyword is used in plt.pro18 ; This keyword is used in <pro>plt</pro>. 22 19 ; 23 20 ; @keyword WDEPTH 24 ; To specify that the field is at W depth instead of T 21 ; To specify that the field is at W depth instead of T 25 22 ; depth (automatically activated if vargrid eq 'W') 26 ; 23 ; 27 24 ; @keyword FORPLT 28 ; In plt, we want that land points, glam and gphi, be equal to glamt and 25 ; In <pro>plt</pro>, we want that land points, 26 ; glam and gphi, be equal to glamt and 29 27 ; gphit regardless of the grid. 30 28 ; 31 29 ; @keyword NOTRI 32 ; Useful only when TRI is activated. In this case, grill send back -1 in the 33 ; variable tri even if the variable of the common triangles_list is defined 30 ; Useful only when TRI is activated. In this case, grill send back -1 in the 31 ; variable tri even if the variable of the common triangles_list is defined 34 32 ; and different of-1 35 ; 36 ; @keyword _EXTRA 37 ; Used to pass yourkeywords33 ; 34 ; @keyword _EXTRA 35 ; Used to pass keywords 38 36 ; 39 37 ; @keyword TOUT 40 38 ; 41 39 ; @param MASK {out}{optional} 42 ; For the definition, see domdefand the management of subdomains on the web.43 ; 44 ; @param 45 ; For the definition, see domdefand the management of subdomains on the web.46 ; 47 ; @param 48 ; For the definition, see domdefand the management of subdomains on the web.49 ; 50 ; @param 51 ; For the definition, see domdefand the management of subdomains on the web.52 ; 53 ; @param 54 ; For the definition, see domdefand the management of subdomains on the web.55 ; 56 ; @param 57 ; For the definition, see domdefand the management of subdomains on the web.58 ; 59 ; @param 60 ; For the definition, see domdefand the management of subdomains on the web.61 ; 62 ; @param 63 ; For the definition, see domdefand the management of subdomains on the web.64 ; 65 ; @param 66 ; For the definition, see domdefand the management of subdomains on the web.67 ; 68 ; @param 69 ; For the definition, see domdefand the management of subdomains on the web.70 ; 40 ; For the definition, see <pro>domdef</pro> and the management of subdomains on the web. 41 ; 42 ; @param GLAM {out}{optional} 43 ; For the definition, see <pro>domdef</pro> and the management of subdomains on the web. 44 ; 45 ; @param GPHI {out}{optional} 46 ; For the definition, see <pro>domdef</pro> and the management of subdomains on the web. 47 ; 48 ; @param GDEP {out}{optional} 49 ; For the definition, see <pro>domdef</pro> and the management of subdomains on the web. 50 ; 51 ; @param NX {out}{optional} 52 ; For the definition, see <pro>domdef</pro> and the management of subdomains on the web. 53 ; 54 ; @param NY {out}{optional} 55 ; For the definition, see <pro>domdef</pro> and the management of subdomains on the web. 56 ; 57 ; @param NZ {out}{optional} 58 ; For the definition, see <pro>domdef</pro> and the management of subdomains on the web. 59 ; 60 ; @param FIRSTX {out}{optional} 61 ; For the definition, see <pro>domdef</pro> and the management of subdomains on the web. 62 ; 63 ; @param FIRSTY {out}{optional} 64 ; For the definition, see <pro>domdef</pro> and the management of subdomains on the web. 65 ; 66 ; @param FIRSTZ {out}{optional} 67 ; For the definition, see <pro>domdef</pro> and the management of subdomains on the web. 68 ; 71 69 ; @param LASTX {out}{optional} 72 ; For the definition, see domdefand the management of subdomains on the web.73 ; 74 ; @param 75 ; For the definition, see domdefand the management of subdomains on the web.76 ; 77 ; @param 78 ; For the definition, see domdefand the management of subdomains on the web.79 ; 80 ; @param 81 ; For the definition, see domdefand the management of subdomains on the web.82 ; 83 ; @param 84 ; For the definition, see domdefand the management of subdomains on the web.85 ; 86 ; @param 87 ; For the definition, see domdefand the management of subdomains on the web.70 ; For the definition, see <pro>domdef</pro> and the management of subdomains on the web. 71 ; 72 ; @param LASTY {out}{optional} 73 ; For the definition, see <pro>domdef</pro> and the management of subdomains on the web. 74 ; 75 ; @param LASTZ {out}{optional} 76 ; For the definition, see <pro>domdef</pro> and the management of subdomains on the web. 77 ; 78 ; @param E1 {out}{optional} 79 ; For the definition, see <pro>domdef</pro> and the management of subdomains on the web. 80 ; 81 ; @param E2 {out}{optional} 82 ; For the definition, see <pro>domdef</pro> and the management of subdomains on the web. 83 ; 84 ; @param E3 {out}{optional} 85 ; For the definition, see <pro>domdef</pro> and the management of subdomains on the web. 88 86 ; 89 87 ; @uses 90 ; cm_4mesh 88 ; cm_4mesh 91 89 ; cm_4data 92 90 ; 93 ; @restrictions 91 ; @restrictions 94 92 ; Use the variable vargrid 95 93 ; … … 103 101 ; 104 102 ; @version 105 ; $Id$ 106 ; 107 ; @todo Comment ecrire la remarque sur les inputs? 108 ; 103 ; $Id$ 104 ; 105 ; @todo 106 ; Comment ecrire la remarque sur les inputs? 107 ; 109 108 ;- 110 ;------------------------------------------------------------ 111 ;------------------------------------------------------------ 112 ;------------------------------------------------------------ 113 pro grille, mask, glam, gphi, gdep, nx, ny, nz, firstx, firsty, firstz, lastx, lasty, lastz, e1, e2, e3, TRI = tri, NOTRI = notri, TOUT = tout, FORPLT = forplt, TYPE = type, WDEPTH = wdepth, _EXTRA = ex 114 ;------------------------------------------------------------ 115 ; include commons 109 ; 110 PRO grille, mask, glam, gphi, gdep, nx, ny, nz, firstx, firsty, firstz, lastx, lasty, lastz, e1, e2, e3, TRI = tri, NOTRI = notri, TOUT = tout, FORPLT = forplt, TYPE = type, WDEPTH = wdepth, _EXTRA = ex 116 111 ; 117 112 compile_opt idl2, strictarrsubs … … 138 133 ;------------------------------------------------------------ 139 134 IF keyword_set(wdepth) THEN BEGIN 140 firstz = firstzw 135 firstz = firstzw 141 136 lastz = lastzw 142 137 nz = nzw … … 148 143 ;------------------------------------------------------------ 149 144 ;------------------------------------------------------------ 150 CASE 1 OF 145 CASE 1 OF 151 146 ;------------------------------------------------------------ 152 147 ; grid T and W … … 165 160 IF arg_present(e1) THEN e1 = e1t[firstx:lastx, firsty:lasty] 166 161 IF arg_present(e2) THEN e2 = e2t[firstx:lastx, firsty:lasty] 167 ;3d vectors 162 ;3d vectors 168 163 IF keyword_set(forplt) THEN mask = tmask[firstx:lastx, firsty:lasty, firstz] $ 169 164 ELSE IF arg_present(mask) THEN mask = tmask[firstx:lastx, firsty:lasty, firstz:lastz] … … 204 199 no1 = temporary(tmp1)*temporary(tmp2) 205 200 tmp = temporary(eastboarder)*temporary(no1)*mask 206 mask[0:nx-2, *] = 0b 201 mask[0:nx-2, *] = 0b 207 202 tmp = temporary(tmp)+temporary(mask) 208 203 tmp = where(tmp GE 1) … … 233 228 IF arg_present(glam) THEN glam = glamv[firstx:lastx, firsty:lasty] 234 229 IF arg_present(gphi) THEN gphi = gphiv[firstx:lastx, firsty:lasty] 235 if keyword_set(forplt) then BEGIN 230 if keyword_set(forplt) then BEGIN 236 231 mask = 1b-tmask[firstx:lastx, firsty:lasty, firstz] 237 232 northboarder = mask-shift(mask, 0, 1)*mask … … 271 266 ; grid F 272 267 ;------------------------------------------------------------ 273 vargrid eq 'OPAPTDHF' or vargrid eq 'OPAPT3DF' $ 268 vargrid eq 'OPAPTDHF' or vargrid eq 'OPAPT3DF' $ 274 269 or vargrid eq 'F': begin 275 270 ;scalars … … 283 278 IF arg_present(glam) THEN glam = glamf[firstx:lastx, firsty:lasty] 284 279 IF arg_present(gphi) THEN gphi = gphif[firstx:lastx, firsty:lasty] 285 if keyword_set(forplt) then BEGIN 280 if keyword_set(forplt) then BEGIN 286 281 mask = 1b-tmask[firstx:lastx, firsty:lasty, firstz] 287 282 eastboarder = mask-shift(mask, 1, 0)*mask … … 313 308 no1 = temporary(tmp1)*temporary(tmp2) 314 309 tmp = (temporary(northboarder)+temporary(eastboarder))*mask*temporary(no1) 315 mask[0:nx-2, *] = 0b 316 mask[*, 0:ny-2] = 0b 310 mask[0:nx-2, *] = 0b 311 mask[*, 0:ny-2] = 0b 317 312 tmp = temporary(tmp)+temporary(mask) 318 313 tmp = where(tmp GE 1) … … 324 319 IF arg_present(e1) THEN e1 = e1f[firstx:lastx, firsty:lasty] 325 320 IF arg_present(e2) THEN e2 = e2f[firstx:lastx, firsty:lasty] 326 ;3d vectors 321 ;3d vectors 327 322 IF keyword_set(forplt) THEN mask = (fmask())[firstx:lastx, firsty:lasty, firstz] $ 328 323 ELSE IF arg_present(mask) THEN mask = (fmask())[firstx:lastx, firsty:lasty, firstz:lastz] 329 324 END 330 325 ;------------------------------------------------------------ 331 ELSE:BEGIN 326 ELSE:BEGIN 332 327 ras = report('Wrong definition of vargrid = '+vargrid+'. Only T, U, V, W or F are acceptable') 333 328 stop … … 391 386 IF keyword_set(type) AND n_elements(romszinfos) NE 0 THEN BEGIN 392 387 romsdp = romsdepth() 393 IF romsdp[0] NE -1 THEN BEGIN 388 IF romsdp[0] NE -1 THEN BEGIN 394 389 IF jpt EQ 1 THEN BEGIN 395 390 CASE type OF … … 400 395 ELSE: 401 396 ENDCASE 402 ENDIF ELSE BEGIN 397 ENDIF ELSE BEGIN 403 398 CASE type OF 404 399 'z':gdep = moyenne(temporary(romsdp), 'xyt') … … 420 415 ;------------------------------------------------------------ 421 416 if arg_present(TRI) then $ 422 if triangles_list[0] EQ -1 OR keyword_set(notri) then tri = -1 ELSE BEGIN 417 if triangles_list[0] EQ -1 OR keyword_set(notri) then tri = -1 ELSE BEGIN 423 418 tempdeux = systime(1) ; pour key_performance =2 424 419 msk = bytarr(jpi, jpj) … … 444 439 445 440 if keyword_set(savedbox) THEN restoreboxparam, 'boxparam4grille.dat' 446 if keyword_set(key_performance) THEN print, 'temps grille', systime(1)-tempsun 441 if keyword_set(key_performance) THEN print, 'temps grille', systime(1)-tempsun 447 442 448 443 ;------------------------------------------------------------ 449 444 IF NOT keyword_set(key_forgetold) THEN BEGIN 450 445 @updateold 451 ENDIF 446 ENDIF 452 447 ;--------------------- 453 448 return 454 449 455 450 end 456 457 458 459 460 461 462
Note: See TracChangeset
for help on using the changeset viewer.