Changeset 441 for trunk/SRC/ToBeReviewed


Ignore:
Timestamp:
12/22/10 10:56:31 (14 years ago)
Author:
smasson
Message:

update use of ssh in moyenne and grossemoyenne

Location:
trunk/SRC/ToBeReviewed/CALCULS
Files:
2 edited

Legend:

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

    r440 r441  
    172172;--------------------------------------------------------------- 
    173173  IF keyword_set(ssh) AND dirz NE 0 AND firstz EQ 0 AND taille[0] GT 2 THEN BEGIN 
     174    IF vargrid NE 'T' THEN return, report('use of ssh keywords is coded only for T point case...') 
    174175    szssh = size(ssh) 
    175176    IF szssh[1] NE taille[1] OR szssh[2] NE taille[2] THEN $ 
    176177       return, report('ssh and input arrays must have the same size') 
    177     sshh = ssh 
     178    IF taille[1] eq jpi and taille[2] eq jpj THEN $ 
     179       sshh = ssh[firstx:lastx, firsty:lasty,*] ELSE sshh = ssh 
     180    sshh = sshh * ( (mask[*,*,0])[*] # replicate(1., jpt) ) 
    178181  ENDIF 
    179182;------------------------------------------------------------ 
     
    185188      case 1 of 
    186189        taille[1] eq jpi and taille[2] eq jpj and taille[3] eq jpt: $ 
    187           res = tab[firstx:firstx+nx-1 $ 
    188                     , firsty:firsty+ny-1, *] 
     190          res = tab[firstx:firstx+nx-1, firsty:firsty+ny-1, *] 
    189191        taille[1] EQ  nx and taille[2] eq  ny and taille[3] eq jpt:res = tab 
    190192        else:BEGIN 
     
    352354;--------------------------------------------------------------- 
    353355    case 1 of 
    354       taille[1] eq jpi and taille[2] eq jpj and taille[3] eq jpk and taille[4] eq jpt:BEGIN  
     356      taille[1] eq jpi and taille[2] eq jpj and taille[3] eq jpk and taille[4] eq jpt: $  
    355357        res = tab[firstx:lastx, firsty:lasty, firstz:lastz, *] 
    356         IF keyword_set(sshh) THEN sshh = sshh[firstx:lastx, firsty:lasty, *] 
    357       END 
    358       taille[1] eq jpi and taille[2] eq jpj and taille[3] eq nz and taille[4] eq jpt:BEGIN  
     358      taille[1] eq jpi and taille[2] eq jpj and taille[3] eq nz and taille[4] eq jpt: $  
    359359        res = tab[firstx:lastx, firsty:lasty, *, *] 
    360         IF keyword_set(sshh) THEN sshh = sshh[firstx:lastx, firsty:lasty, *] 
    361       END 
    362360      taille[1] EQ  nx and taille[2] eq  ny and taille[3] eq nz and taille[4] eq jpt:res = tab 
    363361      taille[1] EQ  nx and taille[2] eq  ny and taille[3] eq jpk and taille[4] eq jpt: $ 
  • trunk/SRC/ToBeReviewed/CALCULS/moyenne.pro

    r440 r441  
    151151;--------------------------------------------------------------- 
    152152  IF keyword_set(ssh) AND dirz NE 0 AND firstz EQ 0 AND taille[0] GE 2 THEN BEGIN 
     153    IF vargrid NE 'T' THEN return, report('use of ssh keywords is coded only for T point case...') 
    153154    szssh = size(ssh) 
    154155    IF szssh[1] NE taille[1] OR szssh[2] NE taille[2] THEN $ 
    155156       return, report('ssh and input arrays must have the same size') 
    156     sshh = ssh 
     157    IF taille[1] eq jpi and taille[2] eq jpj THEN $ 
     158       sshh = ssh[firstx:lastx, firsty:lasty] ELSE sshh = ssh 
     159    sshh = sshh * mask[*,*,0] 
    157160  ENDIF 
    158161;------------------------------------------------------------ 
     
    330333;--------------------------------------------------------------- 
    331334    case 1 of 
    332       taille[1] eq jpi and taille[2] eq jpj and taille[3] eq jpk:BEGIN 
     335      taille[1] eq jpi and taille[2] eq jpj and taille[3] eq jpk: $ 
    333336        res = tab[firstx:lastx, firsty:lasty, firstz:lastz] 
    334         IF keyword_set(sshh) THEN sshh = sshh[firstx:lastx, firsty:lasty] 
    335       END 
    336       taille[1] eq jpi and taille[2] eq jpj and taille[3] eq nz:BEGIN  
     337      taille[1] eq jpi and taille[2] eq jpj and taille[3] eq nz: $  
    337338        res = tab[firstx:lastx, firsty:lasty, *] 
    338         IF keyword_set(sshh) THEN sshh = sshh[firstx:lastx, firsty:lasty] 
    339       END 
    340339      taille[1] EQ  nx and taille[2] eq  ny and taille[3] eq nz :res = tab 
    341340      taille[1] EQ  nx and taille[2] eq  ny and taille[3] eq jpk : $ 
Note: See TracChangeset for help on using the changeset viewer.