Changeset 114 for trunk/SRC/ToBeReviewed/CALCULS/norme.pro
- Timestamp:
- 06/19/06 16:14:56 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/ToBeReviewed/CALCULS/norme.pro
r25 r114 70 70 FUNCTION norme, composanteu, composantev, BOXZOOM = boxzoom, DIREC = direc, _extra = ex 71 71 ;--------------------------------------------------------- 72 ; 73 compile_opt idl2, strictarrsubs 74 ; 72 75 @cm_4mesh 73 76 @cm_4data … … 197 200 ; construction de u et v aux pts T 198 201 ;----------------------------------------------------------- 199 a=u (0,*,*)202 a=u[0,*,*] 200 203 u=(u+shift(u,1,0,0))/2. 201 if NOT keyword_set(key_periodic) OR nx NE jpi then u (0,*,*)=a202 a=v (*,0,*)204 if NOT keyword_set(key_periodic) OR nx NE jpi then u[0,*,*]=a 205 a=v[*,0,*] 203 206 v=(v+shift(v,0,1,0))/2. 204 if NOT keyword_set(key_periodic) OR nx NE jpi then v (*,0,*)=a207 if NOT keyword_set(key_periodic) OR nx NE jpi then v[*,0,*]=a 205 208 ;---------------------------------------------------------------------------- 206 209 ; attribution du mask et des tableau de longitude et latitude … … 215 218 if landv[0] NE -1 then v[landv] = 0 216 219 res=sqrt(u^2+v^2) 217 if NOT keyword_set(key_periodic) OR nx NE jpi then res (0,*, *)=!values.f_nan218 res (*,0, *)=!values.f_nan220 if NOT keyword_set(key_periodic) OR nx NE jpi then res[0,*, *]=!values.f_nan 221 res[*,0, *]=!values.f_nan 219 222 mask = where(mask eq 0) 220 IF mask[0] NE -1 THEN res (mask)= valmask223 IF mask[0] NE -1 THEN res[mask] = valmask 221 224 ; moyennes en tous genres 222 225 domdef, (glamt[indice2d])[0, 0], (glamu[indice2d])[nx-1, 0],(gphit[indice2d])[0, 0], (gphiv[indice2d])[0, ny-1], vert1, vert2, /meme … … 257 260 ; construction de u et v aux pts T 258 261 ;----------------------------------------------------------- 259 a=u (0,*,*)262 a=u[0,*,*] 260 263 u=(u+shift(u,1,0,0))/2. 261 if NOT keyword_set(key_periodic) OR nx NE jpi then u (0,*,*)=a262 a=v (*,0,*)264 if NOT keyword_set(key_periodic) OR nx NE jpi then u[0,*,*]=a 265 a=v[*,0,*] 263 266 v=(v+shift(v,0,1,0))/2. 264 if NOT keyword_set(key_periodic) OR nx NE jpi then v (*,0,*)=a267 if NOT keyword_set(key_periodic) OR nx NE jpi then v[*,0,*]=a 265 268 ;---------------------------------------------------------------------------- 266 269 ; attribution du mask et des tableau de longitude et latitude … … 280 283 if landv[0] NE -1 then v[landv] = 0 281 284 res=sqrt(u^2+v^2) 282 if NOT keyword_set(key_periodic) OR nx NE jpi then res (0,*, *)=!values.f_nan283 res (*,0, *)=!values.f_nan285 if NOT keyword_set(key_periodic) OR nx NE jpi then res[0,*, *]=!values.f_nan 286 res[*,0, *]=!values.f_nan 284 287 mask = where(mask eq 0) 285 288 IF mask[0] NE -1 THEN BEGIN … … 288 291 mask = (temporary(mask))[*]#replicate(1, jpt) 289 292 mask =temporary(mask[*]) + temporary(coeftps[*]) 290 res (temporary(mask))= valmask293 res[temporary(mask)] = valmask 291 294 ENDIF 292 295 ; moyennes en tous genres … … 344 347 ; construction de u et v aux pts T 345 348 ;----------------------------------------------------------- 346 a=u (0,*,*,*)349 a=u[0,*,*,*] 347 350 u=(u+shift(u,1,0,0,0))/2. 348 if NOT keyword_set(key_periodic) OR nx NE jpi then u (0,*,*,*)=a349 a=v (*,0,*,*)351 if NOT keyword_set(key_periodic) OR nx NE jpi then u[0,*,*,*]=a 352 a=v[*,0,*,*] 350 353 v=(v+shift(v,0,1,0,0))/2. 351 if NOT keyword_set(key_periodic) OR nx NE jpi then v (*,0,*,*)=a354 if NOT keyword_set(key_periodic) OR nx NE jpi then v[*,0,*,*]=a 352 355 ;---------------------------------------------------------------------------- 353 356 ; attribution du mask et des tableau de longitude et latitude … … 362 365 if landv[0] NE -1 then v[landv] = 0 363 366 res=sqrt(u^2+v^2) 364 if NOT keyword_set(key_periodic) OR nx NE jpi then res (0,*, *, *)=!values.f_nan365 res (*,0, *, *)=!values.f_nan367 if NOT keyword_set(key_periodic) OR nx NE jpi then res[0,*, *, *]=!values.f_nan 368 res[*,0, *, *]=!values.f_nan 366 369 mask = where(mask eq 0) 367 370 IF mask[0] NE -1 THEN BEGIN … … 370 373 mask = (temporary(mask))[*]#replicate(1, jpt) 371 374 mask =temporary(mask[*]) + temporary(coeftps[*]) 372 res (temporary(mask))= valmask375 res[temporary(mask)] = valmask 373 376 ENDIF 374 377 ; moyennes en tous genres … … 416 419 ; construction de u et v aux pts T 417 420 ;----------------------------------------------------------- 418 a=u (0,*)421 a=u[0,*] 419 422 u=(u+shift(u,1,0))/2. 420 if NOT keyword_set(key_periodic) OR nx NE jpi then u (0,*)=a421 a=v (*,0)423 if NOT keyword_set(key_periodic) OR nx NE jpi then u[0,*]=a 424 a=v[*,0] 422 425 v=(v+shift(v,0,1))/2. 423 if NOT keyword_set(key_periodic) OR nx NE jpi then v (*,0)=a426 if NOT keyword_set(key_periodic) OR nx NE jpi then v[*,0]=a 424 427 ;---------------------------------------------------------------------------- 425 428 ; attribution du mask et des tableau de longitude et latitude … … 439 442 if landv[0] NE -1 then v[landv] = 0 440 443 res=sqrt(u^2+v^2) 441 if NOT keyword_set(key_periodic) OR nx NE jpi then res (0,*)=!values.f_nan442 res (*,0)=!values.f_nan444 if NOT keyword_set(key_periodic) OR nx NE jpi then res[0,*]=!values.f_nan 445 res[*,0]=!values.f_nan 443 446 mask = where(mask eq 0) 444 IF mask[0] NE -1 THEN res (mask)= valmask447 IF mask[0] NE -1 THEN res[mask] = valmask 445 448 ; moyennes en tous genres 446 449 domdef, (glamt[indice2d])[0, 0], (glamu[indice2d])[nx-1, 0],(gphit[indice2d])[0, 0], (gphiv[indice2d])[0, ny-1], vert1, vert2, /meme
Note: See TracChangeset
for help on using the changeset viewer.