Changeset 41 for trunk


Ignore:
Timestamp:
05/02/06 17:12:07 (18 years ago)
Author:
pinsard
Message:

upgrade of PLOTS/VECTEUR according to cerbere.lodyc.jussieu.fr: /usr/home/smasson/SAXO_RD/ : files

Location:
trunk
Files:
1 deleted
3 copied

Legend:

Unmodified
Added
Removed
  • trunk/ToBeReviewed/PLOTS/VECTEUR/ajoutvect.pro

    r39 r41  
    6262   v = litchamp(vecteur.(1)) 
    6363   v = checkfield(v, 'plt', TYPE = 'xy', /NOQUESTION) 
    64 ;         niv='' 
    65    IF (size(u))[0] EQ 3 THEN BEGIN  
    66       niveau = xquestion('Le tableau d''entree est un tableau 3d, a quel niveau faut-il faire les vecteurs? (par defaut le premier niveau) ', strtrim(niveau, 1), /chkwidget) 
    67       niveau = 1 > fix(niveau) < jpk 
    68       u=u(*,*,niveau-1) 
    69       v=v(*,*,niveau-1) 
    70    endif 
    71  
    7264;----------------------------------------------------------- 
    7365;------------------------------------------------------------ 
     
    7870   grillev = litchamp(vecteur.(1), /grid) 
    7971   if grillev EQ '' then grillev = 'V' 
     72 
    8073   IF grilleu EQ 'V' AND grillev EQ 'U' THEN inverse = 1 
    8174   IF grilleu EQ grillev THEN interpolle  = 0 ELSE interpolle = 1 
     
    8982;------------------------------------------------------------ 
    9083   if interpolle then begin 
    91       indicexu = (lindgen(jpi))[premierxu:premierxu+nxu-1] 
    92       indicexv = (lindgen(jpi))[premierxv:premierxv+nxv-1] 
     84      indicexu = (lindgen(jpi))[firstxu:firstxu+nxu-1] 
     85      indicexv = (lindgen(jpi))[firstxv:firstxv+nxv-1] 
    9386      indicex = inter(indicexu, indicexv) 
    94       indiceyu = (lindgen(jpj))[premieryu:premieryu+nyu-1] 
    95       indiceyv = (lindgen(jpj))[premieryv:premieryv+nyv-1] 
     87      indiceyu = (lindgen(jpj))[firstyu:firstyu+nyu-1] 
     88      indiceyv = (lindgen(jpj))[firstyv:firstyv+nyv-1] 
    9689      indicey = inter(indiceyu, indiceyv) 
    9790      nx = n_elements(indicex)  
     
    107100          (size(v))[1] EQ nxv AND (size(v))[2] EQ nyv:BEGIN  
    108101            if nxu NE nx then $ 
    109              if indicex[0] EQ premierxu then u = u[0:nx-1, *] ELSE u = u[1: nx, *]  
     102             if indicex[0] EQ firstxu then u = u[0:nx-1, *] ELSE u = u[1: nx, *]  
    110103            IF nxv NE nx THEN $ 
    111              if indicex[0] EQ premierxv then v = v[0:nx-1, *] ELSE v = v[1: nx, *] 
     104             if indicex[0] EQ firstxv then v = v[0:nx-1, *] ELSE v = v[1: nx, *] 
    112105            IF nyu NE ny THEN $ 
    113              if indicey[0] EQ premieryu then u = u[*, 0:ny-1] ELSE u = u[*, 1: ny]  
     106             if indicey[0] EQ firstyu then u = u[*, 0:ny-1] ELSE u = u[*, 1: ny]  
    114107            IF nyv NE ny THEN $ 
    115              if indicey[0] EQ premieryv then v = v[*, 0:ny-1] ELSE v = v[*, 1: ny] 
     108             if indicey[0] EQ firstyv then v = v[*, 0:ny-1] ELSE v = v[*, 1: ny] 
    116109         END 
    117110         (size(u))[1] EQ jpi AND (size(u))[2] EQ jpj AND $ 
     
    137130      a=u(0,*) 
    138131      u=(u+shift(u,1,0))/2. 
    139       if NOT keyword_set(key_periodique) OR nx NE jpi then u(0,*)=a 
     132      if NOT keyword_set(key_periodic) OR nx NE jpi then u(0,*)=a 
    140133      a=v(*,0) 
    141134      v=(v+shift(v,0,1))/2. 
    142       if NOT keyword_set(key_periodique) OR nx NE jpi then v(*,0)=a 
     135      if NOT keyword_set(key_periodic) OR nx NE jpi then v(*,0)=a 
    143136;---------------------------------------------------------------------------- 
    144137; attribution du mask et des tableau de longitude et latitude 
     
    148141;---------------------------------------------------------------------------- 
    149142      vargrid='T' 
    150       msku = (umask())[indice2d+jpi*jpj*(niveau-1)] 
    151       mskv = (vmask())[indice2d+jpi*jpj*(niveau-1)] 
     143      msku = (umask())[indice2d+jpi*jpj*firstzt] 
     144      mskv = (vmask())[indice2d+jpi*jpj*firstzt] 
    152145      glam = glamt[indice2d] 
    153146      gphi = gphit[indice2d] 
     
    166159      v = v*mskv*shift(mskv,0,1) 
    167160   ENDIF ELSE BEGIN  
    168       u = u*tmask[premierxt:dernierxt,premieryt:dernieryt,premierzt] 
    169       v = v*tmask[premierxt:dernierxt,premieryt:dernieryt,premierzt] 
     161      u = u*tmask[firstxt:lastxt,firstyt:lastyt,firstzt] 
     162      v = v*tmask[firstxt:lastxt,firstyt:lastyt,firstzt] 
    170163      indice2d = lindgen(jpi, jpj) 
    171       indice2d = indice2d[premierxt:dernierxt, premieryt:dernieryt] 
     164      indice2d = indice2d[firstxt:lastxt, firstyt:lastyt] 
    172165      nx = nxt 
    173166      ny = nyt 
     
    179172   if nan[0] NE -1 then v[nan] = 1e5 
    180173   if keyword_set(vectmin) then BEGIN  
    181       troppetit=where(tabnorme lt vectmin) 
    182       if troppetit[0] NE -1 then begin 
    183          u[troppetit] = 1e5 
    184          v[troppetit] = 1e5 
     174      toosmall=where(tabnorme lt vectmin) 
     175      if toosmall[0] NE -1 then begin 
     176         u[toosmall] = 1e5 
     177         v[toosmall] = 1e5 
    185178      ENDIF 
    186179   endif 
    187180   if keyword_set(vectmax) then BEGIN 
    188       tropgrand=where(tabnorme gt vectmax) 
    189       if tropgrand[0] NE -1 then begin 
    190          u[tropgrand] = 1e5 
    191          v[tropgrand] = 1e5 
     181      toobig=where(tabnorme gt vectmax) 
     182      if toobig[0] NE -1 then begin 
     183         u[toobig] = 1e5 
     184         v[toobig] = 1e5 
    192185      ENDIF 
    193186   ENDIF 
     
    197190;----------------------------------------------------------- 
    198191   if interpolle then t2 = msku*shift(msku,1,0)*mskv*shift(mskv,0,1) $ 
    199    ELSE t2 = tmask[premierxt:dernierxt,premieryt:dernieryt,premierzt] 
    200    if NOT keyword_set(key_periodique) OR nx NE jpi then t2(0, *)=0. 
     192   ELSE t2 = tmask[firstxt:lastxt,firstyt:lastyt,firstzt] 
     193   if NOT keyword_set(key_periodic) OR nx NE jpi then t2(0, *)=0. 
    201194   t2(*,0)=0. 
    202195   terre=where(t2 eq 0) 
  • trunk/ToBeReviewed/PLOTS/VECTEUR/vecteur.pro

    r39 r41  
    8484; quelle est la longeur en coordonnees normales d''un trait qui fera 1 
    8585; cm sur le parier et qui est parallele a x? 
    86    sizexfeuille = petitfeuille*key_portrait+grandfeuille*(1-key_portrait) 
    87    sizeyfeuille = grandfeuille*key_portrait+petitfeuille*(1-key_portrait) 
     86  mipgsz = min(page_size, max = mapgsz) 
     87   sizexfeuille = mipgsz*key_portrait+mapgsz*(1-key_portrait) 
     88   sizeyfeuille = mapgsz*key_portrait+mipgsz*(1-key_portrait) 
    8889   cm_en_normal = 1./sizexfeuille 
    8990; 
     
    217218; definition de nu 
    218219   radius = replicate(1,nxgd*nygd) 
    219    coord_sphe = transpose([ [(glamu[indice2d])[*]], [(gphiu[indice2d])[*]], [radius(*)] ]) 
     220   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(*)] ]) 
    220223   r = cv_coord(from_sphere=coord_sphe,/to_rect,/degrees) 
    221224; coordonnes de points de la grille u en cartesien 
     
    228231   nuz = uz-shift(uz, 1, 0) 
    229232; conditions aux limites 
    230    if NOT keyword_set(key_periodique) OR nxgd NE jpi then begin 
     233   if NOT keyword_set(key_periodic) OR nxgd NE jpi then begin 
    231234      nux[0, *] = nux[1, *] 
    232235      nuy[0, *] = nuy[1, *] 
     
    238241   nuz = nuz[reduitindice2d] 
    239242; definition de nv 
    240    coord_sphe = transpose([ [(glamv[indice2d])[*]], [(gphiv[indice2d])[*]], [radius(*)] ]) 
     243   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(*)] ])                 
    241246   r = cv_coord(from_sphere=coord_sphe,/to_rect,/degrees) 
    242247; coordonnes de points de la grille v en cartesien 
     
    353358; 
    354359   if NOT keyword_set(cmref) then BEGIN  
    355       sizexfeuille = petitfeuille*key_portrait+grandfeuille*(1-key_portrait) 
     360      mipgsz = min(page_size, max = mapgsz) 
     361      sizexfeuille = mipgsz*key_portrait+mapgsz*(1-key_portrait) 
    356362      sizexfeuille = 10.*sizexfeuille 
    357363      cmref = 5 > floor(sizexfeuille/10.) < 15 
Note: See TracChangeset for help on using the changeset viewer.