.. _intro_proc_globk: :file:`globk.cmd` ----------------- There are two required control files for :program:`sh_glred`. The names :file:`globk.cmd`, and :file:`glorg.cmd` are set by the script but can be overridden with the command line options :option:`-globk_cmd` and :option:`-glorg_cmd`. Unlike the GAMIT :file:`sestbl.` and :file:`sittbl.`, which for which entries must begin in column 1, all GLOBK files, as well as the :program:`sh_gamit` control files :file:`process.defaults` and :file:`sites.defaults`, follow the convention that a non-blank first column denotes a comment (:content:`*` or :content:`#` below in the examples below) except that you can specify (arbitrary) keywords beginning in line 1 that match the :option:`` list at the end of the :program:`globk`/:program:`glred` command line. If the keyword is given as an option, :program:`globk`/:program:`glred` will replace the keyword in the command file by a blank, thus activating the command. For example, with the command file shown below .. code-block:: console $ sh_glred -expt emed -s 2018 34 2018 36 -ncomb 3 -globk_prefix COMB -opt G will transform the command file from one appropriate for time series (solution for each day) one that will stack all of the days together and create a combined h-file for the period of the survey. .. literalinclude:: globk.cmd :lines: 1-40 :language: text The first group of commands define files used by :program:`glred`/:program:`globk` and which must be listed first in the command file in order for the program to work properly. For time series computations, all but the :content:`eq_file` can be considered scratch files. The :content:`eq_file`, described below, allows you to exclude sites or to rename them to account for breaks due to earthquakes or instrument changes. .. literalinclude:: globk.cmd :lines: 41-46,52-59 :language: text The next two entries specify the *a priori* files to be used for Earth orientation and coordinates. If these are omitted, the values will be taken from the h-file (i.e., the GAMIT solution), which may be fine in many circumstances. .. literalinclude:: globk.cmd :lines: 47-51 :language: text The :content:`max_chi` command allows automatic removal of an h-file when the data are bad, detected in :program:`globk` by checking for a high :math:`\chi^2`, a large adjustment of coordinates from their *a priori* values, or a large rotation of the network. For a network less than 10 km in extent, it may be necessary to loosen these values since the rotation will not be well determined. .. literalinclude:: globk.cmd :lines: 60-77 :language: text Including the name of the :program:`glorg` command file (:content:`org_cmd glorg.cmd`) tells globk to call :program:`glorg` for frame definition ("stabilization") after :program:`globk` is run. The :content:`org_opt` command prescribes what is included in the :program:`glorg` print summary (:file:`.org` file). :content:`PSUM` means a summary of position adjustments; :content:`GDLF` means to list the name of the input h-file; and :content:`CMDS` means to echo both the :program:`globk` and :program:`glorg` command files. If you are invoking :program:`glorg`, then the :program:`globk` print will not be very useful and is suppressed by :content:`prt_opt NOPR`. .. literalinclude:: globk.cmd :lines: 78-131 :language: text Commands of the form :content:`apr_` serve both to tell :program:`globk` to estimate the parameter and to specify the *a priori* constraint to be used. If you are stabilizing by estimating both translation and rotation in :program:`glorg` (the usual case with a robust network), then both the coordinate (:content:`apr_neu`) and EOP (:content:`apr_ut1` and :content:`apr_wob`) constraints should be loose, as shown above. If you estimate only translation in :program:`glorg`, preferable for less than four stations or a network less than 1000 km in extent, then you should tightly constrain EOP (and orbits). To apply finite constraints instead (not recommended), set the :content:`apr_neu` values as appropriate for each station and do not invoke :program:`glorg` (comment out the :content:`org_cmd` line). .. literalinclude:: globk.cmd :lines: 87-131 :language: text Sites to include in the solution are selected or deselected with :content:`use_site`. The default is to include all sites in the h-file(s), but you can command a subset by started the list with :content:`clear` followed by the site names, either four characters (all 8-character versions of the site) or the full eight (to select only certain versions); listing the site preceeded by a minus will remove it from the list. In the example we've referred to a separate file (:content:`../tables/uselist`) rather than include the :content:`use_site` commands in the main command file. For site selection from an h-file of global processing, you can invoke the :content:`use_pos` to include or exclude sites within a geographical region. (See the :program:`globk` help file or Section 3.1 of the `GLOBK Reference Manual `_.) .. literalinclude:: globk.cmd :lines: 139- :language: text The :content:`out_glb` command, when invoked, tells :program:`globk` to write the solution out in the form of an h-file. This is useful for aggregating data in weekly or monthly averages and/or combining your own processing with global or regional h-files from an external source (see Chapter 4). .. literalinclude:: globk.cmd :lines: 136-138 :language: text If you need to provide for step changes in coordinates (or velocities) and/or to exclude sites during certain periods, you can use an "earthquake-rename" file (:content:`eq_file`) with :program:`globk`. The file has two types of entries. The first renames sites (creates new logical sites for :program:`globk`) automatically based on their proximity to an earthquake: .. code-block:: text # November 3, 2002, UT=22:12 Lat = 63.52 Lon -147.53 Depth=5 km M 7.9 eq_def DN 63.52 -147.53 700 5. 2002 11 3 22 12 eq_cosei DN 1.0 1.0 1.0 1.8 1.8 0.7 eq_post DN 100 0.1 0.1 0.1 1.8 1.8 0.7 Postseismic: 0.1 mm**2/day eq_rename DN With the lines above included in the :content:`eq_file`, all sites within 700 km of the 2002 Denali (Alaska) earthquake will be renamed (:content:`_gps` to :content:`_gdn`) for h-files with start and stop times later than 22:12 on 3 November 2002. The :content:`eq_cosei` and :content:`eq_post` commands prescribe the constraints applied to the co-seismic and post-seismic changes. (See the :program:`globk` help file and Section 3.1 of the `GLOBK Reference Manual `_.) The second type of command renames sites according to explicit instructions to account for changes in data quality or instrumentation: .. code-block:: text rename mate_gps mate_1ps 1999 6 18 0 0 rename kit3_gps kit3_xcl 1997 5 14 0 0 1997 5 18 0 0 rename madr_gps madr_xhi emed 1996 9 26 0 0 1996 10 27 0 0 The first of these lines accounts for a position change with the introduction of a new receiver at Matera; the second removes some bad data at Kitab for a four-day period; the third accounts for the use of an incorrect antenna height in h-files whose names include the substring :content:`emed`. You may use the :content:`equate` feature of :program:`glorg` to force the horizontal adjustments for :content:`madr_gps` and :content:`madr_xhi` to be the same (see Chapter 4). It is also possible to use the :content:`rename` command to shift the position of a site without introducing a new site, useful to apply offsets known from local measurements or assumed from an earthquake model: .. code-block:: text rename tigr_gni tigr_gni 2001 2 28 0 0 2100 1 1 0 0 0.0032 0.0033 0.0000 NEU The entry applies 3 mm offsets of the north and east coordinates of the site based on an *a priori* model for the Nisqually (:content:`NI`) earthquake near Seattle, Washington. For ITRF sites the :file:`igb14_comb.eq` file provides a set of renames consistent with the :file:`igb14_comb.apr` file (similarly :file:`itrf08_comb.eq` and :file:`itrf08_comb.apr`).