Changeset 192 for trunk/SRC/ToBeReviewed/LECTURE/read_ncdf.pro
- Timestamp:
- 09/22/06 11:37:08 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note: See TracChangeset
for help on using the changeset viewer.