Changeset 226 for trunk/SRC/ToBeReviewed/HOPE
- Timestamp:
- 03/16/07 10:22:26 (17 years ago)
- Location:
- trunk/SRC/ToBeReviewed/HOPE
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/ToBeReviewed/HOPE/computehopegrid.pro
r157 r226 8 8 ; @categories 9 9 ; Grid 10 ; 10 ; 11 11 ; @param XAXIS 12 12 ; … … 68 68 if NOT keyword_set(lasts) then lasts = [jpi-1, jpj-1, jpk-1] 69 69 ; 70 ; de permination of the grid type and of the point type70 ; determination of the grid type and of the point type 71 71 ; 72 72 if keyword_set(pttype) then vargrid = pttype … … 129 129 gphiv = gphit+(gphit[0, 1]-gphit[0, 0])/2. 130 130 gphif = gphit+(gphit[0, 1]-gphit[0, 0])/2. 131 ENDIF ELSE BEGIN 131 ENDIF ELSE BEGIN 132 132 gphiv = gphit 133 133 gphif = gphit … … 181 181 e2f = e2t 182 182 ; 183 ; mask 183 ; mask 184 184 ; 185 185 tmask = replicate(1b, jpi, jpj, jpk) … … 239 239 IF NOT keyword_set(key_forgetold) THEN BEGIN 240 240 @updateold 241 ENDIF 241 ENDIF 242 242 ;------------------------------------------------------------ 243 243 return -
trunk/SRC/ToBeReviewed/HOPE/domainpart.pro
r163 r226 62 62 endif 63 63 ; 64 ; we get the size of the dimens tion id of this section64 ; we get the size of the dimension id of this section 65 65 ; 66 66 dimvar = *top_uvalue[1, findline(top_uvalue, 'dimvar')] -
trunk/SRC/ToBeReviewed/HOPE/findlineandpointtype.pro
r163 r226 68 68 jpj = n_elements(yaxis) 69 69 ; 70 ; de permination of the grid type and of the point type70 ; determination of the grid type and of the point type 71 71 ; 72 72 ; low resolution grid: jpi=128, jpj=121 ( x 2), jpk=20 73 ; 73 ; 74 74 ; 0. 1.4 2.8 4.2 5.6 75 75 ; odd T u T u 93.3 … … 80 80 ; 81 81 ; high resolution grid: jpi=256, jpj=195 ( x 2), jpk=29 82 ; 83 ; 0. 0.7 1.4 2.1 2.8 82 ; 83 ; 0. 0.7 1.4 2.1 2.8 84 84 ; odd T u T u 91.6 85 85 ; even T u T u 91.0 -
trunk/SRC/ToBeReviewed/HOPE/read_hope.pro
r163 r226 7 7 ; 8 8 ; @param EVENT 9 ; 9 ; 10 10 ; 11 11 ; @returns … … 16 16 ; 17 17 ; @examples 18 ; 19 ; 18 ; 20 19 ; @history 21 20 ; … … 244 243 ; A two elements vector [date1, date2]] 245 244 ; the boundary of the calendar with date1 and date2 246 ; fol owing the syntax yyyymmdd245 ; following the syntax yyyymmdd 247 246 ; 248 247 ; @keyword ODDPT 249 248 ; Activate to read only the sections located on ODD 250 ; points 249 ; points 251 250 ; 252 251 ; @keyword EVENPT 253 252 ; Activate to read only the sections located on even 254 ; points 253 ; points 255 254 ; 256 255 ; @keyword ODDEVENPT … … 332 331 compile_opt idl2, strictarrsubs 333 332 ; 334 @common ; usefull only for the definition of iodir 333 @common ; usefull only for the definition of iodir 335 334 if n_elements(filename) EQ 0 then filename = isafile(iodirectory = iodir, _extra = ex) 336 335 IF size(filename, /type) NE 7 THEN return, -1 337 336 filename = isafile(filename = filename, iodirectory = iodir, _extra = ex) 338 337 ; 339 cdfid = ncdf_open(filename) ; id of the netcdf file 338 cdfid = ncdf_open(filename) ; id of the netcdf file 340 339 wathinside = ncdf_inquire(cdfid) ; structure with global informations 341 ;------------------------------- 340 ;------------------------------- 342 341 ; dimensions 343 ;------------------------------- 342 ;------------------------------- 344 343 namedim = strarr(wathinside.ndims) ; name of the dimensions 345 344 typedim = strarr(wathinside.ndims) ; type of the dimensions (x,y,z,t) … … 349 348 ncdf_diminq, cdfid, dimiq, name, value 350 349 namedim[dimiq] = name 351 case 1 of 350 case 1 of 352 351 STRCMP(name, 'lon', 3, /FOLD_CASE):typedim[dimiq] = 'x' 353 352 STRCMP(name, 'lat', 3, /FOLD_CASE):typedim[dimiq] = 'y' … … 363 362 ; dimlist: structure which contains the name and the value of each 364 363 ; dimension 365 ; we suppose that there is always a variable which has the 364 ; we suppose that there is always a variable which has the 366 365 ; same name that the dimension and which gives the values of 367 366 ; this dimension … … 372 371 dimlist = create_struct(dimlist, namedim[dimiq], value) 373 372 endfor 374 ;------------------------------- 373 ;------------------------------- 375 374 ; variables 376 ;------------------------------- 375 ;------------------------------- 377 376 namevar = strarr(wathinside.nvars) ; names of the variables 378 377 ndimsvar = lonarr(wathinside.nvars) ; number of dim for each variable … … 388 387 ; we cut dimvar to select only the interessant part 389 388 dimvar = dimvar[0:max(ndimsvar)-1, *] 390 ; selection of the data variables which are diff rent from the389 ; selection of the data variables which are different from the 391 390 ; dimension variables 392 391 ; we suppose that that data variables are 4D array (with sometime … … 412 411 endfor 413 412 ; 414 ;--------------------------------------------------- 415 ;--------------------------------------------------- 416 ;--------------------------------------------------- 413 ;--------------------------------------------------- 414 ;--------------------------------------------------- 415 ;--------------------------------------------------- 417 416 ; definition of the widget 418 ;--------------------------------------------------- 419 ;--------------------------------------------------- 420 ;--------------------------------------------------- 417 ;--------------------------------------------------- 418 ;--------------------------------------------------- 419 ;--------------------------------------------------- 421 420 base = widget_base(/column) 422 ;--------------------------------------------------- 423 ; first base: 421 ;--------------------------------------------------- 422 ; first base: 424 423 ; droplist to select the type of section 425 424 ; droplist to select the variable 426 425 ; button to select type of line : odd, even or odd-even 427 ;--------------------------------------------------- 426 ;--------------------------------------------------- 428 427 base1 = widget_base(base, /row, /frame) 429 428 typechoice = sectype[uniq(sectype, sort(sectype))] … … 435 434 = 0L > (where(typechoice EQ selectedtype))[0] 436 435 ENDIF ELSE selectedtype = typechoice[0] 437 ; 436 ; 438 437 varchoice = namevar[uniq(namevar, sort(namevar))] 439 438 base12 = widget_droplist(base1, title = 'Available data', value = varchoice, uvalue = {name:'var choice'}, uname = 'var choice') … … 445 444 ; 446 445 base13 = widget_base(base1, /row, uname = 'linechoicebase') 447 ;--------------------------------------------------- 446 ;--------------------------------------------------- 448 447 ; base 2: base to select the domain of the odd points 449 448 ;--------------------------------------------------- 450 449 base2 = widget_base(base, /column, uname = 'basedomainodd', /frame) 451 ;--------------------------------------------------- 450 ;--------------------------------------------------- 452 451 ; base 3: base to select the domain of the even points 453 452 ;--------------------------------------------------- 454 453 base3 = widget_base(base, /column, uname = 'basedomaineven', /frame) 455 ;--------------------------------------------------- 454 ;--------------------------------------------------- 456 455 ; base 4: base to select the domain of the odd-even points 457 456 ;--------------------------------------------------- 458 457 base4 = widget_base(base, /column, uname = 'basedomainodd-even', /frame) 459 ;--------------------------------------------------- 458 ;--------------------------------------------------- 460 459 ; base 5: calendar 461 460 ;--------------------------------------------------- … … 468 467 base51 = cw_calendar(base5, time, uname = 'date1', uvalue = {name:'date1'}) 469 468 base52 = cw_calendar(base5, time, uname = 'date2', uvalue = {name:'date2'}) 470 ;--------------------------------------------------- 469 ;--------------------------------------------------- 471 470 ; base 6: base to select the min, max, ... and others keywords 472 471 ;--------------------------------------------------- 473 472 base6 = cw_specifie(base, /column, uname = 'specifie', uvalue = {name:'specifie'}) 474 ;--------------------------------------------------- 473 ;--------------------------------------------------- 475 474 ; base 7: last base with the action buttons 476 475 ;--------------------------------------------------- … … 478 477 base71 = widget_button(base7, value = 'Plot', uvalue = {name:'plot'}) 479 478 base72 = widget_button(base7, value = 'Cancel', uvalue = {name:'cancel'}) 480 ;--------------------------------------------------- 479 ;--------------------------------------------------- 481 480 ; determination of the selected variable ...... 482 ;--------------------------------------------------- 481 ;--------------------------------------------------- 483 482 goodname = 0 > where(strlowcase(namevar) EQ strlowcase(selectedname)) 484 483 goodtype = 0 > where(sectype EQ selectedtype) … … 568 567 endif 569 568 ENDIF 570 ;--------------------------------------------------- 569 ;--------------------------------------------------- 571 570 ; definition of the uvalue of the base which allows to share the 572 ; variables between programs. 573 ;--------------------------------------------------- 571 ; variables between programs. 572 ;--------------------------------------------------- 574 573 top_uvalue = ptrarr(2, 18, /allocate_heap) 575 574 *top_uvalue[0, 0] = 'type choice' & *top_uvalue[1, 0] = temporary(typechoice) -
trunk/SRC/ToBeReviewed/HOPE/rh_alldomains.pro
r163 r226 43 43 selectedline=(*top_uvalue[1, findline(top_uvalue, 'linetype')])[selected] 44 44 ; 45 ; we get the size of the dimens tion id of this section45 ; we get the size of the dimension id of this section 46 46 ; 47 47 dimvar = *top_uvalue[1, findline(top_uvalue, 'dimvar')] … … 85 85 oddsecchoice = oddsecchoice[sortedzdim] 86 86 nothing=widget_droplist(basedomainodd,title = 'number of levels', value = strtrim(sizedims, 2), uvalue = {name:'oddsecchoice'}, uname='oddsecchoice') 87 ENDIF 87 ENDIF 88 88 domainpart, top_uvalue, basedomainodd, oddsecchoice[0] 89 89 widget_control, basedomainodd, set_uvalue = oddsecchoice 90 ENDIF ELSE BEGIN 90 ENDIF ELSE BEGIN 91 91 nothing=widget_label(basedomainodd, value = ' ', uname = 'title') 92 92 domainpart, top_uvalue, basedomainodd, /destroy … … 115 115 evensecchoice = evensecchoice[sortedzdim] 116 116 nothing=widget_droplist(basedomaineven,title = 'number of levels', value = strtrim(sizedims, 2), uvalue = {name:'evensecchoice'}, uname='evensecchoice') 117 ENDIF 117 ENDIF 118 118 domainpart, top_uvalue, basedomaineven, evensecchoice[0] 119 119 widget_control, basedomaineven, set_uvalue = evensecchoice … … 145 145 oddevensecchoice = oddevensecchoice[sortedzdim] 146 146 nothing=widget_droplist(basedomainoddeven,title = 'number of levels', value = strtrim(sizedims, 2), uvalue = {name:'odd-evensecchoice'}, uname='odd-evensecchoice') 147 ENDIF 147 ENDIF 148 148 domainpart, top_uvalue, basedomainoddeven, oddevensecchoice[0] 149 149 widget_control, basedomainoddeven, set_uvalue = oddevensecchoice
Note: See TracChangeset
for help on using the changeset viewer.