Next: 7.2.3 Loading the equation
Up: 7.2 COBOLD data in
Previous: 7.2.1 Loading the parameter
  Contents
  Index
IDL> modelfile='/home/user/mymodel.full' & n=0
IDL> ful=uio_dataset_rd(modelfile,n=n)
First the name and full path (if not in the actual directory) of the
model file and the wanted time step should be defined. Here, time
step means the consecutive number of the model snapshot in the file.
Declaring a time step number greater than the number of snapshots
contained in the file will cause an error.
Otherwise all data of the particular time step n will be provided in the structure
werden in der Struktur FUL.
Loading more than one timestep from the same file could be achieved as
follows:
IDL> uio_openrd, nc, modelfile, outstr, ierr
IDL> for i=0,ntime-1 do begin &$
IDL> ful=uio_dataset_rd(modelfile, channel=nc,ierr=ierr, outstr=err_msg) &$
IDL> endfor &$
IDL> uio_closrd, nc
Again this operation would cause an error if the wanted time step is
not contained in the file.
Via checking the error flag ierr of the routine uio_dataset_rd such errors can be avoided.
This way it is unnecessary to know exactly of how many time steps the
model file consists.
IDL> uio_openrd, nc, modelfile, outstr, ierr
IDL> i=0
IDL> repeat begin &$
IDL> ful=uio_dataset_rd(modelfile, channel=nc,ierr=ierr, outstr=err_msg) &$
IDL> if (ierr eq 0) then begin &$
IDL> ;-- hier Daten bearbeiten oder in anderer Variable speichern --
IDL> i=i+1 &$
IDL> endif else begin &$
IDL> print,'IDL> Reached EOF.' &$
IDL> endelse &$
IDL> endrep until (ierr ne 0) or (EOF(nc))
IDL> uio_closrd, nc
Next: 7.2.3 Loading the equation
Up: 7.2 COBOLD data in
Previous: 7.2.1 Loading the parameter
  Contents
  Index
Bernd Freytag
2002-02-16