Changeset 142 for trunk/SRC/ToBeReviewed/GRILLE
- Timestamp:
- 07/21/06 14:47:49 (18 years ago)
- Location:
- trunk/SRC/ToBeReviewed/GRILLE
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/ToBeReviewed/GRILLE/changegrid.pro
r134 r142 1 ;+ 2 ; 3 ; @todo seb 4 ; 5 ;- 1 6 function changegrid, newgrid 2 7 ; -
trunk/SRC/ToBeReviewed/GRILLE/cmpgrid.pro
r134 r142 1 ;+ 2 ; 3 ; @todo seb 4 ; 5 ;- 1 6 FUNCTION cmpgrid, newgrid 2 7 ; -
trunk/SRC/ToBeReviewed/GRILLE/decoupeterre.pro
r134 r142 3 3 ;------------------------------------------------------------ 4 4 ;+ 5 ; NAME:decoupeterre 6 ; 7 ; PURPOSE:tres semblable a grille. Ici qd vargrid ne 'T' ou 'W' alors 8 ; pour le trace il faut recuperer Tmask, glamt, gphit et le tableau de 9 ; triangulation sur le sous domaine considere. La specificite de 10 ; decoupeterre par rapport a grille, c''est que l''on prend ds la 11 ; mesure du possible un sous domaine juste un peu plus grand que celui 12 ; definit par domdef de facon a etre sur que le masque que l''on trace 13 ; recouvrira bien tout le dessin. 14 ; 15 ; CATEGORY:pour plt 16 ; 17 ; CALLING SEQUENCE:decoupeterre, mask, glam, gphi, z, nx, ny, nz, TRI = tri 18 ; 19 ; INPUTS: 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 ; /WDEPTH: to specify that the field is at W depth instad of T 30 ; depth (automatically activated if vargrid eq 'W') 31 ; 32 ; 33 ; OUTPUTS:le masque et ses coordonnees 34 ; 35 ; COMMON BLOCKS: 36 ; common.pro 37 ; 38 ; SIDE EFFECTS: 39 ; 40 ; RESTRICTIONS: 41 ; 42 ; EXAMPLE: 43 ; 44 ; MODIFICATION HISTORY: Sebastien Masson (smasson@lodyc.jussieu.fr) 5 ; 6 ; @file_comments 7 ; Similar to grille. Here, when vargrid is not 'T' or 'W', we have to 8 ; recuperate Tmask, glamt, gphit and the array of triangulation on the 9 ; considerated subdomain for the drawing. The specificity of decoupeterre 10 ; in comparaison with grille, is that we take, if possible, a subdomain 11 ; just a little bit bigger than the one defined by domdef in order to be 12 ; sure that the mask we draw will cover over all the drawing. 13 ; 14 ; @categories 15 ; utilities 16 ; 17 ; @keyword TRI 18 ; This keyword serve to obtain, thanks to grille, the triangulation which 19 ; refer to the grid but only on the part of the zoom. This of triangulation 20 ; is passed in the variable we have equate at TRI. 21 ; For example: grille,...,tri=triangulation_reduite. 22 ; This keyword is used in plt.pro 23 ; 24 ; @keyword WDEPTH 25 ; To specify that the field is at W depth instad of T 26 ; depth (automatically activated if vargrid eq 'W') 27 ; 28 ; @uses 29 ; common.pro 30 ; 31 ; @history 32 ; Sebastien Masson (smasson@lodyc.jussieu.fr) 45 33 ; 24/2/99 34 ; 35 ; @version 36 ; $Id$ 37 ; 38 ; @todo seb : manque tous les param et plein de keywords. 39 ; 40 ; 41 ; 42 ; 46 43 ;- 47 44 ;------------------------------------------------------------ … … 59 56 ENDIF 60 57 ;--------------------------------------------------------- 61 tempsun = systime(1) ; pour key_performance58 tempsun = systime(1) ; For key_performance 62 59 ;------------------------------------------------------------ 63 60 if vargrid EQ 'W' then wdepth = 1 … … 252 249 ENDELSE 253 250 ;------------------------------------------------------------ 254 ; vecteur triangulation Qd TRI est active251 ; Triangulation vector when TRI is activated. 255 252 ;------------------------------------------------------------ 256 253 IF arg_present(TRI) then $ 257 254 if triangles_list[0] EQ -1 OR usetri LT 1 then tri = -1 ELSE BEGIN 258 ; si on est en train de tracer un niveau profond on refait la 259 ; triangulation 255 ; If we are tracing a deep level, we redo the triangulation 260 256 if keyword_set(profond) then begin 261 257 tri = triangule(mask, coinmonte = coinmonte, coindescend = coindescend, _extra = ex) 262 258 indicezoom = (lindgen(jpi, jpj))[firstx:lastx, firsty:lasty] 263 ENDIF ELSE BEGIN 264 ; sinon on recupere la partie de triangulation qui nous interesse et 265 ; on la numerote convenablement! 259 ENDIF ELSE BEGIN 260 ; Otherwise, we recuperate the part of triangulation that interest us and we number them well!! 266 261 if nx EQ jpi AND ny EQ jpj then tri = triangles_list ELSE BEGIN 267 262 msk = bytarr(jpi, jpj) -
trunk/SRC/ToBeReviewed/GRILLE/domdef.pro
r134 r142 3 3 ;------------------------------------------------------------ 4 4 ;+ 5 ; NAME: DOMDEF 6 ; 7 ; PURPOSE:permet d'extraire un sous domaine d'etude en fournissant les 8 ; parametres necessaires pour les traces. (cf. outputs) 9 ; 10 ; CATEGORY: 11 ; 12 ; CALLING SEQUENCE:domdef [,lon1, lon2, lat1, lat2[,vert1,vert2]] ou 13 ; bien domdef,vecteur 14 ; 15 ; INPUTS:(facultatif), [vecteur a] 2, 4 ou 6 elements:; 16 ; sans l''utilisation des mots cles index,xindex,yindex,zindex: 17 ; *vert1, vert2: pour un domaine 3D dont la partie horizontale couvre tout 18 ; glam et gphi 19 ; *lon1, lon2, lat1, lat2: 20 ; definissant les longitudes min. max et les latitudes min, max du domaine a 21 ; etudier (tous les niveaux sont selectiones) 22 ; *lon1,lon2,lat1,lat2,vert1,vert2 pour specifier les profondeurs. 23 ; 24 ; KEYWORD PARAMETERS: 25 ; 26 ; ENDPOINTS: a four elements vector [x1,y1,x2,y2] used to specify 27 ; that domdef must define the box used to make a plot (pltz, pltt, 28 ; plt1d) done strictly along the line (that can have any direction) 29 ; starting at (x1, y1) ending at (x2, y2). When defining endpoints, 30 ; you must also define TYPE which define the type of plots 31 ; ('pltz', 'xt', 'yt', 'zt', 'x', 'y', 'z', 't') will used 32 ; ENDPOINTS keywords 33 ; 34 ; FINDALWAYS:oblige a redefinir une boite meme qd auqun point 35 ; n''est trouve ds la boite. dans ce cas on selectionne toute la 36 ; grille. 37 ; 38 ; GRIDTYPE:un string ou un vecteur de string contennant le nom des 39 ; grilles (determinees uniquement par : 'T','U','V','W','F') pour 40 ; lesquelles le calcul doit etre fait. par 41 ; ex :'T' ou ['T','U'] 42 ; 43 ; /MEMEINDICES: il se peut que les points t,u,v et F correspondant a 44 ; une meme boite geographique ne concernent pas les memes 45 ; indices des tableaux. Ceci pose parfois de pb (ou du moins de 46 ; serieuses complications) ds les programmes ou plusieurs types 47 ; de grilles interviennent (cf.: norme, curl...). Activer 48 ; MEMEINDICES pour forcer domdef a prendre les memes indices -ceux 49 ; de la grille T- pour toutes les autres grilles. 50 ; 51 ; /INDEX: activer si on veut specifier que tous les elements 52 ; passes en entree de domdef se rapportent aux indices des 53 ; tableaux glam, gphi et gdep plutot qu'aux valeurs de ces 54 ; tableaux 55 ; 56 ; /xindex: activer si on veut que les elements passes en entrre 57 ; de domdef et concernant la dimension en x se rapportent aux 58 ; indices des tableaux glam qu'aux valeurs de ces tableaux. 59 ; 60 ; /yindex: cf xindex mais pour y et les gphi 61 ; 62 ; /zindex: cf xindex mais pour z et les gdep 5 ; 6 ; @file_comments 7 ; Allows to extract a subdomain of study by providing parameters 8 ; needed for drawings (see outputs) 9 ; 10 ; @categories 11 ; 12 ; @param Z1 {in}{optional} 13 ; For a 3d domain whose the horizontal part cover all glam 14 ; 15 ; @param Z2 {in}{optional} 16 ; For a 3d domain whose the horizontal part cover all gphi 17 ; 18 ; @param X1 {in}{optional} 19 ; Define the minimum longitude. (All levels are selected) 20 ; 21 ; @param X2 {in}{optional} 22 ; Define the maximum longitude. (All levels are selected) 23 ; 24 ; @param Y1 {in}{optional} 25 ; Define the minimum latitude. (All levels are selected) 26 ; 27 ; @param Y2 {in}{optional} 28 ; Define the maximum latitude. (All levels are selected) 29 ; 30 ; @keyword ENDPOINTS 31 ; A four elements vector [x1,y1,x2,y2] used to specify 32 ; that domdef must define the box used to make a plot (pltz, pltt, 33 ; plt1d) done strictly along the line (that can have any direction) 34 ; starting at (x1, y1) ending at (x2, y2). When defining endpoints, 35 ; you must also define TYPE which define the type of plots 36 ; ('pltz', 'xt', 'yt', 'zt', 'x', 'y', 'z', 't') will used 37 ; ENDPOINTS keywords 38 ; 39 ; @keyword FINDALWAYS 40 ; Force to redefine a box even when none point is find in the box. 41 ; In this case, we select all the grid. 42 ; 43 ; @keyword GRIDTYPE 44 ; It is a string or a vector of strings containing the grids's name 45 ; (Only determinated by 'T','U','V','W','F') for which the calculation 46 ; must be done. 47 ; For example: 'T' ou ['T','U'] 48 ; 49 ; @keyword MEMEINDICES 50 ; It is possible that points t,u,v and F correspond to a same geographic 51 ; box which do not concern the same array indexes. This is sometimes a 52 ; problem (or at least serious complications) in programs where several 53 ; type of grid interven (see norme, curl...). Activate MEMEINDICE to 54 ; force domdef to take same indexes -those of the grid T- for all other 55 ; grids. 56 ; 57 ; @keyword INDEX 58 ; We activate it if we want that all elements passed in input of domdef 59 ; refer to indexes of glam, gphi and gdep arrays rather than to values 60 ; of these arrays. 61 ; 62 ; @keyword XINDEX 63 ; We activate it if we want that all elements passed in input of domdef 64 ; and concerning the X dimension refer to indexes of glam arrays rather 65 ; than to values of these arrays. 66 ; 67 ; @keyword YINDEX 68 ; We activate it if we want that all elements passed in input of domdef 69 ; and concerning the X dimension refer to indexes of gphi arrays rather 70 ; than to values of these arrays. 71 ; 72 ; @keyword ZINDEX 73 ; We activate it if we want that all elements passed in input of domdef 74 ; and concerning the X dimension refer to indexes of gdep arrays rather 75 ; than to values of these arrays. 63 76 ; 64 77 ; OUTPUTS:on recupere pour les 4 grilles t,u,v,f … … 82 95 ; suivant z 83 96 ; 84 ; COMMON BLOCKS: 85 ; common.pro 86 ; 87 ; SIDE EFFECTS: 88 ; 89 ; RESTRICTIONS: 90 ; 91 ; EXAMPLE: 92 ; 93 ; MODIFICATION HISTORY: Sebastien Masson (smasson@lodyc.jussieu.fr) 97 ; @uses 98 ; common.pro 99 ; 100 ; 101 ; @history 102 ; Sebastien Masson (smasson@lodyc.jussieu.fr) 94 103 ; 8/2/98 95 104 ; rewrite everything, debug and spee-up Sebastien Masson April 2005 105 ; 106 ; @version 107 ; $Id$ 108 ; 109 ; @todo seb: output pas clair/ pas d'input required? 96 110 ;- 97 111 ;------------------------------------------------------------ … … 114 128 ENDIF 115 129 ;--------------------- 116 tempsun = systime(1) ; pour key_performance130 tempsun = systime(1) ; For key_performance 117 131 ; 118 132 CASE N_PARAMS() OF -
trunk/SRC/ToBeReviewed/GRILLE/f2v.pro
r134 r142 3 3 ;------------------------------------------------------------ 4 4 ;+ 5 ; NAME:f2v6 5 ; 7 ; PURPOSE:permet de passer un champs se rapportant a la grille F sur 8 ; la grille V, grace a la moyenne: res = 0.5*(res + shift(res, 1, 0)) 9 ; 6 ; @file_comments 7 ; Allows to pass a field refering to the grid F on the grid V, 8 ; thanks to the average: 9 ; res = 0.5*(res + shift(res, 1, 0)) 10 10 ; 11 ; CATEGORY:grille 11 ; @categories 12 ; Grille 12 13 ; 13 ; CALLING SEQUENCE:res=f2v(tab) 14 ; 15 ; INPUTS:tab, un tableau 2, 3 ou 4d 14 ; @param TEMP {in}{required} 15 ; A 2, 3 or 4d array 16 16 ; 17 ; KEYWORD PARAMETERS: 17 ; @returns 18 ; res, a 2, 3 or 4d array 18 19 ; 19 ; OUTPUTS:res, un tableau 2, 3 ou 4d 20 ; @uses 21 ; common.pro 20 22 ; 21 ; COMMON BLOCKS:common.pro 23 ; @restrictions 24 ; Force parameters of the zoom on the grid V to be the same as 25 ; those on the grid T. 22 26 ; 23 ; SIDE EFFECTS:force les parametres du zoom sur la grille V a etre 24 ; les memes que ceux sur la grille T. 27 ; @restrictions 28 ; Points which can not be calculated are put at the value NaN 29 ; consecrated by IDL: !values.f_nan 25 30 ; 26 ; RESTRICTIONS:les points qui ne peuvent etre calcules sont mis a la 27 ; valeur NaN consacree par IDL: !values.f_nan 31 ; @history 32 ; From Marina Levy's programs 33 ; Sebastien Masson (smasson@lodyc.jussieu.fr): 34 ; Validation. 5/6/2000 28 35 ; 29 ; EXAMPLE: 30 ; 31 ; MODIFICATION HISTORY:a partir des programmes de Marina Levy 32 ; Sebastien Masson (smasson@lodyc.jussieu.fr): 33 ; inspection des traveuax finis. 5/6/2000 36 ; @version 37 ; $Id$ 34 38 ; 35 39 ;- … … 50 54 ;--------------------------------------------------------- 51 55 res = temp 52 ; onforce nxt=nxf, etc ...56 ;We force nxt=nxf, etc ... 53 57 firstxv = firstxf 54 58 lastxv = lastxf … … 62 66 lon2 = glamf[lastxf, 0] 63 67 64 ; cas sur la taille du tableau et application68 ; case on tha array's size and application 65 69 taille = size(temp) 66 70 CASE taille[0] OF -
trunk/SRC/ToBeReviewed/GRILLE/fmask.pro
r134 r142 3 3 ;------------------------------------------------------------ 4 4 ;+ 5 ; NAME:fmask6 5 ; 7 ; PURPOSE:calcule fmask 6 ; @file_comments 7 ; calculate fmask. Economize memory (we do not need to keep fmask anymore) 8 8 ; 9 ; CATEGORY:fonction economisatrice de memoire (plus besion de garder10 ; fmask)9 ; @categories 10 ; Utilities 11 11 ; 12 ; CALLING SEQUENCE:res=fmask() 12 ; @returns 13 ; A 3d array corresponding to fmask. 13 14 ; 14 ; OUTPUTS:un tableau 3d correspondant a fmask 15 ; @examples 16 ; Used like if fmask was a known array by substituing fmask by (fmask()) 17 ; For example: Instaed of write fmask[domainef] we have to write (fmask())[domainef] 15 18 ; 16 ; EXAMPLE:s''utilise comme si fmask etait un tableau connu en17 ; replacant ds la syntaxe fmask par (fmask()). par ex:18 ; au lieu de taper fmask[domainef] il faut taper (fmask())[domainef]19 ; @history 20 ; Sebastien Masson (smasson@lodyc.jussieu.fr) 21 ; 11/12/98 19 22 ; 20 ; MODIFICATION HISTORY: Sebastien Masson (smasson@lodyc.jussieu.fr) 21 ; 11/12/98 23 ; @version 24 ; $Id$ 25 ; 22 26 ;- 23 27 ;------------------------------------------------------------ … … 34 38 ENDIF 35 39 ;--------------------------------------------------------- 36 tempsun = systime(1) ; pour key_performance40 tempsun = systime(1) ; For key_performance 37 41 ; 38 42 CASE size(tmask, /n_dimensions) OF -
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) -
trunk/SRC/ToBeReviewed/GRILLE/t2v.pro
r134 r142 3 3 ;------------------------------------------------------------ 4 4 ;+ 5 ; NAME:t2v6 5 ; 7 ; PURPOSE:permet de passer un champs se rapportant a la grille T sur 8 ; la grille V, grace a la moyenne: res = 0.5*(res + shift(res, 0, -1)) 9 ; 6 ; @file_comments 7 ; Allows to pass a field refering to the grid T on the grid V, 8 ; thanks to the average res = 0.5*(res + shift(res, 0, -1)) 9 ; 10 ; @categories 11 ; Grille 10 12 ; 11 ; CATEGORY:grille 13 ; @param TEMP {in}{required} 14 ; A 2, 3 or 4d array 12 15 ; 13 ; CALLING SEQUENCE:res=t2v(tab) 14 ; 15 ; INPUTS:tab, un tableau 2, 3 ou 4d 16 ; @returns 17 ; res, a 2, 3 or 4d array 16 18 ; 17 ; KEYWORD PARAMETERS: 19 ; @uses 20 ; common.pro 18 21 ; 19 ; OUTPUTS:res, un tableau 2, 3 ou 4d 22 ; @restrictions 23 ; Force parameters of the zoom on the grid V to be the same as 24 ; those on the grid T. 20 25 ; 21 ; COMMON BLOCKS:common.pro 26 ; @restrictions 27 ; Points which can not be calculated are put at the value NaN 28 ; consecrated by IDL: !values.f_nan 22 29 ; 23 ; SIDE EFFECTS:force les parametres du zoom sur la grille V a etre 24 ; les memes que ceux sur la grille T. 30 ; @history 31 ; From Marina Levy's programs 32 ; Sebastien Masson (smasson@lodyc.jussieu.fr): 33 ; Validation. 5/6/2000 25 34 ; 26 ; RESTRICTIONS:les points qui ne peuvent etre calcules sont mis a la 27 ; valeur NaN consacree par IDL: !values.f_nan 28 ; 29 ; EXAMPLE: 30 ; 31 ; MODIFICATION HISTORY:Marina Levy 32 ; Sebastien Masson (smasson@lodyc.jussieu.fr): 33 ; inspection des traveuax finis. 5/6/2000 35 ; @version 36 ; $Id$ 34 37 ; 35 38 ;- … … 51 54 res = temp 52 55 53 ; onforce nxt=nxv, etc ...56 ;We force nxt=nxv, etc ... 54 57 firstxv = firstxt 55 58 lastxv = lastxt … … 63 66 lat2 = gphiv[0, lastyv] 64 67 65 ; cas sur la taille du tableau et application68 ; case on tha array's size and application 66 69 taille = size(temp) 67 70 CASE taille[0] OF -
trunk/SRC/ToBeReviewed/GRILLE/tracegrille.pro
r134 r142 3 3 ;------------------------------------------------------------ 4 4 ;+ 5 ; NAME:tracegrille6 5 ; 7 ; PURPOSE:dessine la grille 6 ; @file_comments 7 ; Draw the grid 8 8 ; 9 ; CATEGORY: 9 ; @categories 10 ; 11 ; @param GLAMIN {in}{required} 12 ; The 1d or 2d array in longitude of points of the grid.If GLAM/GLAMIN 13 ; is not specified, it trace the grid specified by vargrid, on the 14 ; domain defined by domdef. 10 15 ; 11 ; CALLING SEQUENCE:tracegrille 16 ; @param GPHIIN {in}{required} 17 ; The 1d or 2d array in latitude of points of the grid.If GPHI/GPHIIN 18 ; is not specified, it trace the grid specified by vargrid, on the 19 ; domain defined by domdef. 20 ; 21 ; @keyword XSTRIDE 22 ; It is an integer to specify that we want to trace only one line of 23 ; constant i every xstride points 24 ; 25 ; @keyword YSTRIDE 26 ; It is an integer to specify that we want to trace only one line of 27 ; constant j every xstride points 28 ; 29 ; @keyword OCEAN 30 ; To trace the grid only on ocean points. 12 31 ; 13 ; INPUTS:glam et gphi, les tableaux 1d ou 2d des position en 14 ; longitude/latitude des points de la grille. Si glam et gphi ne sont 15 ; pas specifies, trace la grille specifiee par vargrid, sur le domaine 16 ; definit par le dernier domdef. 32 ; @keyword EARTH 33 ; To trace the grid only on land points pour ne tracer la grille que sur les points terre 17 34 ; 18 ; KEYWORD PARAMETERS: 35 ; @keyword RMOUT 36 ; Select to remove all cell having one corner out of the 37 ; plot boundaries (!x.range, !y.range) 19 38 ; 20 ; XSTRIDE un entier pour specifier qu''on ne veut tracer 21 ; qu''une ligne de i constant tout les xstride points 22 ; 23 ; YSTRIDE un entier pour specifier qu''on ne veut tracer 24 ; qu''une ligne de j constant tout les ystride points 25 ; 26 ; /OCEAN: pour ne tracer la grille que sur les points oceans 39 ; @keyword _EXTRA 40 ; Used to pass your keywords. 27 41 ; 28 ; /EARTH: pour ne tracer la grille que sur les points terre 29 ; 30 ; /RMOUT:select to remove all cell having one corner out of the 31 ; plot boundaries (!x.range, !y.range) 32 ; 33 ; + tous les mots clefs de la procedure PLOTS 34 ; 35 ; OUTPUTS:none 36 ; 37 ; COMMON BLOCKS:common.pro 38 ; 39 ; SIDE EFFECTS: 40 ; 41 ; RESTRICTIONS: 42 ; 43 ; EXAMPLE: 42 ; @uses 43 ; common.pro 44 ; 45 ; @examples 44 46 ; 45 47 ; IDL> plt,indgen(jpi,jpj),/nocontour,/nofill … … 49 51 ; 50 52 ; 51 ; MODIFICATION HISTORY:Sebastien Masson (smasson@lodyc.jussieu.fr) 52 ; 53 ; @history 54 ; Sebastien Masson (smasson@lodyc.jussieu.fr) 55 ; 56 ; @version 57 ; $Id$ 58 ; 53 59 ;- 54 60 ;------------------------------------------------------------ … … 68 74 ENDIF 69 75 ;--------------------------------------------------------- 70 tempsun = systime(1) ; pour key_performance76 tempsun = systime(1) ; For key_performance 71 77 ; to avoid warning message 72 78 oldexcept = !except -
trunk/SRC/ToBeReviewed/GRILLE/u2t.pro
r134 r142 3 3 ;------------------------------------------------------------ 4 4 ;+ 5 ; NAME:u2t6 5 ; 7 ; PURPOSE:permet de passer un champs se rapportant a la grille U sur 8 ; la grille T, grace a la moyenne: res = 0.5*(res + shift(res, 1, 0)) 9 ; 6 ; @file_comments 7 ; Allows to pass a field refering to the grid U on the grid T, 8 ; thanks to the average: 9 ; res = 0.5*(res + shift(res, 1, 0)) 10 10 ; 11 ; CATEGORY:grille 11 ; @categories 12 ; Grille 12 13 ; 13 ; CALLING SEQUENCE:res=u2t(tab) 14 ; 15 ; INPUTS:tab, un tableau 2, 3 ou 4d 14 ; @param TEMP {in}{required} 15 ; A 2, 3 or 4d array 16 16 ; 17 ; KEYWORD PARAMETERS: 17 ; @returns 18 ; res, a 2, 3 or 4d array 18 19 ; 19 ; OUTPUTS:res, un tableau 2, 3 ou 4d 20 ; @uses 21 ; common.pro 20 22 ; 21 ; COMMON BLOCKS:common.pro 23 ; @restrictions 24 ; Force parameters of the zoom on the grid V to be the same as 25 ; those on the grid T. 22 26 ; 23 ; SIDE EFFECTS:force les parametres du zoom sur la grille V a etre 24 ; les memes que ceux sur la grille T. 27 ; @restrictions 28 ; Points which can not be calculated are put at the value NaN 29 ; consecrated by IDL: !values.f_nan 25 30 ; 26 ; RESTRICTIONS:les points qui ne peuvent etre calcules sont mis a la 27 ; valeur NaN consacree par IDL: !values.f_nan 31 ; @history 32 ; From Marina Levy's programs 33 ; Sebastien Masson (smasson@lodyc.jussieu.fr): 34 ; Validation. 5/6/2000 28 35 ; 29 ; EXAMPLE: 30 ; 31 ; MODIFICATION HISTORY:a partir des programmes de Marina Levy 32 ; Sebastien Masson (smasson@lodyc.jussieu.fr): 33 ; inspection des traveuax finis. 5/6/2000 36 ; @version 37 ; $Id$ 34 38 ; 35 39 ;- … … 62 66 lon2 = glamu[lastxu, 0] 63 67 ; 64 ; cas sur la taille du tableau et application68 ; case on tha array's size and application 65 69 taille = size(temp) 66 70 CASE taille[0] OF -
trunk/SRC/ToBeReviewed/GRILLE/umask.pro
r134 r142 3 3 ;------------------------------------------------------------ 4 4 ;+ 5 ; NAME:umask6 5 ; 7 ; PURPOSE:calcule umask 6 ; @file_comments 7 ; calculate umask. Economize memory (we do not need to keep umask anymore) 8 8 ; 9 ; CATEGORY:fonction economisatrice de memoire (plus besion de garder10 ; umask)9 ; @categories 10 ; Utilities 11 11 ; 12 ; CALLING SEQUENCE:res=umask() 12 ; @returns 13 ; A 3d array corresponding to umask. 13 14 ; 14 ; INPUTS: 15 ; @uses 16 ; common.pro 15 17 ; 16 ; KEYWORD PARAMETERS: 17 ; 18 ; OUTPUTS:un tableau 3d correspondant a umask 19 ; 20 ; COMMON BLOCKS: 21 ; common.pro 22 ; 23 ; SIDE EFFECTS: 24 ; 25 ; RESTRICTIONS: 26 ; 27 ; EXAMPLE:s''utilise comme si umask etait un tableau connu en 28 ; replacant ds la syntaxe umask par umask(). par ex: 29 ; au lieu de taper umask[domaineu] il faut taper (umask())[domaineu] 30 18 ; @examples 19 ; Used like if umask was a known array by substituing umask by (umask()) 20 ; For example: Instaed of write umask[domainef] we have to write (umask())[domainef] 31 21 ; 32 22 ; MODIFICATION HISTORY: Sebastien Masson (smasson@lodyc.jussieu.fr) 33 23 ; 11/12/98 34 ; ??/6/99 introduction du key_shift 35 ; 20/9/99 cas jpk=1 (merci jpblod@ipsl.jussieu.fr) 24 ; ??/6/99 introduction of the key_shift 25 ; 20/9/99 cas jpk=1 (Thanks to jpblod@ipsl.jussieu.fr) 26 ; 27 ; @version 28 ; $Id$ 29 ; 36 30 ;- 37 31 ;------------------------------------------------------------ … … 48 42 ENDIF 49 43 ;--------------------------------------------------------- 50 tempsun = systime(1) ; pour key_performance44 tempsun = systime(1) ; For key_performance 51 45 ; 52 46 CASE size(tmask, /n_dimensions) OF -
trunk/SRC/ToBeReviewed/GRILLE/v2t.pro
r134 r142 3 3 ;------------------------------------------------------------ 4 4 ;+ 5 ; NAME:v2t6 5 ; 7 ; PURPOSE:permet de passer un champs se rapportant a la grille V sur 8 ; la grille T, grace a la moyenne: res = 0.5*(res + shift(res, 0, +1)) 9 ; 6 ; @file_comments 7 ; Allows to pass a field refering to the grid V on the grid T, 8 ; thanks to the average: 9 ; res = 0.5*(res + shift(res, 1, 0)) 10 10 ; 11 ; CATEGORY:grille 11 ; @categories 12 ; Grille 12 13 ; 13 ; CALLING SEQUENCE:res=v2t(tab) 14 ; 15 ; INPUTS:tab, un tableau 2, 3 ou 4d 14 ; @param TEMP {in}{required} 15 ; A 2, 3 or 4d array 16 16 ; 17 ; KEYWORD PARAMETERS: 17 ; @returns 18 ; res, a 2, 3 or 4d array 18 19 ; 19 ; OUTPUTS:res, un tableau 2, 3 ou 4d 20 ; @uses 21 ; common.pro 20 22 ; 21 ; COMMON BLOCKS:common.pro 23 ; @restrictions 24 ; Force parameters of the zoom on the grid V to be the same as 25 ; those on the grid T. 22 26 ; 23 ; SIDE EFFECTS:force les parametres du zoom sur la grille V a etre 24 ; les memes que ceux sur la grille T. 27 ; @restrictions 28 ; Points which can not be calculated are put at the value NaN 29 ; consecrated by IDL: !values.f_nan 25 30 ; 26 ; RESTRICTIONS:les points qui ne peuvent etre calcules sont mis a la 27 ; valeur NaN consacree par IDL: !values.f_nan 31 ; @history 32 ; From Marina Levy's programs 33 ; Sebastien Masson (smasson@lodyc.jussieu.fr): 34 ; Validation. 5/6/2000 28 35 ; 29 ; EXAMPLE: 36 ; @version 37 ; $Id$ 30 38 ; 31 ; MODIFICATION HISTORY:a partir des programmes de Marina Levy 32 ; Sebastien Masson (smasson@lodyc.jussieu.fr): 33 ; inspection des traveuax finis. 5/6/2000 39 ; @todo seb: nom du input? 34 40 ; 35 41 ;- … … 50 56 ;--------------------------------------------------------- 51 57 res = temp 52 ; onforce nxt=nxv, etc ...58 ;We force nxt=nxv, etc ... 53 59 firstxt = firstxv 54 60 lastxt = lastxv … … 62 68 lat2 = gphiv[0, lastyv] 63 69 64 ; cas sur la taille du tableau et application70 ; case on tha array's size and application 65 71 taille = size(temp) 66 72 CASE taille[0] OF -
trunk/SRC/ToBeReviewed/GRILLE/vmask.pro
r134 r142 3 3 ;------------------------------------------------------------ 4 4 ;+ 5 ; NAME:vmask6 5 ; 7 ; PURPOSE:calcule vmask 6 ; @file_comments 7 ; calculate fmask. Economize memory (we do not need to keep vmask anymore) 8 8 ; 9 ; CATEGORY:fonction economisatrice de memoire (plus besion de garder10 ; vmask)9 ; @categories 10 ; Utilities 11 11 ; 12 ; CALLING SEQUENCE:res=vmask() 12 ; @returns 13 ; A 3d array corresponding to vmask. 13 14 ; 14 ; OUTPUTS:un tableau 3d correspondant a vmask 15 ; @examples 16 ; Used like if vmask was a known array by substituing vmask by (vmask()) 17 ; For example: Instaed of write vmask[domainef] we have to write (vmask())[domainef] 15 18 ; 16 ; EXAMPLE:s''utilise comme si vmask etait un tableau connu en 17 ; replacant ds la syntaxe vmask par vmask(). par ex: 18 ; au lieu de taper vmask[domainef] il faut taper vmask()[domainef] 19 ; 20 ; MODIFICATION HISTORY: Sebastien Masson (smasson@lodyc.jussieu.fr) 19 ; @history 20 ; Sebastien Masson (smasson@lodyc.jussieu.fr) 21 21 ; 11/12/98 22 22 ; 20/9/99 cas jpk=1 (merci jpblod@ipsl.jussieu.fr) 23 ; 24 ; @version 25 ; $Id$ 26 ; 23 27 ;- 24 28 ;------------------------------------------------------------ … … 30 34 ; 31 35 @common 32 tempsun = systime(1) ; pour key_performance36 tempsun = systime(1) ; For key_performance 33 37 ; 34 38 CASE size(tmask, /n_dimensions) OF
Note: See TracChangeset
for help on using the changeset viewer.