Ignore:
Timestamp:
12/23/10 11:09:15 (14 years ago)
Author:
smasson
Message:

add mask2d keyword in moyenne and grossemoyenne

File:
1 edited

Legend:

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

    r441 r442  
    4747; To make an integral rather than an average 
    4848; 
     49; @keyword MASK2D 
     50; an optional 2d mask array (containing only 0 and 1) that can be use 
     51; to modified each levels of the default mask. 
     52; 
    4953; @keyword SPATIALFIRST 
    5054; when performing at the same time 
     
    9397;- 
    9498FUNCTION grossemoyenne, tab, direc, BOXZOOM=boxzoom, INTEGRATION=integration, KEEPBOTTOM = keepbottom $ 
    95                       , NAN=nan, NODOMDEF=nodomdef, WDEPTH=wdepth, ssh=ssh $ 
     99                      , NAN=nan, NODOMDEF=nodomdef, WDEPTH=wdepth, SSH=ssh, MASK2D=mask2d $ 
    96100                      , SPATIALFIRST=spatialfirst, TEMPORALFIRST=temporalfirst $ 
    97101                      , _EXTRA=ex 
     
    168172;--------------------------------------------------------------- 
    169173  grille, mask, glam, gphi, gdep, nx, ny, nz, firstx, firsty, firstz, lastx, lasty, lastz, e1, e2, e3, WDEPTH = wdepth 
     174  IF keyword_set(mask2D) THEN BEGIN 
     175    IF taille[1] eq jpi and taille[2] eq jpj THEN $ 
     176       mmm = mask2D[firstx:lastx, firsty:lasty] ELSE mmm = mask2D 
     177    mask = mask * ( mmm[*] # replicate(1., nz) )  
     178  ENDIF 
    170179;--------------------------------------------------------------- 
    171180; check the use of ssh keyword... 
Note: See TracChangeset for help on using the changeset viewer.