LINZ deformation file format

The LINZ deformation model format is used to represent complex deformation fields which can comprise both an ongoing national deformation model and local perturbations to this field due to earthquakes or other deformation.

The deformation file used by SNAP is a binary file format. The file is generated from a number text files using the makelinzdefmodel.pl script supplied with SNAP. The main file is an index file which defines the deformation model, and the deformation sequences and components of which it comprises (as described in the LINZ deformation model). Each component is in turn represented by either a gridded data file or triangulated data file. Currently LINZ deformation models have only used the grid file format - it is likely the triangulated file format will be deprecated.

There have been three versions of the deformation file format. The first version provided basic grids and a simple time model. Version 2 added support for nested grid formats and more complex time models, including piecewise linear time models. Version 3 add support for multiple versions of the deformation model in one file.

The index file is structured with a header section followed by one or more deformation sequences. Each sequence has one or more deformation components. Each record comprised a code defining the content of the record, followed by the value of the record. Dates in the file are formatted as dd-mmm-yyyy, for example “20-Jan-2004”. This can optionally be followed by a time such as “12:30”

The header section should contain the following records:

Code

Type

Description

DEFORMATION_MODEL

string

The name of the deformation model

FORMAT

string

Defines the variant of the binary file format to generate. The possible values are

LINZDEF3B Big endian binary format - version 3
LINDEF2L Little endian binary format - version 3 (the preferred format for SNAP)
LINZDEF2B Big endian binary format - version 2
LINDEF2L Little endian binary format - version 2
LINZDEF1B Big endian binary format version 1
LINDEF1L Little endian binary format version 1

START_DATE

date

The first date for which the model may be used – dates before this are invalid

END_DATE

date

The last date for which the model may be used – dates after this are invalid

COORDYS

string

A code for the coordinate system in which the deformation is defined – eg NZGD2000.

This is followed by the deformation model version number. This section may be repeated multiple times in the version 3 format.

VERSION_NUMBER

string

The version of the deformation model. This should be formatted YYYYMMDD for the NZGD2000 deformation model, though any string up to 8 characters is valid.

VERSION_DATE

date

The date on which the version was authoritative

DESCRIPTION
text ...
END_DESCRIPTION

text

Description of the model

The header should be followed by one or more deformation sequence section. Each deformation sequence section should contain the following records:

Code

Type

Description

DEFORMATION_SEQUENCE

string

The name of the sequence (eg National model, Arthurs’ Pass earthquake)

DATA_TYPE

string

(Version 1 only) Defines the type of model data, either deformation or velocity

DIMENSION

integer

