Changeset 445 for trunk/SRC/Computation
- Timestamp:
- 01/19/11 13:03:43 (13 years ago)
- Location:
- trunk/SRC/Computation
- Files:
-
- 5 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Computation/bsf.pro
r388 r445 81 81 un = fitintobox(temporary(un)) 82 82 ; 83 IF keyword_set(key_partialstep) THEN BEGIN 84 ; 2D e3u at the bottom of the ocean 85 ; see zgr_zps: e3u (ji,jj,jk) = MIN( e3t(ji,jj,jk), e3t(ji+1,jj,jk)) 86 e3u_ps = [[[e3t_ps[firstx:lastx, firsty:lasty]]], [[shift(e3t_ps[firstx:lastx, firsty:lasty], -1, 0)]]] 87 e3u_ps = min(temporary(e3u_ps), dimension = 3) 88 flagdata = NOT (keyword_set(key_periodic) AND nx EQ jpi) AND total(umsk[nx-1, *, *]) NE 0 89 ; level of the bottom of the ocean 90 bottom = total(tmask[firstx:lastx, firsty:lasty, firstz:lastz], 3) 91 bottom = 0L > ( long(temporary(bottom)) - 1L ) 92 ; the bottom of the ocean in 3D index is: 93 bottom = lindgen(nx*ny) + temporary(bottom)*nx*ny 94 ; 3D e3t array 95 e33 = replicate(1., nx*ny) # e3t[firstz:lastz] 96 ; apply e3u_ps to e33 at the bottom of the ocean 97 e33[temporary(bottom)] = e3u_ps 98 ; 3D e2u array 99 e23d = (e2u[firstx:lastx, firsty:lasty])[*] # replicate(1., nzt) 100 ; e2u*e3u 101 e23 = temporary(e23d) * temporary(e33) 102 ENDIF ELSE BEGIN 103 e23 = (e2u[firstx:lastx, firsty:lasty])[*] # e3t[firstz:lastz] 104 ENDELSE 83 e23 = e3u_3d(/e2) 105 84 ; 106 85 ; mask the array -
trunk/SRC/Computation/msf.pro
r388 r445 95 95 IF keyword_set(key_partialstep) AND total(msk[*, ny-1, *]) NE 0 THEN flagdata = 1 96 96 ; 97 ; 98 IF keyword_set(key_partialstep) THEN BEGIN 99 100 ; Rebuild the T-point 3D partial steps array from 2D bottom e3t_ps 101 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 102 ; level of the bottom of the ocean 103 bottom = total(tmask[firstx:lastx, firsty:lasty, firstz:lastz], 3) 104 bottom = 0L > ( long(temporary(bottom)) - 1L ) 105 ; the bottom of the ocean in 3D index is: 106 bottom = lindgen(nx*ny) + temporary(bottom)*nx*ny 107 ; 3D e3t array 108 e3t_3D = replicate(1, nx*ny) # e3t[firstz:lastz] 109 ; apply e3t_ps to e3t_3D at the bottom of the ocean 110 e3t_3D[temporary(bottom)] = e3t_ps[firstx:lastx, firsty:lasty] 111 ; 3D e3t_3D array 112 e3t_3D = reform(e3t_3D, nx, ny, nz, /overwrite) 113 114 ; Rebuild the V-point 3D partial steps array from T-point 3D e3t_3D array 115 tmp = shift(e3t_3D, 0, -1, 0) 116 e3v_3D = [ [ (temporary(e3t_3D))[*] ], [ (temporary(tmp))[*] ] ] 117 e3v_3D = min(temporary(e3v_3D), dimension = 2) 118 119 ; 3D e1v array 120 e1_3D = (e1v[firstx:lastx, firsty:lasty])[*] # replicate(1., nz) 121 ; e1v*e3v 122 e13 = temporary(e1_3D) * temporary(e3v_3D) 123 ENDIF ELSE BEGIN 124 e13 = (e1v[firstx:lastx, firsty:lasty])[*] # e3t[firstz:lastz] 125 ENDELSE 97 e13 = e3v_3d(/e1) 126 98 ; 127 99 ; mask the array
Note: See TracChangeset
for help on using the changeset viewer.