Ignore:
Timestamp:
03/08/10 17:48:29 (14 years ago)
Author:
smasson
Message:

add keepbottom keyword in moyenne and grossemoyenne

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SRC/ToBeReviewed/CALCULS/grossemoyenne.pro

    r378 r424  
    2020; [vert2], [vert1, vert2],[lon1, lon2, lat1, lat2], 
    2121; [lon1, lon2, lat1, lat2, vert2],[lon1, lon2, lat1, lat2, vert1,vert2] 
     22; 
     23; @keyword KEEPBOTTOM {default=0}{type=scalar: 0 or 1} 
     24; used only with partial steps (key_partialstep /= 0). In partial 
     25; steps, bottom points are not located at the same depth => they 
     26; should not be averaged together along x and/or y direction if there 
     27; is no average along z. In this case bottom ponts are set to 
     28;!values.f_nan before doing any call to total. 
    2229; 
    2330; @keyword NAN 
     
    8188; 
    8289;- 
    83 FUNCTION grossemoyenne, tab, direc, BOXZOOM=boxzoom, INTEGRATION=integration $ 
     90FUNCTION grossemoyenne, tab, direc, BOXZOOM=boxzoom, INTEGRATION=integration, KEEPBOTTOM = keepbottom $ 
    8491                      , NAN=nan, NODOMDEF=nodomdef, WDEPTH=wdepth $ 
    8592                      , SPATIALFIRST=spatialfirst, TEMPORALFIRST=temporalfirst $ 
     
    387394        echelle = reform(echelle, nx, ny, nz, jpt, /over) 
    388395        IF keyword_set(key_partialstep) AND bottom[0] NE -1 $ 
    389           AND nx NE 1 THEN BEGIN 
     396          AND nx NE 1 AND NOT keyword_set(keepbottom) THEN BEGIN 
    390397          IF msknan[0] EQ -1 THEN BEGIN 
    391398            msknan = replicate(1b, nx, ny, nz, jpt) 
     
    416423        echelle = reform(echelle, nx, ny, nz, jpt, /over) 
    417424        IF keyword_set(key_partialstep) AND bottom[0] NE -1 $ 
    418           AND ny NE 1 THEN BEGIN 
     425          AND ny NE 1 AND NOT keyword_set(keepbottom) THEN BEGIN 
    419426          IF msknan[0] EQ -1 THEN BEGIN 
    420427            msknan = replicate(1b, nx, ny, nz, jpt) 
     
    468475        echelle = reform(echelle, nx, ny, nz, jpt, /over) 
    469476        IF keyword_set(key_partialstep) AND bottom[0] NE -1 $ 
    470           AND nx*ny NE 1 THEN BEGIN 
     477          AND nx*ny NE 1 AND NOT keyword_set(keepbottom) THEN BEGIN 
    471478          IF msknan[0] EQ -1 THEN BEGIN 
    472479            msknan = replicate(1b, nx, ny, nz, jpt) 
Note: See TracChangeset for help on using the changeset viewer.