Each line of a .clr file consists of either a comment, or a keyword and its parameters.
A Keyword Line consist of several tokens (strings or numbers) that are separated by whitespace (the space character [ASCII 32] or Tab stops [ASCII 9]). The line begins with the Keyword itself, which may be followed by a Keyword Modifier and then a number of Keyword Parameters:
!Keyword !Modifier parameter1 parameter2 parameter3 ... parameterN
The Exclamation mark "!" is used to distinguish Keywords and Modifiers from parameters. The possible Modifiers and the allowed number of parameters depend on the Keyword.
A consequence of the use of whitespace as parameter separator are certain limitations to string parameters: only one string parameter per keyword is possible, since strings may consist of several words which are also separated by whitespace, and a string parameter also has to be the last parameter of a multi-parameter keyword.
A simple example is
!name IASP91
where "name" is the keyword and "IASP91" is a string parameter. A Modifier is not present. This example line defines the model name to be "IASP91".
A more advanced example is
!layer !depth 0 20
Where "layer" is the keyword, "depth" is a modifier and "0" and "20" are the parameters. This example defines a layer to reach from depth 0km to depth 20km.
An alternative definition of the same depth range is
!layer !radius 6351 6371
which, of course, requires that the planetary radius is defined as 6371km somewhere.
The following tables give a list of all Keywords, their Modifiers and the specified Parameters.
List of all Keywords:
Modifier | Parameter | Type | Explanation |
---|---|---|---|
- | model name | string | Velocity models usually have names like "IASP91" or "PREM". |
Modifier | Parameter | Type | Explanation |
---|---|---|---|
- | model publication year | numeric | The year in which the model was first published. |
Modifier | Parameter | Type | Explanation |
---|---|---|---|
name | planet name | string | The planet's name ("earth", "moon" etc.). This is an informational parameter which helps to avoid confusion, but is not evaluated. |
radius | planetary radius | numeric | The radius of the planet for which this model is constructed. |
Modifier | Parameter | Type | Explanation |
---|---|---|---|
start | name | string | Layer start mark. The description of a new layer begins here. The layer name parameter is optional and may be omitted. |
depth | 1. depth of layer top 2. depth of layer bottom |
numeric | Parameter polynomials of this layer are valid from top depth to bottom depth. |
radius | 1. radius of layer bottom 2. radius of layer top |
numeric | Parameter polynomials of this layer are valid from bottom radius to top radius. |
end | - | - | Layer end mark. The description of the current layer ends here. |
vp | 1. constant term of layer polynomial 2. 1st order coefficient of layer polynomial 3. 2nd order coefficient of layer polynomial ... n. (n-1)-th order coefficient of layer polynomial |
numeric | P wave velocity polynomial. Physical properties of layers are defined by (n-1)-th degree polynomials. The degree of the polynomial is implied by the number of coefficients given. |
vs | 1. constant term of layer polynomial 2. 1st order coefficient of layer polynomial 3. 2nd order coefficient of layer polynomial ... n. (n-1)-th order coefficient of layer polynomial |
numeric | S wave velocity polynomial. Physical properties of layers are defined by (n-1)-th degree polynomials. The degree of the polynomial is implied by the number of coefficients given. |
rho | 1. constant term of layer polynomial 2. 1st order coefficient of layer polynomial 3. 2nd order coefficient of layer polynomial ... n. (n-1)-th order coefficient of layer polynomial |
numeric | Density polynomial. Physical properties of layers are defined by (n-1)-th degree polynomials. The degree of the polynomial is implied by the number of coefficients given. |
qp | 1. constant term of layer polynomial 2. 1st order coefficient of layer polynomial 3. 2nd order coefficient of layer polynomial ... n. (n-1)-th order coefficient of layer polynomial |
numeric | P wave quality factor polynomial. Physical properties of layers are defined by (n-1)-th degree polynomials. The degree of the polynomial is implied by the number of coefficients given. |
qs | 1. constant term of layer polynomial 2. 1st order coefficient of layer polynomial 3. 2nd order coefficient of layer polynomial ... n. (n-1)-th order coefficient of layer polynomial |
numeric | S wave quality factor polynomial. Physical properties of layers are defined by (n-1)-th degree polynomials. The degree of the polynomial is implied by the number of coefficients given. |
Modifier | Parameter | Type | Explanation |
---|---|---|---|
depth | 1. discontinuity depth 2. discontinuity name |
1. numeric 2. string |
Depth and name of a discontinuity |
radius | 1. discontinuity radius 2. discontinuity name |
1. numeric 2. string |
Radius and name of a discontinuity |
Modifier | Parameter | Type | Explanation |
---|---|---|---|
- | User Tag | string | An arbitrary string may be used as an additional information. Might be useful when generating files automatically. |