Changeset 388 for trunk/SRC/ToBeReviewed/GRILLE/decoupeterre.pro
- Timestamp:
- 12/09/08 10:36:41 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/ToBeReviewed/GRILLE/decoupeterre.pro
r386 r388 34 34 ; @keyword USETRI 35 35 ; 36 ; @keyword MASKDTA 37 ; 2d array defining the mask that must be applied to the data instead 38 ; of the default mask which is defined according to the grid (t/u/v/f mask) 39 ; 36 40 ; @keyword _EXTRA 37 41 ; Used to pass keywords … … 64 68 PRO decoupeterre, mask, glam, gphi, gdep $ 65 69 , TYPE=type, TRI=tri, INDICEZOOM=indicezoom $ 66 , COINMONTE=coinmonte, COINDESCEND=coindescend $70 , COINMONTE=coinmonte, COINDESCEND=coindescend, MASKDTA = maskdta $ 67 71 , WDEPTH=wdepth, REALSECTION=realsection, USETRI=usetri $ 68 72 , _EXTRA=ex … … 193 197 ;------------------------------------------------------------ 194 198 if keyword_set(wdepth) then begin 195 firstz = 0 > (min([firstzt, firstzw])-1) 196 lastz = (max([lastzt, lastzw])+1) < (jpk-1) 199 firstzw = 0 > (min([firstzt, firstzw])-1) 200 lastzw = (max([lastzt, lastzw])+1) < (jpk-1) 201 nzw = lastzw - firstzw + 1 202 firstz = firstzw 203 lastz = lastzw 204 nz = nzw 197 205 ENDIF ELSE BEGIN 198 206 firstz = firstzt 199 207 lastz = lastzt 208 nz = nzt 200 209 ENDELSE 201 nz = lastz-firstz+1202 210 ;------------------------------------------------------------ 203 211 ; mask 204 212 ;------------------------------------------------------------ 213 IF keyword_set(maskdta) THEN BEGIN 214 mask = byte(fitintobox(maskdta)) 215 IF keyword_set(wdepth) THEN BEGIN 216 mask = shift(temporary(mask), 0, 1) 217 mask[*, 0] = 0b 218 ENDIF 219 ENDIF ELSE BEGIN 205 220 case type of 206 221 'xy':BEGIN … … 221 236 END 222 237 ELSE:mask = tmask[firstx:lastx, firsty:lasty, firstz:lastz] 223 endcase 238 ENDCASE 239 ENDELSE 224 240 ;------------------------------------------------------------ 225 241 ; vertical axis … … 240 256 ; in that case, the z axis is a 2d array and we modify the depth of 241 257 ; the last level ocean with hdepw that is the real depth of the bottom. 258 ; in domzgr: hdepw(ji,jj) = gdepw(ji,jj,ik+1) 242 259 CASE 1 OF 243 keyword_set(key_partialstep) andtype EQ 'xz' $260 keyword_set(key_partialstep) AND type EQ 'xz' $ 244 261 AND ny EQ 1 AND keyword_set(realsection):BEGIN 245 bottom = total(mask, 3 )262 bottom = total(mask, 3 - keyword_set(maskdta)) 246 263 good = where(bottom NE 0 AND bottom NE nz) 247 bottom = lindgen(nx)+(bottom)*nx248 264 IF good[0] NE -1 THEN BEGIN 265 bottom = lindgen(nx)+(bottom)*nx 249 266 bottom = bottom[good] 250 267 gdep = replicate(1, nx)#gdep … … 253 270 ENDIF 254 271 END 255 keyword_set(key_partialstep) andtype EQ 'yz' $272 keyword_set(key_partialstep) AND type EQ 'yz' $ 256 273 AND nx EQ 1 AND keyword_set(realsection):BEGIN 257 bottom = total(mask, 3 )274 bottom = total(mask, 3 - keyword_set(maskdta)) 258 275 good = where(bottom NE 0 AND bottom NE nz) 259 bottom = lindgen(ny)+(bottom)*ny260 276 IF good[0] NE -1 THEN BEGIN 277 bottom = lindgen(ny)+(bottom)*ny 261 278 bottom = bottom[good] 262 279 gdep = replicate(1, ny)#gdep
Note: See TracChangeset
for help on using the changeset viewer.