Changeset 450


Ignore:
Timestamp:
01/31/11 16:41:25 (13 years ago)
Author:
smasson
Message:

improve the way to take into account continents in e3t/w

Location:
trunk/SRC/Computation
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/SRC/Computation/e3t_3d.pro

    r447 r450  
    4444    keyword_set(e1) AND keyword_set(e2):arr2d = e1t[fstx:lstx, fsty:lsty] * e2t[fstx:lstx, fsty:lsty] 
    4545    keyword_set(e1)                    :arr2d = e1t[fstx:lstx, fsty:lsty] 
    46                         keyword_set(e2):arr2d =                             e2t[fstx:lstx, fsty:lsty] 
     46    keyword_set(e2):arr2d =                             e2t[fstx:lstx, fsty:lsty] 
    4747    ELSE:arr2d = replicate(1., nx*ny) 
    4848  ENDCASE 
     
    5454; level of the bottom of the ocean 
    5555    bottom = total(tmask[fstx:lstx, fsty:lsty, *], 3) 
     56    sea = where(bottom NE 0) 
    5657    bottom2 = long(temporary(bottom)) - firstzt 
    5758    bottom  = bottom2 - 1L 
    58     ok  = where(bottom  GE 0 AND bottom  LT nzt) 
    59     ok2 = where(bottom2 GE 0 AND bottom2 LT nzt) 
     59    ok  = inter(sea, where(bottom  GE 0 AND bottom  LT nzt)) 
     60    ok2 = inter(sea, where(bottom2 GE 0 AND bottom2 LT nzt)) 
    6061; apply e3t_ps to e3t_3D at the bottom of the ocean 
    6162    IF ok[0]  NE -1 THEN BEGIN  
  • trunk/SRC/Computation/e3w_3d.pro

    r447 r450  
    4848; level of the bottom of the ocean 
    4949    bottom = total(tmask[firstxt:lastxt, firstyt:lastyt, *], 3) 
     50    sea = where(bottom NE 0) 
    5051    bottom2 = long(temporary(bottom)) - firstzw 
    5152    bottom  = bottom2 - 1L 
    52     ok  = where(bottom  GE 0 AND bottom  LT nzw) 
    53     ok2 = where(bottom2 GE 0 AND bottom2 LT nzw) 
     53    ok  = inter(sea, where(bottom  GE 0 AND bottom  LT nzw)) 
     54    ok2 = inter(sea, where(bottom2 GE 0 AND bottom2 LT nzw)) 
    5455; apply e3w_ps to e3w_3D at the bottom of the ocean 
    5556    IF ok[0]  NE -1 THEN BEGIN 
Note: See TracChangeset for help on using the changeset viewer.