Task: MODEL Interpolation

NOTE: This section is not about the evaluation of continuously defined models at discrete depths. That is described in the section on conversion between CLR and ND (see TOC).

This section deals with the interpolation of discrete models. Sometimes, a model is given at relatively sparsely distributed depths only. To compute reliable travel times, it is desirable to interpolate the model.

To interpolate a model that is given in a MODEL structure to a new list newz of depth values, call

  newmodel=mkinterpmodel(model,newz,preserveflag);
  

or

  newmodel=mkinterpmodel(model);
  

where

model
the original MODEL structure
newz
a vector of the form min:delta:max, or a scalar
preserveflag
'preserve' or 'simple': a string which defines whether the discontinuities should be preserved during interpolation. Usually, you set this to 'preserve'.

If newz is a scalar, velocities, density and Q factors for the single depth given in that scalar are computed, but the result of mkinterpmodel is still a MODEL structure. Such calls of mkinterpmodel are used internally to determine the velocity at ray turning points.

If the depth sampling is too coarse, spurious caustics and triplications will be produced in the travel times. You should check that all caustics/triplications you can see are for real and do not vanish with better sampling.

If newz and preserveflag are not specified, as in the second case above, the model is interpolated in a way that produces layers that have a constant 5km thickness after application of the Flat Earth Transformation (corresponding to the 'flat' interpolation mode of MKCLR2MODEL). This is espceially useful for computation of core phases which come close to the planet's center, at the cost of increasing cpu time.

IMPORTANT: if you want to use the result MODEL structure in any TTBOX routine, always set 'preserve'. This causes mkinterpmodel to produce a model which has all the discontinuities of the original model at the correct depth and with their original names (in addition to the depths specified in newz!).
The 'simple' mode produces a model which is defined ad the depths given in newz only, which usually smoothes out the discontinuities. 'simple' interpolation has been implemented to determine the velocity at source depth, bu it might also be useful when preparig a model for a FD computation or for other non-TTBOX uses.

TTBOX routines will most probably crash when using them with a 'simple' interpolated model.


eof.