Ignore:
Timestamp:
06/19/06 16:14:56 (18 years ago)
Author:
smasson
Message:

new compilation options (compile_opt idl2, strictarrsubs) in each routine

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SRC/ToBeReviewed/PLOTS/VECTEUR/vecteur.pro

    r41 r114  
    8181; angle peut etre un tableau. 
    8282; 
     83; 
     84  compile_opt idl2, strictarrsubs 
     85; 
    8386@common 
    8487; quelle est la longeur en coordonnees normales d''un trait qui fera 1 
     
    103106; normalise le vecteur 
    104107; 
     108; 
     109  compile_opt idl2, strictarrsubs 
     110; 
    105111   IF n_elements(w) NE 0 THEN BEGIN  
    106112      norme = sqrt(u^2.+v^2.+w^2.) 
    107113      ind = where(norme NE 0) 
    108       u(ind) = u(ind)/norme[ind] 
    109       v(ind) = v(ind)/norme[ind] 
    110       w(ind) = w(ind)/norme[ind] 
     114      u[ind] = u[ind]/norme[ind] 
     115      v[ind] = v[ind]/norme[ind] 
     116      w[ind] = w[ind]/norme[ind] 
    111117   ENDIF ELSE BEGIN 
    112118      norme = sqrt(u^2.+v^2.) 
    113119      ind = where(norme NE 0) 
    114       u(ind) = u(ind)/norme[ind] 
    115       v(ind) = v(ind)/norme[ind] 
     120      u[ind] = u[ind]/norme[ind] 
     121      v[ind] = v[ind]/norme[ind] 
    116122   ENDELSE  
    117123END 
     
    120126             , VECTCOLOR = vectcolor, VECTTHICK = vectthick, VECTREFPOS = vectrefpos $ 
    121127             , VECTREFFORMAT = vectrefformat, NOVECTREF = novectref, _extra = extra 
     128; 
     129  compile_opt idl2, strictarrsubs 
     130; 
    122131@common 
    123132   tempsun = systime(1)         ; pour key_performance 
     
    202211   r = cv_coord(from_sphere=coord_sphe,/to_rect,/degrees) 
    203212; 
    204    x0 = reform(r(0, *), nx, ny) 
    205    y0 = reform(r(1, *), nx, ny) 
    206    z0 = reform(r(2, *), nx, ny) 
     213   x0 = reform(r[0, *], nx, ny) 
     214   y0 = reform(r[1, *], nx, ny) 
     215   z0 = reform(r[2, *], nx, ny) 
    207216; 
    208217; etape 1, b) 
    209218; 
    210219; Construction du vecteur nu (resp. nv), vecteur norme porte par 
    211 ; l''axe des points u(i,j) et u(i-1,j) (resp v(i,j) et v(i,j-1)) 
     220; l''axe des points u[i,j] et u[i-1,j] (resp v[i,j] et v[i,j-1]) 
    212221; qui definissent pour chaque point sur la shere les directions locales 
    213222; associee a u et v. ces vecteurs definissent un repere orthonorme 
     
    219228   radius = replicate(1,nxgd*nygd) 
    220229   IF finite(glamu[0]*gphiu[0]) NE 0 THEN $ 
    221      coord_sphe = transpose([ [(glamu[indice2d])[*]], [(gphiu[indice2d])[*]], [radius(*)] ]) $ 
    222    ELSE coord_sphe = transpose([ [(glamf[indice2d])[*]], [(gphit[indice2d])[*]], [radius(*)] ]) 
     230     coord_sphe = transpose([ [(glamu[indice2d])[*]], [(gphiu[indice2d])[*]], [radius[*]] ]) $ 
     231   ELSE coord_sphe = transpose([ [(glamf[indice2d])[*]], [(gphit[indice2d])[*]], [radius[*]] ]) 
    223232   r = cv_coord(from_sphere=coord_sphe,/to_rect,/degrees) 
    224233; coordonnes de points de la grille u en cartesien 
    225    ux = reform(r(0, *), nxgd, nygd) 
    226    uy = reform(r(1, *), nxgd, nygd) 
    227    uz = reform(r(2, *), nxgd, nygd) 
     234   ux = reform(r[0, *], nxgd, nygd) 
     235   uy = reform(r[1, *], nxgd, nygd) 
     236   uz = reform(r[2, *], nxgd, nygd) 
    228237; calcul de nu  
    229238   nux = ux-shift(ux, 1, 0) 
     
    242251; definition de nv 
    243252   IF finite(glamv[0]*gphiv[0]) NE 0 THEN $ 
    244    coord_sphe = transpose([ [(glamv[indice2d])[*]], [(gphiv[indice2d])[*]], [radius(*)] ]) $ 
    245    ELSE coord_sphe = transpose([ [(glamt[indice2d])[*]], [(gphif[indice2d])[*]], [radius(*)] ])                 
     253   coord_sphe = transpose([ [(glamv[indice2d])[*]], [(gphiv[indice2d])[*]], [radius[*]] ]) $ 
     254   ELSE coord_sphe = transpose([ [(glamt[indice2d])[*]], [(gphif[indice2d])[*]], [radius[*]] ])                 
    246255   r = cv_coord(from_sphere=coord_sphe,/to_rect,/degrees) 
    247256; coordonnes de points de la grille v en cartesien 
    248    vx = reform(r(0, *), nxgd, nygd) 
    249    vy = reform(r(1, *), nxgd, nygd) 
    250    vz = reform(r(2, *), nxgd, nygd) 
     257   vx = reform(r[0, *], nxgd, nygd) 
     258   vy = reform(r[1, *], nxgd, nygd) 
     259   vz = reform(r[2, *], nxgd, nygd) 
    251260; calcul de nv  
    252261   nvx = vx-shift(vx, 0, 1) 
     
    290299; coordonnees de la pointe en spherique 
    291300 
    292    coord_rect = transpose([ [x1(*)], [y1(*)], [z1(*)] ]) 
     301   coord_rect = transpose([ [x1[*]], [y1[*]], [z1[*]] ]) 
    293302   r = cv_coord(from_rect=coord_rect,/to_sphere,/degrees) 
    294    glam1 = reform(r(0, *), nx, ny) 
    295    gphi1 = reform(r(1, *), nx, ny) 
     303   glam1 = reform(r[0, *], nx, ny) 
     304   gphi1 = reform(r[1, *], nx, ny) 
    296305 
    297306; 
     
    303312; 
    304313   ind = where(glam1 LT !x.range[0] AND glam1+360. LE !x.range[1]) 
    305    if ind[0] NE -1 then glam1(ind) = glam1(ind)+360. 
     314   if ind[0] NE -1 then glam1[ind] = glam1[ind]+360. 
    306315   ind = where(glam1 GT !x.range[1] AND glam1-360. GE !x.range[0]) 
    307    if ind[0] NE -1 then glam1(ind) = glam1(ind)-360. 
     316   if ind[0] NE -1 then glam1[ind] = glam1[ind]-360. 
    308317 
    309318   ind = where(glam LT !x.range[0] AND glam+360. LE !x.range[1]) 
    310    if ind[0] NE -1 then glam(ind) = glam(ind)+360. 
     319   if ind[0] NE -1 then glam[ind] = glam[ind]+360. 
    311320   ind = where(glam  GT !x.range[1] AND glam-360. GE !x.range[0]) 
    312    if ind[0] NE -1 then glam(ind) = glam(ind)-360. 
     321   if ind[0] NE -1 then glam[ind] = glam[ind]-360. 
    313322; 
    314323; 
     
    316325; 
    317326   r = convert_coord(glam,gphi,/data,/to_normal)  
    318    x0 = r(0, *)                 ; coordonnes normales du debut de la fleche 
    319    y0 = r(1, *)                 ;  
     327   x0 = r[0, *]                 ; coordonnes normales du debut de la fleche 
     328   y0 = r[1, *]                 ;  
    320329    
    321330   r = convert_coord(glam1,gphi1,/data,/to_normal)  
    322    x1 = r(0, *)                 ; coordonnes normales de la fin de la fleche (avant scaling) 
    323    y1 = r(1, *)                 ;  
     331   x1 = r[0, *]                 ; coordonnes normales de la fin de la fleche (avant scaling) 
     332   y1 = r[1, *]                 ;  
    324333; 
    325334; tests pour eviter que des fleches soient dessineees hors du domaine 
     
    384393; 
    385394   r = cv_coord(from_polar = transpose([ [dirpol[*]], [norme[*]] ]), /to_rect) 
    386    composantex = r(0, *) 
    387    composantey = r(1, *) 
     395   composantex = r[0, *] 
     396   composantey = r[1, *] 
    388397; 
    389398   x1 = x0+composantex 
     
    395404 
    396405   points = where(msk EQ 1) 
    397    IF points[0] NE -1 THEN arrow, x0(points), y0(points), x1(points), y1(points), /norm $ 
     406   IF points[0] NE -1 THEN arrow, x0[points], y0[points], x1[points], y1[points], /norm $ 
    398407    , hsize = -.2, COLOR = vectcolor, THICK = vectthick 
    399408; 
Note: See TracChangeset for help on using the changeset viewer.