Changeset 171 for trunk/SRC/ToBeReviewed


Ignore:
Timestamp:
09/07/06 16:11:11 (18 years ago)
Author:
smasson
Message:

fix critical bug in plt and pltz when plotting zoom area on other grid than T, introduced in r67

Location:
trunk/SRC/ToBeReviewed/PLOTS/DESSINE
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/SRC/ToBeReviewed/PLOTS/DESSINE/plt.pro

    r163 r171  
    360360  ENDIF 
    361361;---------------------------------------------------------- 
    362 ; check the mask and the triangulation according to the grid type and  
    363 ; nan values. 
     362; check mask and triangulation according to the grid type and NaN 
    364363;----------------------------------------------------------  
    365 ;If we make a drawing in depth, we redifine a triangulation  
    366 ; on the zoom , this triangulation will be used to trace the  
    367 ; field. We use tmask in order to holes of this triangulation  
    368 ; are the same than these used for the mask and correspond to  
    369 ; holes there is in this new depth. 
     364; If we make a drawing at depth, we must redefine a triangulation  
     365; on the zoom because the land/sea mask at depth may differ from 
     366; the one at the surface. 
     367; As this triangulation will be used to draw the land/sea mask with 
     368; the good shape, we use tmask to compute it even if the data are not 
     369; located on the T grid 
    370370  if (keyword_set(profond) OR keyword_set(cont_nofill)) $ 
    371371    AND ((usetri GE 1 AND (vargrid EQ 'T' OR vargrid EQ 'W')) $ 
     
    379379; triangulation for nan mask 
    380380  if keyword_set(nan) then BEGIN 
    381     trinan = triangule(masknan, /keep_cont $ 
    382                        , coinmonte = coinmontenan $ 
     381    trinan = triangule(masknan, /keep_cont, coinmonte = coinmontenan $ 
    383382                       , coindescend = coindescendnan) 
    384383    indicezoomnan = (lindgen(jpi, jpj))[firstx:lastx, firsty:lasty] 
     
    389388    glammsk = glam 
    390389    gphimsk = gphi 
    391 ENDIF ELSE begin 
    392 ; decoupe terre: For the drawing of the coast be clean, we try to take additionally  
    393 ; points for the land. Like that, we do not see grid's gap. It is what decoupeterre  
    394 ; do. We profit of it to redefine trimsk. 
     390  ENDIF ELSE begin 
     391; decoupe terre: To draw the coast in a clean way, we try to take additionally  
     392; points to draw the land. Like that, we do not see gap between T and U/V/F grid. 
     393; It is what decoupeterre do. We also redefine trimsk. 
     394    maskorg = mask 
    395395    decoupeterre, mask, glammsk, gphimsk, type = 'xy'$ 
    396396      , TRI = trimsk, usetri = usetri, indicezoom = indicezoommask $ 
     
    478478    , coinmontenan = coinmontenan, coindescendnan = coindescendnan $ 
    479479    , indicezoommask = indicezoommask, indicezoomnan = indicezoomnan $ 
    480     , masknan = masknan, trinan = trinan, _extra = ex 
     480    , maskorg = maskorg, masknan = masknan, trinan = trinan, _extra = ex 
    481481;------------------------------------------------------------ 
    482482; IV3) Recall of plt in loop when contour is activated. 
  • trunk/SRC/ToBeReviewed/PLOTS/DESSINE/pltbase.pro

    r163 r171  
    131131             , COINMONTENAN = coinmontenan, COINDESCENDNAN = coindescendnan $ 
    132132             , INDICEZOOMMASK = indicezoommask, INDICEZOOMNAN = indicezoomnan $ 
    133              , MASKNAN = masknan, TRINAN = trinan $ 
     133             , MASKORG = maskorg, MASKNAN = masknan, TRINAN = trinan $ 
    134134             , FORPLT = forplt, REALSECTION = realsection $ 
    135135             , MORE = more, EXCHANGE_XY = exchange_xy $ 
     
    208208    IF (n_elements(mask) GT 1 OR n_elements(masknan) GT 1) $ 
    209209      AND NOT keyword_set(cont_nofill) THEN BEGIN  
    210 ;      tonan = where((mask*masknan) EQ 0, count) 
    211       tonan = where(remplit(mask*masknan, nite = 1, mask = mask*masknan $ 
     210      IF keyword_set(maskorg) THEN tonan = maskorg*masknan ELSE tonan = mask*masknan  
     211      tonan = where(remplit(tonan, nite = 1, mask = tonan $ 
    212212                            , /basique, fillval = 0 $ 
    213213                            , fillxdir = keyword_set(realsection)) EQ 0, count) 
  • trunk/SRC/ToBeReviewed/PLOTS/DESSINE/pltz.pro

    r163 r171  
    341341  IF NOT keyword_set(endpoints)  THEN BEGIN 
    342342    if keyword_set(nan) then trinan = triangule(masknan, /basic, coinmonte = coinmontenan, coindescend = coindescendnan) 
     343    maskorg = mask 
    343344    decoupeterre, mask, glammsk, gphimsk, gdepmsk, type = type, WDEPTH = wdepth, REALSECTION = realsection 
    344345    axis4pltz, type, mask, glammsk, gphimsk, gdepmsk, XXAXIS = xmask, ZZAXIS = zmask, SIN = sin, ZRATIO = zratio, ZOOM = zoom, PROFMAX = profmax, PROFMIN = profmin, _extra = ex 
     
    362363    , c_labels = 1-(indgen(n_elements(level_z2d)) MOD 2) $ 
    363364    , c_thick = thick, unsur2 = unsur2 $ 
    364     , masknan = masknan, trinan = trinan $ 
     365    , maskorg = maskorg, masknan = masknan, trinan = trinan $ 
    365366    , coinmontenan = coinmontenan, coindescendnan = coindescendnan $ 
    366367    , coinmontemask = coinmontemask, coindescendmask = coindescendmask $ 
Note: See TracChangeset for help on using the changeset viewer.