contents

Changing the Earth Model in Use


The iscloc program is designed to make it as simple as possible to change the method employed to calculate the travel times that are compared with observed travel times to get the residuals used in solution of hypocentre locations.  Travel times themselves are returned by the function read_ttime, which calls a model specific function read_jb.  This separates residual calculation from the method used to estimate travel times and it is possible to alter read_ttime to call a different function that calculates travel times in a different way.  Any part of the program that needs to know travel times (e.g. functions calc_resid , mark_duplicates) can call read_ttime and so remain unchanged.  It would be possible to use read_ttime to check that phases are identified consistently with the model in use, but in practice it is much more efficient to use a set of simple rules to check the majority of phase identifications.  These rules are, of course, specific to the model in use and so an alternative function would have to be called to do this job if a different travel time method was required.  A similar method to that for travel times has been used to buffer the calculation of pP - P differential travel times from from the calculation of pP - P residuals and the solution of depth phase depth.

There are three functions that need to be replaced if a different earth model is used to replace Jeffreys - Bullen. These are:
The functions that call these functions will then need to be edited to call the new functions instead.  The calling functions are
In function id_pha it will also probably be necessary to alter the phase_map structure to reflect the phase names used in the model being used.  In the same way it may be necessary to change the phase_weight structure in function get_weight_factor.

In function calc_resid the maximum depth allowed by the model is required and read in from an external variable . This variable is set in function read_ttime so read_ttime must include the relevant definition.  This is conveniently done for JB by including the header file, jb_model.h,  used by the model specific functions.  Other functions that need to know some details of the model in use also include this header file.

If the model were changed then the include statements in these functions would need to be updated: