Changeset 365
- Timestamp:
- 07/31/08 15:29:06 (16 years ago)
- Location:
- trunk/SRC/ToBeReviewed
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/ToBeReviewed/INIT/initncdf.pro
r327 r365 3 3 ; @file_comments 4 4 ; Initfile for Netcdf file. define all the grid parameters through 5 ; an appropriate call to computegid5 ; an appropriate call to <pro>computegrid</pro> 6 6 ; 7 7 ; @categories -
trunk/SRC/ToBeReviewed/LECTURE/read_ncdf.pro
r337 r365 19 19 ; Relative with the time axis. 20 20 ; These can be 21 ; - 2 date of the type yyyymmdd and in this case, we select dates21 ; - 2 dates of the type yyyymmdd and in this case, we select data 22 22 ; which are included between these two dates. 23 ; - 2 indexes which define between which and which time step we have23 ; - 2 indexes which define between which and which time steps we have 24 24 ; to extract the temporal dimension. 25 25 ; 26 ; @param ENDING 26 ; @param ENDING {in}{required} 27 27 ; Relative with the time axis. 28 28 ; See BEGINNING. … … 44 44 ; a string used to specify the direction along which we want to make 45 45 ; spatial and/or temporal mean. It could be: 'x' 'y' 'z' 't' 'xy' 'xz' 46 ; 'yz' 'xyz' 'xt' 'yt' 'zt' 'xyt' 'xzt' 'yzt' or 'xyzt' 46 ; 'yz' 'xyz' 'xt' 'yt' 'zt' 'xyt' 'xzt' 'yzt' or 'xyzt' 47 47 ; 48 48 ; @keyword FILENAME {required}{type=string} … … 50 50 ; 51 51 ; @keyword INIT {default=0}{type=scalar: 0 or 1} 52 ; To call automatically <pro>initncdf</pro> with filename as input argument 52 ; To call automatically <pro>initncdf</pro> with filename as input argument 53 53 ; and thus ; redefine all the grid parameters 54 54 ; … … 153 153 ENDFOR 154 154 ;------------------------------------------------------------ 155 ; we check if the variable has a vertical dimension and/or 156 ; a record dimension. This is useful to define boxzoom 155 ; we check if the variable has a vertical dimension and/or 156 ; a record dimension. This is useful to define boxzoom 157 157 ; keyword in domdef 158 158 ;------------------------------------------------------------ 159 dummy = where(varinq.dim EQ inq.recdim, tinvar) 159 dummy = where(varinq.dim EQ inq.recdim, tinvar) 160 160 ; check the presence of a vertical dimension according to the 161 161 ; number of dimensions and the presence of a record dimension … … 174 174 ; define time and jpt 175 175 CASE 1 OF 176 keyword_set(timestep):BEGIN 176 keyword_set(timestep):BEGIN 177 177 firsttps = long(beginning[0]) 178 178 IF n_elements(ending) NE 0 THEN lasttps = long(ending[0]) ELSE lasttps = firsttps … … 180 180 IF NOT keyword_set(callitself) then time = julday(1, 1, 1) + lindgen(jpt) 181 181 END 182 keyword_set(parent):BEGIN 182 keyword_set(parent):BEGIN 183 183 widget_control, parent, get_uvalue = top_uvalue 184 184 filelist = extractatt(top_uvalue, 'filelist') … … 192 192 jpt = lasttps-firsttps+1 193 193 END 194 ELSE:BEGIN 194 ELSE:BEGIN 195 195 time = ncdf_gettime(filename, cdfid, caller = 'read_ncdf', err = err, _extra = ex) 196 196 IF n_elements(err) NE 0 THEN BEGIN … … 257 257 ENDELSE 258 258 ;--------------------------------------------------------------- 259 ; redefinition of the 259 ; redefinition of the domain 260 260 ;--------------------------------------------------------------- 261 261 IF keyword_set(tout) THEN BEGIN … … 343 343 varinq.ndims eq 2: earth = where(mask[*, *, 0] EQ 0) ;xy array 344 344 varinq.ndims eq 3 AND (where(varinq.dim EQ inq.recdim))[0] EQ -1:earth = where(mask EQ 0) ;xyz array 345 varinq.ndims eq 3 AND (where(varinq.dim EQ inq.recdim))[0] NE -1:earth = where(mask[*, *, 0] EQ 0) ;xyt array 345 varinq.ndims eq 3 AND (where(varinq.dim EQ inq.recdim))[0] NE -1:earth = where(mask[*, *, 0] EQ 0) ;xyt array 346 346 varinq.ndims eq 4: earth = where(mask EQ 0) ;xyzt array 347 347 ENDCASE … … 368 368 ENDIF 369 369 IF missing[0] NE -1 THEN res[temporary(missing)] = !values.f_nan 370 IF earth[0] NE -1 THEN BEGIN 371 IF varinq.ndims eq 3 AND (where(varinq.dim EQ inq.recdim))[0] NE -1 THEN $ ;xyt array 370 IF earth[0] NE -1 THEN BEGIN 371 IF varinq.ndims eq 3 AND (where(varinq.dim EQ inq.recdim))[0] NE -1 THEN $ ;xyt array 372 372 earth = earth#replicate(1, jpt)+replicate(nx*ny, n_elements(earth))#lindgen(jpt) 373 373 IF varinq.ndims eq 4 THEN earth = earth#replicate(1, jpt)+replicate(nx*ny*nz, n_elements(earth))#lindgen(jpt) 374 374 res[temporary(earth)] = 1.e20 375 ENDIF 375 ENDIF 376 376 ;--------------------------------------------------------------------- 377 377 ; if it is roms outputs, we need to get additionals infos... … … 412 412 jpt = 1 413 413 ENDIF 414 ENDELSE 414 ENDELSE 415 415 ENDIF 416 416 ;--------------------------------------------------------------------- -
trunk/SRC/ToBeReviewed/PLOTS/DIVERS/checkfield.pro
r360 r365 215 215 IF n_elements(arr) EQ 1 THEN BEGIN 216 216 if arr EQ -1 then $ 217 return, report('Error: input array = -1. Maybe the reading did ont perform well...', /simple) $217 return, report('Error: input array = -1. Maybe the reading did not perform well...', /simple) $ 218 218 ELSE return, report('Error: input array is a scalar', /simple) 219 219 ENDIF
Note: See TracChangeset
for help on using the changeset viewer.