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/moyenne.pro

    r370 r424  
    2323;  [lon1, lon2, lat1, lat2, vert1,vert2] 
    2424; 
     25; @keyword KEEPBOTTOM {default=0}{type=scalar: 0 or 1} 
     26; used only with partial steps (key_partialstep /= 0). In partial 
     27; steps, bottom points are not located at the same depth => they 
     28; should not be averaged together along x and/or y direction if there 
     29; is no average along z. In this case bottom ponts are set to 
     30;!values.f_nan before doing any call to total. 
     31; 
    2532; @keyword NAN 
    2633; not a number, we activate it if we want to average without considerate some masked values of TAB. 
     
    6572; 
    6673;- 
    67 FUNCTION moyenne, tab, direc, BOXZOOM=boxzoom, INTEGRATION=integration $ 
    68                 , NAN=nan, NODOMDEF=nodomdef, WDEPTH=wdepth $ 
    69                 , _EXTRA=ex 
     74FUNCTION moyenne, tab, direc, BOXZOOM=boxzoom, INTEGRATION=integration, KEEPBOTTOM = keepbottom $ 
     75                , NAN=nan, NODOMDEF=nodomdef, WDEPTH=wdepth, _EXTRA=ex 
    7076; 
    7177  compile_opt idl2, strictarrsubs 
     
    363369        e13 = reform(e13, nx, ny, nz, /over) 
    364370        IF keyword_set(key_partialstep) AND bottom[0] NE -1 $ 
    365           AND nx NE 1 THEN BEGIN 
     371          AND nx NE 1 AND NOT keyword_set(keepbottom) THEN BEGIN 
    366372          IF msknan[0] EQ -1 THEN BEGIN 
    367373            msknan = replicate(1b, nx, ny, nz) 
     
    391397        e23 = reform(e23, nx, ny, nz, /over) 
    392398        IF keyword_set(key_partialstep) AND bottom[0] NE -1 $ 
    393           AND ny NE 1 THEN BEGIN 
     399          AND ny NE 1 AND NOT keyword_set(keepbottom) THEN BEGIN 
    394400          IF msknan[0] EQ -1 THEN BEGIN 
    395401            msknan = replicate(1b, nx, ny, nz) 
     
    443449        e123 = reform(e123, nx, ny, nz, /over) 
    444450        IF keyword_set(key_partialstep) AND bottom[0] NE -1 $ 
    445           AND nx*ny NE 1 THEN BEGIN 
     451          AND nx*ny NE 1 AND NOT keyword_set(keepbottom) THEN BEGIN 
    446452          IF msknan[0] EQ -1 THEN BEGIN 
    447453            msknan = replicate(1b, nx, ny, nz) 
Note: See TracChangeset for help on using the changeset viewer.