Changeset 445 for trunk/SRC/ToBeReviewed/CALCULS/moyenne.pro
- Timestamp:
- 01/19/11 13:03:43 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/ToBeReviewed/CALCULS/moyenne.pro
r442 r445 376 376 IF keyword_set(key_partialstep) THEN BEGIN 377 377 ; the top of the ocean floor is 378 IF vargrid EQ 'T' OR vargrid EQ 'W' THEN bottom = total(mask, 3) $ 379 ELSE bottom = total(tmask[firstx:lastx, firsty:lasty, firstz:lastz], 3) 378 bottom = total(tmask[firstx:lastx, firsty:lasty, *], 3) 380 379 ; we suppress columns with only ocean or land 381 good = where(bottom NE 0 AND bottom NE nz) 380 bottom = long(temporary(bottom)) - firstz - 1L 381 good = where(bottom GE 0 AND bottom LT nz) 382 382 ; the bottom of the ocean in 3D index is: 383 bottom = lindgen(nx*ny)+ (temporary(bottom)-1L)*nx*ny383 bottom = lindgen(nx*ny)+nx*ny*temporary(bottom) 384 384 IF good[0] NE -1 THEN bottom = bottom[good] $ 385 385 ELSE bottom = -1 … … 447 447 end 448 448 (dirx eq 0) and (diry eq 0) and (dirz eq 1) : begin 449 e33 = replicate(1, 1.*nx*ny)#e3 450 e33 = reform(e33, nx, ny, nz, /over) 449 e33 = e3_3d() 451 450 IF keyword_set(sshh) THEN e33[*, *, 0] = e33[*, *, 0] + sshh 452 IF keyword_set(key_partialstep) AND bottom[0] NE -1 THEN BEGIN453 IF keyword_set(wdepth) THEN $454 e33[bottom] = (e3w_ps[firstx:lastx, firsty:lasty])[temporary(good)] $455 ELSE e33[bottom] = (e3t_ps[firstx:lastx, firsty:lasty])[temporary(good)]456 ENDIF457 451 if keyword_set(integration) then divi = 1 else begin 458 452 divi = e33*mask … … 500 494 end 501 495 (dirx eq 1) and (diry eq 0) and (dirz eq 1) : begin 502 e133 = e1[*]#e3 503 e133 = reform(e133, nx, ny, nz, /over) 496 e133 = e3_3d(/e1) 504 497 IF keyword_set(sshh) THEN e133[*, *, 0] = e133[*, *, 0] + sshh*e1 505 IF keyword_set(key_partialstep) AND bottom[0] NE -1 THEN BEGIN506 IF keyword_set(wdepth) THEN $507 e133[bottom] = (e1*e3w_ps[firstx:lastx, firsty:lasty])[temporary(good)] $508 ELSE e133[bottom] = (e1*e3t_ps[firstx:lastx, firsty:lasty])[temporary(good)]509 ENDIF510 498 if keyword_set(integration) then divi = 1 else BEGIN 511 499 divi = e133*mask … … 525 513 end 526 514 (dirx eq 0) and (diry eq 1) and (dirz eq 1) : begin 527 e233 = e2[*]#e3 528 e233 = reform(e233, nx, ny, nz, /over) 515 e233 = e3_3d(/e2) 529 516 IF keyword_set(sshh) THEN e233[*, *, 0] = e233[*, *, 0] + sshh*e2 530 IF keyword_set(key_partialstep) AND bottom[0] NE -1 THEN BEGIN531 IF keyword_set(wdepth) THEN $532 e233[bottom] = (e2*e3w_ps[firstx:lastx, firsty:lasty])[temporary(good)] $533 ELSE e233[bottom] = (e2*e3t_ps[firstx:lastx, firsty:lasty])[temporary(good)]534 ENDIF535 517 if keyword_set(integration) then divi = 1 else BEGIN 536 518 divi = e233*mask … … 550 532 end 551 533 (dirx eq 1) and (diry eq 1) and (dirz eq 1) : begin 552 e1233 = (e1*e2)[*]#e3 553 e1233 = reform(e1233, nx, ny, nz, /over) 534 e1233 = e3_3d(/e1, /e2) 554 535 IF keyword_set(sshh) THEN e1233[*, *, 0] = e1233[*, *, 0] + sshh*e1*e2 555 IF keyword_set(key_partialstep) AND bottom[0] NE -1 THEN BEGIN556 IF keyword_set(wdepth) THEN $557 e1233[bottom] = (e1*e2*e3w_ps[firstx:lastx, firsty:lasty])[temporary(good)] $558 ELSE e1233[bottom] = (e1*e2*e3t_ps[firstx:lastx, firsty:lasty])[temporary(good)]559 ENDIF560 536 if keyword_set(integration) then divi = 1 else BEGIN 561 537 if msknan[0] NE -1 then divi = total(e1233*mask*msknan) $
Note: See TracChangeset
for help on using the changeset viewer.