Changeset 462 for trunk/SRC/Computation/msf.pro
- Timestamp:
- 04/15/11 19:49:48 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Computation/msf.pro
r445 r462 28 28 ; Set this keyword to a named variable in which msf will return the 2d 29 29 ; array (yz) should be used by pltz to do plot the land/sea mask(see example) 30 ; 31 ; @keyword TRANSPORT {type=scalar: 0 or 1} {default=0.} 32 ; activate to specify that z3d is not a zonal current but a zonal 33 ; transport (e1v*e3v*vn) 30 34 ; 31 35 ; @returns {type=2D yz array} … … 65 69 ;- 66 70 ; 67 FUNCTION msf, z3d, mask2d, INDEXBOXZOOM = indexboxzoom, MASKOUT = maskout, NOSTRUCTURE = nostructure 71 FUNCTION msf, z3d, mask2d, INDEXBOXZOOM = indexboxzoom, MASKOUT = maskout, NOSTRUCTURE = nostructure, TRANSPORT = transport 68 72 ; 69 73 compile_opt idl2, strictarrsubs … … 95 99 IF keyword_set(key_partialstep) AND total(msk[*, ny-1, *]) NE 0 THEN flagdata = 1 96 100 ; 97 e13 = e3v_3d(/e1) 101 ; current -> transport 102 IF NOT keyword_set(transport) THEN vn = temporary(vn) * e3v_3d(/e1) 103 vtr = temporary(vn) * msk 98 104 ; 99 ; mask the array100 vn = temporary(vn) * msk101 105 IF arg_present(maskout) THEN BEGIN 102 106 msk = total(temporary(msk), 1) … … 108 112 ; 109 113 ; defaut computation: 110 ; msf = 1.e-6 * total(total(temporary( e13) * temporary(vn), 1), 2, /cumulative)114 ; msf = 1.e-6 * total(total(temporary(vtr), 1), 2, /cumulative) 111 115 ; but we force the computation from bottom to up. 112 msf = total(temporary(v n) * temporary(e13), 1) ; -> yz array116 msf = total(temporary(vtr), 1) ; -> yz array 113 117 msf = reverse(temporary(msf), 2) 114 118 msf = 1.e-6 * total(temporary(msf), 2, /cumulative)
Note: See TracChangeset
for help on using the changeset viewer.