The **-o** option
^^^^^^^^^^^^^^^^^

**Syntax**

**-o**\ *cols*\ [**+l**][**+d**\ *divisor*][**+s**\ *scale*\|\ **d**\|\ **k**][**+o**\ *offset*][,\ *...*][,\ **t**\ [*word*]]
    Select specific data columns for primary output, in arbitrary order.

**Description**

The **-o** option allows you to specify which output file physical data columns to use and in what order. This is
especially useful when table output is generated by modules that derive its output from gridded data sets. Specify
individual columns or column ranges in the format *start*\ [:*inc*]:*stop*, where *inc* defaults to 1 if not specified,
separated by commas [Default writes all columns in order, starting with the first column (i.e., column 0)]. Columns can
be repeated. The chosen data columns will be used as given and columns not listed will be skipped.  To write from a given
column until the end of the record, leave off *stop* when specifying the column range.  Optionally, append
one of the following modifiers to any column or column range to transform the output columns:

- **+l** - Take :math:`\log_{10}` of the output values.
- **+d** - Divide the output values by the factor *divisor* [default is 1].
- **+s** - Multiply the output values by the factor *scale* [default is 1]. Alternatively, give **d** to convert
  km to degrees or **k** to convert degrees to km using :term:`PROJ_MEAN_RADIUS`.
- **+o** - Add the given *offset* to the output values [default is 0].

**Notes**: (1) The order of these optional transformations are (1) take :math:`\log_{10}`, (2) scale or divide, and (3)
add *offset*. Do not repeat operations: -o+d9+o8+o2+s3+d4 will be treated as -o+o2+d4.
To write from a given column until the end of the record, leave off *stop* when specifying the column range.
Normally, any trailing text in the internal records will be included in the output, but when **-o** is used to specify
specific columns you must explicitly append the extra "column" **t** to include the trailing text on output. To only select
a single word from the trailing text, append the word number (first word is 0).  If your trailing text columns start
with a valid number and you want to ensure the content from column *col* to the end of the record will be considered
trailing text, use **-f**\ *col*\ **s**.
Finally, **-on** will simply write the numerical output only and skip any trailing text, while **-ot** will only output
the trailing text (or selected word). (2) Using **-o** assumes there are as many numerical columns as implied in **-o**.
