- Timestamp:
- 04/15/11 19:49:48 (13 years ago)
- Location:
- trunk/SRC
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Computation/bsf.pro
r445 r462 23 23 ; @keyword REFVALUE {type=scalar} {default=0.} 24 24 ; the bsf value that we want to speficy at the position defined by refpoint 25 ; 26 ; @keyword TRANSPORT {type=scalar: 0 or 1} {default=0.} 27 ; activate to specify that z3d is not a zonal current but a zonal 28 ; transport (e2u*e3u*un) 25 29 ; 26 30 ; @returns {type=2D xy array} … … 59 63 ;- 60 64 ; 61 FUNCTION bsf, z3d, NOSTRUCTURE = nostructure, REFPOINT = refpoint, REFVALUE = refvalue 65 FUNCTION bsf, z3d, NOSTRUCTURE = nostructure, REFPOINT = refpoint, REFVALUE = refvalue, TRANSPORT = transport 62 66 ; 63 67 compile_opt idl2, strictarrsubs … … 81 85 un = fitintobox(temporary(un)) 82 86 ; 83 e23 = e3u_3d(/e2) 84 ; 85 ; mask the array 86 un = temporary(umsk) * temporary(un) 87 ; current -> transport 88 IF NOT keyword_set(transport) THEN un = temporary(un) * e3u_3d(/e2) 89 utr = temporary(umsk) * temporary(un) 87 90 ; compute the bsf 88 bsf = 1.e-6 * total(total(temporary(u n) * temporary(e23), 3), 2, /cumulative)91 bsf = 1.e-6 * total(total(temporary(utr), 3), 2, /cumulative) 89 92 ; set bsf to 0 in the largest continent... no done... 90 93 IF keyword_set(refpoint) THEN BEGIN -
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) -
trunk/SRC/ToBeReviewed/LECTURE/read_ncdf.pro
r460 r462 189 189 firsttps = long(beginning[0]) 190 190 IF n_elements(ending) NE 0 THEN lasttps = long(ending[0]) ELSE lasttps = firsttps 191 jpt = lasttps-firsttps+1 192 IF NOT keyword_set(callitself) then time = julday(1, 1, 1) + lindgen(jpt) 191 IF NOT keyword_set(callitself) then BEGIN 192 time = ncdf_gettime(filename, cdfid, caller = 'read_ncdf', err = err, _extra = ex) 193 jpt = lasttps-firsttps+1 194 IF time[0] LT 0 then time = julday(1, 1, 1) + lindgen(jpt) $ 195 ELSE time = time[firsttps:lasttps] 196 ENDIF ELSE jpt = lasttps-firsttps+1 193 197 END 194 198 keyword_set(parent):BEGIN … … 204 208 jpt = lasttps-firsttps+1 205 209 END 206 keyword_set(allrecords) :BEGIN210 keyword_set(allrecords) OR n_elements(beginning) EQ 0:BEGIN 207 211 time = ncdf_gettime(filename, cdfid, caller = 'read_ncdf', err = err, _extra = ex) 208 212 IF time[0] LT 0 then BEGIN
Note: See TracChangeset
for help on using the changeset viewer.