Changeset 142 for trunk/SRC/ToBeReviewed/GRILLE/grille.pro
- Timestamp:
- 07/21/06 14:47:49 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/ToBeReviewed/GRILLE/grille.pro
r134 r142 3 3 ;------------------------------------------------------------ 4 4 ;+ 5 ; NAME:grille 6 ; 7 ; PURPOSE: choisit la grille qui doit etre utilisee pour faire le graphe en 8 ; fonction de vargrid et renvoie les parametres correspondants calcules ds 9 ; domdef.pro et reduit au domaine definit par domdef (contrairement a 10 ; grandegrille.pro) 11 ; 12 ; CATEGORY: 13 ; 14 ; CALLING SEQUENCE: 15 ; grille,mask,glam,gphi,gdep,nx,ny,nz,firstx,firsty,firstz,lastx,lasty,lastz,e1,e2,e3 16 ; 17 ; INPUTS:rien. ATTENTION les choix de la grille se fait a partir de la 18 ; valeur de la variable globale vargrid, qui peut etre egale a 'T', 19 ; 'U', 'V', 'W' ou 'F'. 20 ; 21 ; KEYWORD PARAMETERS: 22 ; TRI si ce mot clef sert a obtenir grace a grille la 23 ; triangulation qui se rapporte a la grille mais uniquement 24 ; sur la partie du zoom. ce tableau de triangulation reduit 25 ; est passe ds la variable que l''on a egalee a tri.par ex: 26 ; grille,...,tri=triangulation_reduite. ne mot clef est 27 ; utilise dans plt.pro 28 ; 29 ; /FORPLT: ds plt on veut que sur les points terres, glam et 30 ; gphi soit egale a glamt et gphit quelle que soit la grille. 31 ; 32 ; /NOTRI: utile seulement qd TRI est active. dans ce cas 33 ; grille retourne -1 ds la variable tri meme si la variable du 34 ; common triangles_list est definie et differente de -1 35 ; 36 ; /WDEPTH: to specify that the field is at W depth instad of T 37 ; depth (automatically activated if vargrid eq 'W') 38 ; 39 ; OUTPUTS:mask,glam,gphi,gdep,nx,ny,nz,firstx,firsty,firstz, 40 ; lastx,lasty,lastz,e1,e2,e3 41 ; 42 ; pour leur definition cf domdef et la gestion des sous 43 ; domaines sur le web 44 ; 45 ; Rq: ces outputs sont optionnels, si je veux recuperer que 46 ; mask, glam et gphi il suffit de taper grille, mask, glam, gphi 47 ; 48 ; COMMON BLOCKS: cm_4mesh and cm_4data 49 ; 50 ; SIDE EFFECTS: utilise la variable globale vargird 51 ; 52 ; RESTRICTIONS: vargrid doit etre 'T', 'W', 'U', 'V' ou 'F' 53 ; 54 ; EXAMPLE: 55 ; 56 ; MODIFICATION HISTORY: Sebastien Masson (smasson@lodyc.jussieu.fr) 5 ; 6 ; @file_comments 7 ; Choose the grid which must be used to do the graph in function of 8 ; vargrid and send back corresponding parameters calculated in 9 ; domdef.pro and reduced at the domain defined by domdef (contrarily 10 ; to grandegrille.pro) 11 ; BEWARE!! The choice of the grid is made from the value of the 12 ; global variable vargrid, which can be equal to 'T', 'U', 'V', 'W' ou 'F'. 13 ; 14 ; @categories 15 ; 16 ; @keyword TRI 17 ; This keyword serve to obtain, thanks to grille, the triangulation which 18 ; refer to the grid but only on the part of the zoom. This of triangulation 19 ; is passed in the variable we have equate at TRI. 20 ; For example: grille,...,tri=triangulation_reduite. 21 ; This keyword is used in plt.pro 22 ; 23 ; @keyword WDEPTH 24 ; To specify that the field is at W depth instad of T 25 ; depth (automatically activated if vargrid eq 'W') 26 ; 27 ; @keyword FORPLT 28 ; In plt, we want that land points, glam and gphi, be equal to glamt and 29 ; gphit regardless of the grid. 30 ; 31 ; @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 34 ; and different of-1 35 ; 36 ; @keyword _EXTRA 37 ; Used to pass your keywords 38 ; 39 ; @keyword TOUT 40 ; 41 ; @param MASK {out}{optional} 42 ; For the definition, see domdef and the management of subdomains on the web. 43 ; 44 ; @param GLAM {out}{optional} 45 ; For the definition, see domdef and the management of subdomains on the web. 46 ; 47 ; @param GPHI {out}{optional} 48 ; For the definition, see domdef and the management of subdomains on the web. 49 ; 50 ; @param GDEP {out}{optional} 51 ; For the definition, see domdef and the management of subdomains on the web. 52 ; 53 ; @param NX {out}{optional} 54 ; For the definition, see domdef and the management of subdomains on the web. 55 ; 56 ; @param NY {out}{optional} 57 ; For the definition, see domdef and the management of subdomains on the web. 58 ; 59 ; @param NZ {out}{optional} 60 ; For the definition, see domdef and the management of subdomains on the web. 61 ; 62 ; @param FIRSTX {out}{optional} 63 ; For the definition, see domdef and the management of subdomains on the web. 64 ; 65 ; @param FIRSTY {out}{optional} 66 ; For the definition, see domdef and the management of subdomains on the web. 67 ; 68 ; @param FIRSTZ {out}{optional} 69 ; For the definition, see domdef and the management of subdomains on the web. 70 ; 71 ; @param LASTX {out}{optional} 72 ; For the definition, see domdef and the management of subdomains on the web. 73 ; 74 ; @param LASTY {out}{optional} 75 ; For the definition, see domdef and the management of subdomains on the web. 76 ; 77 ; @param LASTZ {out}{optional} 78 ; For the definition, see domdef and the management of subdomains on the web. 79 ; 80 ; @param E1 {out}{optional} 81 ; For the definition, see domdef and the management of subdomains on the web. 82 ; 83 ; @param E2 {out}{optional} 84 ; For the definition, see domdef and the management of subdomains on the web. 85 ; 86 ; @param E3 {out}{optional} 87 ; For the definition, see domdef and the management of subdomains on the web. 88 ; 89 ; @uses 90 ; cm_4mesh 91 ; cm_4data 92 ; 93 ; @restrictions 94 ; Use the variable vargrid 95 ; 96 ; @restrictions 97 ; Vargrid must be 'T', 'W', 'U', 'V' ou 'F' 98 ; 99 ; @history 100 ; Sebastien Masson (smasson@lodyc.jussieu.fr) 57 101 ; 12/2/1999 58 102 ; 10/11/1999 /forplt 103 ; 104 ; @version 105 ; $Id$ 106 ; 107 ; @todo Comment ecrire la remarque sur les inputs? 108 ; 59 109 ;- 60 110 ;------------------------------------------------------------ … … 73 123 ENDIF 74 124 ;--------------------- 75 tempsun = systime(1) ; pour key_performance125 tempsun = systime(1) ; For key_performance 76 126 ;------------------------------------------------------------ 77 127 vargrid = strupcase(strmid(vargrid,0,/reverse_offset)) … … 83 133 domdef, gridtype = vargrid, _EXTRA = ex 84 134 endif 85 tempdeux = systime(1) ; pour key_performance =2135 tempdeux = systime(1) ; For key_performance =2 86 136 ;------------------------------------------------------------ 87 137 ;------------------------------------------------------------ … … 99 149 CASE 1 OF 100 150 ;------------------------------------------------------------ 101 ; gri lleT and W151 ; grid T and W 102 152 ;------------------------------------------------------------ 103 153 vargrid eq 'T' OR vargrid eq 'W' : begin 104 ;scala ires154 ;scalars 105 155 nx = nxt 106 156 ny = nyt … … 109 159 lastx = lastxt 110 160 lasty = lastyt 111 ; vecteurs 2d161 ;2d vectors 112 162 IF arg_present(glam) THEN glam = glamt[firstx:lastx, firsty:lasty] 113 163 IF arg_present(gphi) THEN gphi = gphit[firstx:lastx, firsty:lasty] 114 164 IF arg_present(e1) THEN e1 = e1t[firstx:lastx, firsty:lasty] 115 165 IF arg_present(e2) THEN e2 = e2t[firstx:lastx, firsty:lasty] 116 ; vecteurs 3d166 ;3d vectors 117 167 IF keyword_set(forplt) THEN mask = tmask[firstx:lastx, firsty:lasty, firstz] $ 118 168 ELSE IF arg_present(mask) THEN mask = tmask[firstx:lastx, firsty:lasty, firstz:lastz] 119 169 end 120 170 ;------------------------------------------------------------ 121 ; gri lleU171 ; grid U 122 172 ;------------------------------------------------------------ 123 173 vargrid eq 'U': begin 124 ;scala ires174 ;scalars 125 175 nx = nxu 126 176 ny = nyu … … 129 179 lastx = lastxu 130 180 lasty = lastyu 131 ; vecteurs 2d181 ;2d vectors 132 182 IF arg_present(glam) THEN glam = glamu[firstx:lastx, firsty:lasty] 133 183 IF arg_present(gphi) THEN gphi = gphiu[firstx:lastx, firsty:lasty] … … 163 213 IF arg_present(e1) THEN e1 = e1u[firstx:lastx, firsty:lasty] 164 214 IF arg_present(e2) THEN e2 = e2u[firstx:lastx, firsty:lasty] 165 ; vecteurs 3d215 ;3d vectors 166 216 IF keyword_set(forplt) THEN mask = (umask())[firstx:lastx, firsty:lasty, firstz] $ 167 217 ELSE IF arg_present(mask) THEN mask = (umask())[firstx:lastx, firsty:lasty, firstz:lastz] 168 218 end 169 219 ;------------------------------------------------------------ 170 ; gri lleV220 ; grid V 171 221 ;------------------------------------------------------------ 172 222 vargrid eq 'OPAPTDHV' or vargrid eq 'OPAPT3DV' $ 173 223 or vargrid eq 'V': begin 174 ;scala ires224 ;scalars 175 225 nx = nxv 176 226 ny = nyv … … 179 229 lastx = lastxv 180 230 lasty = lastyv 181 ; vecteurs 2d231 ;2d vectors 182 232 IF arg_present(glam) THEN glam = glamv[firstx:lastx, firsty:lasty] 183 233 IF arg_present(gphi) THEN gphi = gphiv[firstx:lastx, firsty:lasty] … … 213 263 IF arg_present(e1) THEN e1 = e1v[firstx:lastx, firsty:lasty] 214 264 IF arg_present(e2) THEN e2 = e2v[firstx:lastx, firsty:lasty] 215 ; vecteurs 3d265 ;3d vecteurs 216 266 IF keyword_set(forplt) THEN mask = (vmask())[firstx:lastx, firsty:lasty, firstz] $ 217 267 ELSE IF arg_present(mask) THEN mask = (vmask())[firstx:lastx, firsty:lasty, firstz:lastz] 218 268 end 219 269 ;------------------------------------------------------------ 220 ; gri lleF270 ; grid F 221 271 ;------------------------------------------------------------ 222 272 vargrid eq 'OPAPTDHF' or vargrid eq 'OPAPT3DF' $ 223 273 or vargrid eq 'F': begin 224 ;scala ires274 ;scalars 225 275 nx = nxf 226 276 ny = nyf … … 229 279 lastx = lastxf 230 280 lasty = lastyf 231 ; vecteurs 2d281 ;2d vectors 232 282 IF arg_present(glam) THEN glam = glamf[firstx:lastx, firsty:lasty] 233 283 IF arg_present(gphi) THEN gphi = gphif[firstx:lastx, firsty:lasty] … … 273 323 IF arg_present(e1) THEN e1 = e1f[firstx:lastx, firsty:lasty] 274 324 IF arg_present(e2) THEN e2 = e2f[firstx:lastx, firsty:lasty] 275 ; vecteurs 3d325 ;3d vectors 276 326 IF keyword_set(forplt) THEN mask = (fmask())[firstx:lastx, firsty:lasty, firstz] $ 277 327 ELSE IF arg_present(mask) THEN mask = (fmask())[firstx:lastx, firsty:lasty, firstz:lastz] … … 289 339 ;------------------------------------------------------------ 290 340 ;------------------------------------------------------------ 291 ; Variables se rapportant a la dimension verticale292 ;------------------------------------------------------------ 293 ;------------------------------------------------------------ 294 ;------------------------------------------------------------ 295 ; 296 ; 297 tempdeux = systime(1) ; pour key_performance =2341 ; Variables refering to the vertical dimension 342 ;------------------------------------------------------------ 343 ;------------------------------------------------------------ 344 ;------------------------------------------------------------ 345 ; 346 ; 347 tempdeux = systime(1) ; For key_performance =2 298 348 if keyword_set(wdepth) then begin 299 349 gdep = gdepw[firstz:lastz] … … 340 390 print, 'temps grille: Variables se rapportant a la dimension verticale ', systime(1)-tempdeux 341 391 ;------------------------------------------------------------ 342 ; vecteur triangulation Qd TRI est active392 ; Triangulation vector when TRI is activated. 343 393 ;------------------------------------------------------------ 344 394 if arg_present(TRI) then $ … … 356 406 ENDELSE 357 407 ;------------------------------------------------------------------ 358 ; pour s'assurer qu'il n'y a pas de dimension degenerees(=1)359 ;------------------------------------------------------------------ -408 ; To make sure there is not any degenerated dimension (=1) 409 ;------------------------------------------------------------------ 360 410 ; mask=reform(mask, /over) 361 411 ; glam=reform(glam, /over)
Note: See TracChangeset
for help on using the changeset viewer.