The dimension of the deformation (1 = height only, 2 = horizontal only, 3 = 3d deformation

START_DATE

date

The first date at which the sequence applies – it is assumed to be zero before this

END_DATE

date

The last date at which the sequence applies – It is assumed to be zero after this date

ZERO_BEYOND_RANGE

string

Either “yes” or “no”. If “yes”, then the deformation sequence defines the deformation to be zero beyond the spatial extents of the components. If “no” then the deformation is undefined beyond the extents of the component – deformations cannot be calculated outside the extents.

NESTED_SEQUENCE

string

(Version 2+ only) Either "yes" or "no". If yes then only the first component of the sequence which spatially includes a point will be used to evaluate the sequence.

VERSION_START

string

(Version 3+ only) The version number of the first version of the deformation model in which this sequence is valid.

VERSION_END

string

(Version 3+ only) The version of the deformation model in which this sequence is revoked. Set to 0 if the sequence has not been revoked.

DESCRIPTION
text ...
END_DESCRIPTION

text

Description of the model

Each deformation sequence should be followed by one or more deformation components which define the sequence.

For version 1 deformation type sequences the deformation components sequences must be defined in ascending order of reference date. The deformation for the sequence at a given time is then calculated based upon the components before and after the calculation time. If the calculation time is before the first or after the last component of the sequence, then it is calculated using the first or last component. Note that it is possible to define incompatible data, for example by specifying a deformation of "zero" after one deformation component and "interpolate" before the next.

For version 1 velocity type sequences the deformation from each component is simply added, so the order is unimportant. Usually a velocity sequence will only have one component.

For version 2 models each component of the sequence is evaluated by default. However if the sequence is defined as a nested sequence then only the first component which includes the evaluation point is calculated. Subsequent components of the sequence are ignored. If the sequence is not nested then each component is evaluated and added. Each component defines its own time model, which may be a piecewise linear model (which can also defined step functions) or a velocity model.

Each deformation component should contain the following records:

Code

Type

Description

DEFORMATION_COMPONENT

string

The name of the grid or triangulation data file containing the model. This must match the dimension of the sequence. The name may be followed by additional parameters to be used to generate the grid or trig file (by the makegrid.pl or maketrig.pl scripts).

MODEL_TYPE

string

Either “grid” or “trig”

REF_DATE

date

A reference date used with the deformation component. Only applies to velocity models.

BEFORE_REF_DATE

string

(Version 1 only) One of “zero”, “fixed”, or “interpolate”. Defines how the component is evaluated before the reference data. Options are:

zero The deformation is not evaluated before the reference date – it is zero.
fixed For deformation type models the deformation is constant before the reference date at the value defined by the model data. For velocity models the deformation is interpolated using the velocity defined by the model.
interpolate For deformation type models the deformation is interpolated from the calculated deformation of this component and that of the previous component in the sequence if it exists, or from the next if there is no previous. For velocity models the deformation is calculated based using the velocity defined by the model data.

AFTER_REF_DATE

string

(Version 1 only) One of “zero”, “fixed”, “interpolate”, equivalent to the BEFORE_REF_DATE option.

TIME_MODEL

string

(Version 2+ only) A string defining the time model. The time model evaluates a factor by which the deformation component is multiplied at a given date. Options are:

  • "PIECEWISE_LINEAR f0 d1 f1 ... dn fn" defining a list of scale factors and dates representing a piecewise linear time function multiplying the model value. f0 applies before the first date, fn after the date. For deformation data type the value beween dn and dn+1 is interpolated from fn and fn+1 Step functions are represented by two consecutive factors with the same date.
  • "VELOCITY f0 d1 f1 ... dn fn" defining a list of scale factors and dates used to calculate velocities. The model defines a velocity component evaluating to 0 at the reference date. The velocity from the spatial component is multiplied by f0 for dates before d1, f1 between d1 and d2, .. and fn after dn.

DESCRIPTION
text ...
END_DESCRIPTION

text

Description of the component

The following is a (somewhat contrived) example of a LINZ deformation model version 2 index file

DEFORMATION_MODEL NZGD2000 deformation model
FORMAT LINZDEF2B
VERSION_NUMBER 1.0
VERSION_DATE  12-Mar-2004
START_DATE 1-Jan-1850
END_DATE 1-Jan-2200
COORDSYS NZGD2000
DESCRIPTION
This is the description of the model
This is a first try
END_DESCRIPTION

# National model

DEFORMATION_SEQUENCE National model
DIMENSION 2
START_DATE 1-Jan-1850
END_DATE 1-Jan-2101
ZERO_BEYOND_RANGE no
DESCRIPTION
National velocity model
END_DESCRIPTION

DEFORMATION_COMPONENT velgrid.gdf
MODEL_TYPE grid
REF_DATE 1-Jan-2000
TIME_MODEL velocity
DESCRIPTION
National velocity grid deformation model
END_DESCRIPTION

# 15 July 2009 Fiordland earthquake

DEFORMATION_SEQUENCE Fiordland earthquake 15 July 2009
DIMENSION 2
START_DATE 1-Jan-2020
END_DATE 1-Jan-2030
ZERO_BEYOND_RANGE yes
NESTED_SEQUENCE yes
DESCRIPTION
Deformation patch with single model, zero before, fixed after
END_DESCRIPTION

DEFORMATION_COMPONENT fiordland_20090715_a.trg -c
MODEL_TYPE trig
REF_DATE 15-Jul-2009
TIME_MODEL PIECEWISE_LINEAR 0.0 15-Jul-2009 0.8 20-Jul-2009 1.0
DESCRIPTION
Initial model of 15 July 2009 Fiordland earthquake
END_DESCRIPTION

DEFORMATION_COMPONENT fiordland_20090715_b.trg -c
MODEL_TYPE trig
REF_DATE 15-Jul-2009
TIME_MODEL PIECEWISE_LINEAR 0.0 15-Jul-2009 1.0
DESCRIPTION
Initial model of 15 July 2009 Fiordland earthquake (near-field)
END_DESCRIPTION

The following is an equally contrived example of a LINZ deformation model version 1 index file

DEFORMATION_MODEL NZGD2000 deformation model
FORMAT LINZDEF1B
VERSION_NUMBER 1.0
VERSION_DATE  12-Mar-2004
START_DATE 1-Jan-1850
END_DATE 1-Jan-2200
COORDSYS NZGD2000
DESCRIPTION
This is the description of the model
This is a first try
END_DESCRIPTION

# National model

DEFORMATION_SEQUENCE National model
DATA_TYPE velocity
DIMENSION 2
START_DATE 1-Jan-1850
END_DATE 1-Jan-2101
ZERO_BEYOND_RANGE no
DESCRIPTION
National velocity model
END_DESCRIPTION

DEFORMATION_COMPONENT velgrid.gdf
MODEL_TYPE grid
REF_DATE 1-Jan-2000
BEFORE_REF_DATE interpolate
AFTER_REF_DATE interpolate
DESCRIPTION
National velocity grid deformation model
END_DESCRIPTION

# 15 July 2009 Fiordland earthquake

DEFORMATION_SEQUENCE Fiordland earthquake 15 July 2009
DATA_TYPE deformation
DIMENSION 2
START_DATE 1-Jan-2020
END_DATE 1-Jan-2030
ZERO_BEYOND_RANGE yes
DESCRIPTION
Deformation patch with single model, zero before, fixed after
END_DESCRIPTION

DEFORMATION_COMPONENT fiordland_20090715_a.trg -c
MODEL_TYPE trig
REF_DATE 15-Jul-2009
BEFORE_REF_DATE zero
AFTER_REF_DATE fixed
DESCRIPTION
Initial model of 15 July 2009 Fiordland earthquake
END_DESCRIPTION

See also:

The LINZ deformation model

Gridded component file format

Triangulated component file format

SNAP adjustment program

The SNAP deformation command