Changeset 192 for trunk/SRC/ToBeReviewed
- Timestamp:
- 09/22/06 11:37:08 (18 years ago)
- Location:
- trunk/SRC/ToBeReviewed
- Files:
-
- 1 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/ToBeReviewed/INIT/initncdf.pro
r172 r192 125 125 xvarid = (where(namevar EQ xaxisname OR namevar EQ 'longitude' $ 126 126 OR namevar EQ 'nav_lon' OR namevar EQ 'lon' $ 127 OR namevar EQ 'lon_rho' OR namevar EQ 'NbLongitudes'))[0] 128 romsgrid = strmid(namevar[xvarid], 0, 4) EQ 'lon_' 127 OR namevar EQ 'lon_rho' OR namevar EQ 'nblongitudes'))[0] 129 128 if xvarid EQ -1 then begin 130 129 print, 'the xaxis was not found, check the use of XAXISNAME keyword' 131 130 stop 132 131 endif 132 romsgrid = strmid(namevar[xvarid], 0, 4) EQ 'lon_' 133 133 ; get the size of xaxis 134 134 xinq = ncdf_varinq(cdfid, xvarid) … … 149 149 yvarid = (where(namevar EQ yaxisname OR namevar EQ 'latitude' $ 150 150 OR namevar EQ 'nav_lat' OR namevar EQ 'lat' $ 151 OR namevar EQ 'lat_rho' OR namevar EQ ' NbLatitudes'))[0]151 OR namevar EQ 'lat_rho' OR namevar EQ 'nblatitudes'))[0] 152 152 yvarid = yvarid[0] 153 153 if yvarid EQ -1 then begin -
trunk/SRC/ToBeReviewed/LECTURE/read_ncdf.pro
r181 r192 67 67 ; (the first 1D array with unlimited dimension) is not the good one. 68 68 ; 69 ; @keyword HFILENAME {default=FILENAME}{type=string}70 ; For ROMS outputs. The filename of the file where h vriable should be read71 ;72 69 ; @keyword ZETAFILENAME {default=FILENAME}{type=string} 73 70 ; For ROMS outputs. The filename of the file where zeta vriable should be read … … 103 100 , TOUT = tout, NOSTRUCT = nostruct, CONT_NOFILL = CONT_NOFILL, INIT = init $ 104 101 , GRID = grid, FBASE2TBASE = fbase2tbase, CALLITSELF = callitself $ 105 , HFILENAME = hfilename,ZETAFILENAME = zetafilename, ZETAZERO = zetazero $102 , ZETAFILENAME = zetafilename, ZETAZERO = zetazero $ 106 103 , _EXTRA = ex 107 104 ;--------------------------------------------------------- … … 567 564 ENDFOR 568 565 CASE 1 OF 569 keyword_set(hfilename): $570 hroms = read_ncdf('h', 0, 0, FILENAME = hfilename $571 , /TIMESTEP, /NOSTRUCT, CONT_NOFILL = CONT_NOFILL $572 , GRID = vargrid, /CALLITSELF, _EXTRA = ex)573 (where(allvarnames EQ 'h'))[0] NE -1: $574 hroms = read_ncdf('h', 0, 0, FILENAME = filename $575 , /TIMESTEP, /NOSTRUCT, CONT_NOFILL = CONT_NOFILL $576 , GRID = vargrid, /CALLITSELF, _EXTRA = ex)577 ELSE:return, report('The variable h was not found in the file, please use the keyword HFILENAME to specify the name of a file containing h')578 ENDCASE579 CASE 1 OF580 566 keyword_set(zetazero):zeta = fltarr(nx, ny, jpt) 581 567 keyword_set(zetafilename): $ … … 589 575 ELSE:return, report('The variable zeta was not found in the file, please use the keyword ZETAFILENAME to specify the name of a file containing zeta or use keyword ZETAZERO to define zeta to 0.') 590 576 ENDCASE 591 romszinfos = {h: temporary(hroms), zeta:temporary(zeta), theta_s:theta_s, theta_b:theta_b, hc:hc}577 romszinfos = {h:romszinfos.h, zeta:temporary(zeta), theta_s:theta_s, theta_b:theta_b, hc:hc} 592 578 ENDIF ELSE romszinfos = {h:-1, zeta:-1, theta_s:-1, theta_b:-1, hc:-1} 593 579 ENDIF -
trunk/SRC/ToBeReviewed/LECTURE/read_ncdf_varget.pro
r142 r192 75 75 ;,,,,,,,,,,,,,,,,,,,,,,,, 76 76 ncdf_varget,cdfid,name,res,offset=[firstx+ixmin,firsty+iymin] $ 77 ,count=[nx,ny] , _extra = ex77 ,count=[nx,ny] 78 78 END 79 79 ;,,,,,,,,,,,,,,,,,,,,,,,, … … 83 83 ncdf_varget,cdfid,name,res,offset=[firstx*key_stride[0]+ixmin $ 84 84 ,firsty*key_stride[1]+iymin] $ 85 ,count=[nx,ny], stride = key_stride[0:1] , _extra = ex85 ,count=[nx,ny], stride = key_stride[0:1] 86 86 END 87 87 ;,,,,,,,,,,,,,,,,,,,,,,,, … … 94 94 ncdf_varget,cdfid,name,res,offset=[ixmin-key+firstx $ 95 95 ,firsty+iymin] $ 96 ,count=[nx,ny] , _extra = ex96 ,count=[nx,ny] 97 97 END 98 98 ; ......... part, we can directly extract the array in one piece … … 100 100 ncdf_varget,cdfid,name,res,offset=[jpi-key+ixmin+firstx $ 101 101 ,firsty+iymin] $ 102 ,count=[nx,ny] , _extra = ex102 ,count=[nx,ny] 103 103 END 104 104 ELSE:BEGIN ; we have to extract the array in 2 pieces... … … 106 106 ncdf_varget,cdfid,name,tab1,offset=[jpi-key+ixmin+firstx $ 107 107 ,firsty+iymin] $ 108 ,count=[key-1-firstx+1,ny] , _extra = ex108 ,count=[key-1-firstx+1,ny] 109 109 ; --------- part, second part... 110 110 ncdf_varget,cdfid,name,tab2,offset=[ixmin,firsty+iymin] $ 111 ,count=[lastx-key+1,ny] , _extra = ex111 ,count=[lastx-key+1,ny] 112 112 res = [temporary(tab1), temporary(tab2)] 113 113 END … … 125 125 +(firstx-((key-1)/key_stride[0]+1))*key_stride[0] $ 126 126 ,firsty*key_stride[1]+iymin] $ 127 ,count=[nx,ny], stride = key_stride[0:1] , _extra = ex127 ,count=[nx,ny], stride = key_stride[0:1] 128 128 END 129 129 ; ......... part, we can directly extract the array in one piece … … 131 131 ncdf_varget,cdfid,name,res,offset=[jpitotal-key+ixmin+firstx*key_stride[0] $ 132 132 ,firsty*key_stride[1]+iymin] $ 133 ,count=[nx,ny], stride = key_stride[0:1] , _extra = ex133 ,count=[nx,ny], stride = key_stride[0:1] 134 134 END 135 135 ELSE:BEGIN ; we have to extract the array in 2 pieces... … … 138 138 ,firsty*key_stride[1]+iymin] $ 139 139 ,count=[(key-firstx*key_stride[0]-1)/key_stride[0]+1,ny] $ 140 , stride = key_stride[0:1] , _extra = ex140 , stride = key_stride[0:1] 141 141 ; --------- part, second part... 142 142 ncdf_varget,cdfid,name,tab2,offset=[ixmin $ … … 144 144 , firsty*key_stride[1]+iymin] $ 145 145 ,count=[nx-(key-firstx*key_stride[0]-1)/key_stride[0]-1,ny] $ 146 , stride = key_stride[0:1] , _extra = ex146 , stride = key_stride[0:1] 147 147 ; in one unique array... 148 148 res = [temporary(tab1), temporary(tab2)] … … 163 163 ;,,,,,,,,,,,,,,,,,,,,,,,, 164 164 ncdf_varget,cdfid,name,res,offset=[firstx+ixmin,firsty+iymin,firstz+izmin] $ 165 ,count=[nx,ny,nz] , _extra = ex165 ,count=[nx,ny,nz] 166 166 END 167 167 ;,,,,,,,,,,,,,,,,,,,,,,,, … … 172 172 ,firsty*key_stride[1]+iymin $ 173 173 ,firstz*key_stride[2]+izmin] $ 174 ,count=[nx,ny,nz], stride = key_stride , _extra = ex174 ,count=[nx,ny,nz], stride = key_stride 175 175 END 176 176 ;,,,,,,,,,,,,,,,,,,,,,,,, … … 183 183 ,firsty+iymin $ 184 184 ,firstz+izmin] $ 185 ,count=[nx,ny,nz] , _extra = ex185 ,count=[nx,ny,nz] 186 186 END 187 187 lastx LE key-1:BEGIN ; on peut tout couper d''un coup … … 189 189 ,firsty+iymin $ 190 190 ,firstz+izmin] $ 191 ,count=[nx,ny,nz] , _extra = ex191 ,count=[nx,ny,nz] 192 192 END 193 193 ELSE:BEGIN ; Le tableau est separe en 2 morceaux... … … 195 195 ,firsty+iymin $ 196 196 ,firstz+izmin] $ 197 ,count=[key-1-firstx+1,ny,nz] , _extra = ex197 ,count=[key-1-firstx+1,ny,nz] 198 198 ncdf_varget,cdfid,name,tab2,offset=[ixmin $ 199 199 ,firsty+iymin $ 200 200 ,firstz+izmin] $ 201 ,count=[lastx-key+1,ny,nz] , _extra = ex201 ,count=[lastx-key+1,ny,nz] 202 202 res = [temporary(tab1), temporary(tab2)] 203 203 END … … 215 215 ,firsty*key_stride[1]+iymin $ 216 216 ,firstz*key_stride[2]+izmin] $ 217 ,count=[nx,ny,nz], stride = key_stride , _extra = ex217 ,count=[nx,ny,nz], stride = key_stride 218 218 END 219 219 lastx*key_stride[0] LE key-1:BEGIN ; on peut tout couper d''un coup … … 221 221 ,firsty*key_stride[1]+iymin $ 222 222 ,firstz*key_stride[2]+izmin] $ 223 ,count=[nx,ny,nz], stride = key_stride , _extra = ex223 ,count=[nx,ny,nz], stride = key_stride 224 224 END 225 225 ELSE:BEGIN ; le tableau est separe en 2 morceaux... … … 228 228 ,firstz*key_stride[2]+izmin] $ 229 229 ,count=[(key-firstx*key_stride[0]-1)/key_stride[0]+1,ny,nz] $ 230 , stride = key_stride , _extra = ex230 , stride = key_stride 231 231 ; 2eme bout... 232 232 ncdf_varget,cdfid,name,tab2,offset=[ixmin $ … … 235 235 ,firstz*key_stride[2]+izmin] $ 236 236 ,count=[nx-(key-firstx*key_stride[0]-1)/key_stride[0]-1,ny,nz] $ 237 , stride = key_stride , _extra = ex237 , stride = key_stride 238 238 ; on recolle le tout 239 239 res = [temporary(tab1), temporary(tab2)] … … 256 256 ,firsty+iymin $ 257 257 ,firsttps] $ 258 ,count=[nx,ny,jpt] , _extra = ex258 ,count=[nx,ny,jpt] 259 259 END 260 260 ;,,,,,,,,,,,,,,,,,,,,,,,, … … 265 265 ,firsty*key_stride[1]+iymin $ 266 266 ,firsttps] $ 267 ,count=[nx,ny,jpt], stride = [key_stride[0:1], 1] , _extra = ex267 ,count=[nx,ny,jpt], stride = [key_stride[0:1], 1] 268 268 END 269 269 ;,,,,,,,,,,,,,,,,,,,,,,,, … … 277 277 ,firsty+iymin $ 278 278 ,firsttps] $ 279 ,count=[nx,ny,jpt] , _extra = ex279 ,count=[nx,ny,jpt] 280 280 END 281 281 ; ......... part, we can directly extract the array in one piece … … 284 284 ,firsty+iymin $ 285 285 ,firsttps] $ 286 ,count=[nx,ny,jpt] , _extra = ex286 ,count=[nx,ny,jpt] 287 287 END 288 288 ELSE:BEGIN ; Le tableau est separe en 2 morceaux... … … 291 291 ,firsty+iymin $ 292 292 ,firsttps] $ 293 ,count=[key-1-firstx+1,ny,jpt] , _extra = ex293 ,count=[key-1-firstx+1,ny,jpt] 294 294 ; --------- part, second part... 295 295 ncdf_varget,cdfid,name,tab2,offset=[ixmin $ 296 296 ,firsty+iymin $ 297 297 ,firsttps] $ 298 ,count=[lastx-key+1,ny,jpt] , _extra = ex298 ,count=[lastx-key+1,ny,jpt] 299 299 res = [temporary(tab1), temporary(tab2)] 300 300 END … … 313 313 ,firsty*key_stride[1]+iymin $ 314 314 ,firsttps] $ 315 ,count=[nx,ny,jpt], stride = [key_stride[0:1], 1] , _extra = ex315 ,count=[nx,ny,jpt], stride = [key_stride[0:1], 1] 316 316 END 317 317 ; ......... part, we can directly extract the array in one piece … … 320 320 ,firsty*key_stride[1]+iymin $ 321 321 ,firsttps] $ 322 ,count=[nx,ny,jpt], stride = [key_stride[0:1], 1] , _extra = ex322 ,count=[nx,ny,jpt], stride = [key_stride[0:1], 1] 323 323 END 324 324 ELSE:BEGIN … … 328 328 ,firsttps] $ 329 329 ,count=[(key-firstx*key_stride[0]-1)/key_stride[0]+1,ny,jpt] $ 330 , stride = [key_stride[0:1], 1] , _extra = ex330 , stride = [key_stride[0:1], 1] 331 331 ; --------- part, second part... 332 332 ncdf_varget,cdfid,name,tab2,offset=[ixmin $ … … 335 335 ,firsttps] $ 336 336 ,count=[nx-(key-firstx*key_stride[0]-1)/key_stride[0]-1,ny,jpt] $ 337 , stride = [key_stride[0:1], 1] , _extra = ex337 , stride = [key_stride[0:1], 1] 338 338 ; on recolle le tout 339 339 res = [temporary(tab1), temporary(tab2)] … … 357 357 ,firstz+izmin $ 358 358 ,firsttps] $ 359 ,count=[nx,ny,nz,jpt] , _extra = ex359 ,count=[nx,ny,nz,jpt] 360 360 END 361 361 ;,,,,,,,,,,,,,,,,,,,,,,,, … … 367 367 ,firstz*key_stride[2]+izmin $ 368 368 ,firsttps] $ 369 ,count=[nx,ny,nz,jpt], stride = [key_stride, 1] , _extra = ex369 ,count=[nx,ny,nz,jpt], stride = [key_stride, 1] 370 370 END 371 371 ;,,,,,,,,,,,,,,,,,,,,,,,, … … 379 379 ,firstz+izmin $ 380 380 ,firsttps] $ 381 ,count=[nx,ny,nz,jpt] , _extra = ex381 ,count=[nx,ny,nz,jpt] 382 382 END 383 383 lastx LE key-1:BEGIN ; on peut tout couper d''un coup … … 386 386 ,firstz+izmin $ 387 387 ,firsttps] $ 388 ,count=[nx,ny,nz,jpt] , _extra = ex388 ,count=[nx,ny,nz,jpt] 389 389 END 390 390 ELSE:BEGIN ; Le tableau est separe en 2 morceaux... … … 393 393 ,firstz+izmin $ 394 394 ,firsttps] $ 395 ,count=[key-1-firstx+1,ny,nz,jpt] , _extra = ex395 ,count=[key-1-firstx+1,ny,nz,jpt] 396 396 ncdf_varget,cdfid,name,tab2,offset=[ixmin $ 397 397 ,firsty+iymin $ 398 398 ,firstz+izmin $ 399 399 ,firsttps] $ 400 ,count=[lastx-key+1,ny,nz,jpt] , _extra = ex400 ,count=[lastx-key+1,ny,nz,jpt] 401 401 res = [temporary(tab1), temporary(tab2)] 402 402 END … … 415 415 ,firstz*key_stride[2]+izmin $ 416 416 ,firsttps] $ 417 ,count=[nx,ny,nz,jpt], stride = [key_stride, 1] , _extra = ex417 ,count=[nx,ny,nz,jpt], stride = [key_stride, 1] 418 418 END 419 419 lastx*key_stride[0] LE key-1:BEGIN ; on peut tout coupe d''un coup … … 422 422 ,firstz*key_stride[2]+izmin $ 423 423 ,firsttps] $ 424 ,count=[nx,ny,nz,jpt], stride = [key_stride, 1] , _extra = ex424 ,count=[nx,ny,nz,jpt], stride = [key_stride, 1] 425 425 END 426 426 ELSE:BEGIN ; le tableau est separe en 2 morceaux... … … 430 430 ,firsttps] $ 431 431 ,count=[(key-firstx*key_stride[0]-1)/key_stride[0]+1,ny,nz,jpt] $ 432 , stride = [key_stride, 1] , _extra = ex432 , stride = [key_stride, 1] 433 433 ; 2eme bout... 434 434 ncdf_varget,cdfid,name,tab2,offset=[ixmin $ … … 438 438 , firsttps] $ 439 439 ,count=[nx-(key-firstx*key_stride[0]-1)/key_stride[0]-1,ny,nz,jpt] $ 440 , stride = [key_stride, 1] , _extra = ex440 , stride = [key_stride, 1] 441 441 ; on recolle le tout 442 442 res = [temporary(tab1), temporary(tab2)] -
trunk/SRC/ToBeReviewed/PLOTS/DESSINE/pltt.pro
r172 r192 464 464 z2d = remplit(z2d,nite=2+keyword_set(nan), mask = mask, /basique, _extra=ex) 465 465 if NOT keyword_set(strictfill) then z2d = min > z2d < max 466 usetri = 0 ; default definition 466 467 if keyword_set(nan) then BEGIN 467 468 triangulation = triangule(mask, /basic, coinmonte = coinmontemask $ … … 469 470 usetri = 1 470 471 ENDIF ELSE triangulation = -1 471 472 472 IF size(gdep, /n_dimensions) EQ 2 THEN BEGIN 473 473 usetri = 2 -
trunk/SRC/ToBeReviewed/STRING/getfile.pro
r163 r192 81 81 endif 82 82 ENDIF ELSE file = filein 83 if !version.os_family EQ 'unix' then begin84 spawn, 'cat '+file, res85 if res[0] NE '' then return, res ELSE return, ''86 endif87 83 88 84 if (!version.release+0. ge 5.5) then begin -
trunk/SRC/ToBeReviewed/TRIANGULATION/ciseauxtri.pro
r163 r192 16 16 ; 17 17 ; @param GPHI 18 ;19 ; @keyword ALL20 18 ; 21 19 ; @keyword _EXTRA … … 36 34 ;------------------------------------------------------------ 37 35 ;------------------------------------------------------------ 38 FUNCTION ciseauxtri, triang, glam, gphi, ALL = all,_EXTRA = ex36 FUNCTION ciseauxtri, triang, glam, gphi, _EXTRA = ex 39 37 ;--------------------------------------------------------- 40 38 ; … … 115 113 endif 116 114 ; 117 ; We delete all triangle which are out of the valid frame when on supprime les triangles qui sont un peu trop hors du cadre 118 ; valable qd ALL is activated 115 ; We delete all triangle which are out of the valid frame 119 116 ; 120 117 if keyword_set(key_irregular) then begin -
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/cutcmd.pro
r150 r192 88 88 stop 89 89 ENDIF 90 other = cutted[1-start:*:2]90 IF n_elements(cutted) EQ 1 THEN other = '' ELSE other = cutted[1-start:*:2] 91 91 ; make sure that we have a prefix for each nameexp 92 92 IF start EQ 0 THEN other = ['', other] -
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/loadgrid.pro
r181 r192 72 72 IF strmid(listing, 0, 1) NE '@' THEN listing = listing + ', strcalling = ''' + meshfilein + ''', _extra = ex' 73 73 74 print, listing75 76 77 74 createpro, listing, filename = myuniquetmpdir +'for_createpro.pro', _extra = ex 78 75 -
trunk/SRC/ToBeReviewed/WIDGET/xxx.pro
r186 r192 356 356 ; computation done on the files... 357 357 if keyword_set(uvalue) then txtvalue = (extractatt(uvalue, 'txtcmd'))[numdessinin] $ 358 ELSE txtvalue = varexp358 ELSE txtvalue = '"' + varexp + '"' 359 359 dummyid = widget_text(base, value = txtvalue, uvalue = {name:'txtcmd'}, uname = 'txtcmd' $ 360 360 , /editable, yoffset = yoff, xsize = 54, /frame)
Note: See TracChangeset
for help on using the changeset viewer.