Changeset 252
- Timestamp:
- 06/25/07 11:44:12 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Grid/computegrid.pro
r240 r252 101 101 ; 102 102 ; @keyword PLAIN {default=0}{type=scalar: 0 or 1} 103 ; Force PERIODIC = 0, SHIFT = 0, STRIDE = [1, 1, 1] and 104 ; suppress the automatic redefinition of the domain in case of 105 ; x periodicity overlap, y periodicity overlap (ORCA type only) 106 ; and mask border to 0. 103 ; Force YREVERSE = 0, ZREVERSE = 0, PERIODIC = 0, SHIFT = 0, STRIDE = [1, 1, 1] and 104 ; suppress the automatic redefinition of the domain in case of x periodicity overlap, 105 ; y periodicity overlap (ORCA type only) and mask border to 0. 107 106 ; 108 107 ; @keyword SHIFT {default=computed according to glamboundary}{type=scalar} … … 208 207 ; Used by xxx... 209 208 ; 209 ; @keyword YREVERSE {default=computed according to gphit[0, 1:jpj-1] LT gphit[0, 0:jpj-2]}{type=scalar} 210 ; Force the manual definition of the y reverse that must be apply to the data. 211 ; The resulting value will be stored in the common (cm_4mesh) variable key_yreverse 212 ; 210 213 ; @keyword ZAXIS {type=1D} 211 214 ; Specify the vertical axis. Must be sorted in the increasing or decreasing order 215 ; 216 ; @keyword ZREVERSE {default=computed according to gdept[0] GT gdept[1]}{type=scalar} 217 ; Force the manual definition of the z reverse that must be apply to the data. 218 ; The resulting value will be stored in the common (cm_4mesh) variable key_zreverse 212 219 ; 213 220 ; @keyword _EXTRA … … 219 226 ; cm_4cal 220 227 ; 228 221 229 ; @restrictions 222 230 ; if the grid has x/y periodicity overlap and/or if … … 249 257 , ONEARTH = onearth, PERIODIC = periodic $ 250 258 , PLAIN = plain, SHIFT = shift, STRIDE = stride $ 259 , YREVERSE = yreverse, ZREVERSE = zreverse $ 251 260 , FULLCGRID = fullcgrid, XYINDEX = xyindex $ 252 261 , UBASE2TBASE = ubase2tbase, VBASE2TBASE = vbase2tbase, FBASE2TBASE = fbase2tbase $ … … 356 365 ; 357 366 IF keyword_set(plain) THEN BEGIN 367 yreverse = 0 368 zreverse = 0 358 369 periodic = 0 359 370 shift = 0 … … 499 510 ;==================================================== 500 511 ; check the peridicity if iyminmesh and iymaxmesh have the default definitions... 501 IF NOT keyword_set(plain) AND key_onearth EQ 1 AND key_stride[1] EQ 1$512 IF NOT keyword_set(plain) AND key_onearth EQ 1 $ 502 513 AND iyminmesh EQ 0l AND iymaxmesh eq jpjglo-1 AND jpj GE 3 AND jpi GE 2 THEN BEGIN 503 514 … … 537 548 ; check the peridicity if ixminmesh and ixmaxmesh have the default definitions... 538 549 IF NOT keyword_set(plain) AND NOT keyword_set(forcenoperio) AND key_onearth EQ 1 $ 539 AND key_stride[0] EQ 1 ANDixminmesh EQ 0l AND ixmaxmesh eq jpiglo-1 AND jpi GE 3 THEN BEGIN550 AND ixminmesh EQ 0l AND ixmaxmesh eq jpiglo-1 AND jpi GE 3 THEN BEGIN 540 551 CASE 0 OF 541 552 total((glamt[0, *] - glamt[jpi-2, *]) MOD 360) $ … … 576 587 ;==================================================== 577 588 ; 578 IF jpj GT 1 THEN BEGIN 579 IF total(gphit[0, 1:jpj-1] LT gphit[0, 0:jpj-2]) GT jpj/2 THEN BEGIN 580 key_yreverse = 1 581 gphit = reverse(gphit, 2) 582 glamt = reverse(glamt, 2) 589 IF n_elements(yreverse) EQ 0 THEN BEGIN 590 IF jpj GT 1 THEN BEGIN 591 IF total(gphit[0, 1:jpj-1] LT gphit[0, 0:jpj-2]) GT jpj/2 THEN key_yreverse = 1 ELSE key_yreverse = 0 583 592 ENDIF ELSE key_yreverse = 0 584 ENDIF ELSE key_yreverse = 0 593 ENDIF ELSE key_yreverse = yreverse 594 IF keyword_set(key_yreverse) THEN BEGIN 595 gphit = reverse(gphit, 2) 596 glamt = reverse(glamt, 2) 597 ENDIF 585 598 ; 586 599 ;==================================================== … … 978 991 ELSE:BEGIN 979 992 gdept = zaxis[izminmesh:izmaxmesh] 980 IF jpk GT 1 THEN BEGIN 981 if gdept[0] GT gdept[1] then begin 982 gdept = reverse(gdept) 983 key_zreverse = 1 993 IF n_elements(zreverse) EQ 0 THEN BEGIN 994 IF jpk GT 1 THEN BEGIN 995 if gdept[0] GT gdept[1] then key_zreverse = 1 ELSE key_zreverse = 0 984 996 ENDIF ELSE key_zreverse = 0 985 ENDIF ELSE key_zreverse = 0 997 ENDIF ELSE key_zreverse = zreverse 998 IF keyword_set(key_zreverse) THEN gdept = reverse(gdept) 986 999 END 987 1000 ENDCASE … … 1125 1138 glamf = glamt + 0.5 * stepxf 1126 1139 ENDIF ELSE glamf = glamt + 0.5 1140 IF keyword_set(key_periodic) AND (max(glamf)-min(glamt)) GE 360 THEN BEGIN 1141 IF NOT keyword_set(glamboundary) THEN BEGIN 1142 bigger = where(glamf GE min(glamt)+360) 1143 glamf[bigger] = glamf[bigger]-360. 1144 ENDIF ELSE glamf = glamboundary[0] > temporary(glamf) < glamboundary[1] 1145 ENDIF 1127 1146 IF jpj GT 1 THEN BEGIN 1128 1147 ; we must compute stepyf: y distance between T(i,j) T(i+1,j+1)
Note: See TracChangeset
for help on using the changeset viewer.