Skip to content

Commit cfee221

Browse files
committed
documentation: added teca_detect_stitch_nodes
1 parent cfacdd5 commit cfee221

File tree

2 files changed

+317
-1
lines changed

2 files changed

+317
-1
lines changed

doc/rtd/applications.rst

Lines changed: 305 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1557,6 +1557,310 @@ Command Line Arguments
15571557
displays both basic and advanced documentation together
15581558

15591559

1560+
.. _teca_detect_stitch_nodes:
1561+
1562+
teca_detect_stitch_nodes
1563+
------------------------------
1564+
The cyclone detecton algorithm is based on two TempestExtremes codes :cite:`tempestextremes`:
1565+
DetectNodes and StitchNodes.
1566+
1567+
Inputs
1568+
~~~~~~
1569+
A Cartesian mesh stored in a collection of NetCDF CF2 files. The detector requires on
1570+
the following fields.
1571+
1572+
1. Sea level pressure
1573+
2. Surface wind x-component
1574+
3. Surface wind y-component
1575+
4. Geopotential height (300 and 500 mB)
1576+
5. Surface geopotential height
1577+
1578+
Outputs
1579+
~~~~~~~
1580+
1. Cyclone candidate table
1581+
2. Cyclone track table
1582+
1583+
Command Line Arguments
1584+
~~~~~~~~~~~~~~~~~~~~~~
1585+
1586+
--input_file INPUT_FILE
1587+
a teca_multi_cf_reader configuration file identifying the set of NetCDF CF2 files to process.
1588+
When present data is read using the teca_multi_cf_reader. Use one of either `--input_file` or
1589+
`--input_regex`.
1590+
1591+
--input_regex INPUT_REGEX
1592+
a teca_cf_reader regex identifying the set of NetCDF CF2 files to process. When present data is
1593+
read using the teca_cf_reader. Use one of either `--input_file` or `--input_regex`.
1594+
1595+
--candidate_file CANDIDATE_FILE
1596+
file path to write the storm candidates to. The extension determines the file format. May be one of
1597+
`.nc`, `.csv`, or `.bin`. (default: candidates.csv)
1598+
1599+
--track_file TRACK_FILE
1600+
file path to write the storm tracks to. The extension determines the file format. May be one of
1601+
`.nc`, `.csv`, or `.bin`. (default: tracks.csv)
1602+
1603+
--x_axis_variable X_AXIS_VARIABLE
1604+
name of x coordinate variable (default: lon)
1605+
1606+
--y_axis_variable Y_AXIS_VARIABLE
1607+
name of y coordinate variable (default: lat)
1608+
1609+
--z_axis_variable Z_AXIS_VARIABLE
1610+
name of z coordinate variable (default: level)
1611+
1612+
--sea_level_pressure SEA_LEVEL_PRESSURE
1613+
name of variable with sea level pressure
1614+
1615+
--surface_wind_u SURFACE_WIND_U
1616+
name of variable with surface wind x-component
1617+
1618+
--surface_wind_v SURFACE_WIND_Y
1619+
name of variable with surface wind y-component
1620+
1621+
--geopotential_at_surface GEOPOTENTIAL_AT_SURFACE
1622+
name of variable with geopotential at the surface
1623+
1624+
--geopotential GEOPOTENTIAL
1625+
name of variable with geopotential height
1626+
for thickness calc (300 and 500 mB)
1627+
1628+
--300mb_height 300_HEIGHT
1629+
name of variable with 300mb height for thickness calc
1630+
1631+
--500mb_height 500_HEIGHT
1632+
name of variable with 500mb height for thickness calc
1633+
1634+
--in_connect CONNECTIVITY_FILE
1635+
a connectivity file that describes the unstructured grid.
1636+
Not supported yet.
1637+
1638+
--diag_connect true/false
1639+
When the data is on a structured grid, consider grid cells
1640+
to be connected in the diagonal (across the vertex).
1641+
(default: false)
1642+
1643+
--regional true/false
1644+
Used to indicate that a given latitude-longitude grid
1645+
should not be periodic in the longitudinal direction.
1646+
(default: true)
1647+
1648+
--out_header true/false
1649+
If present, output a header at the beginning of the output file
1650+
indicating the columns of the file.
1651+
(default: true)
1652+
1653+
--search_by_min VARIABLE_NAME
1654+
The input variable to use for initially selecting candidate points (defined as local minima).
1655+
At least one (and at most one) of --search_by_min or --search_by_max must be specified.
1656+
1657+
--search_by_max VARIABLE_NAME
1658+
The input variable to use for initially selecting candidate points (defined as local maxima).
1659+
At least one (and at most one) of --search_by_min or --search_by_max must be specified.
1660+
1661+
--search_by_threshold SEARCH_BY_THRESHOLD
1662+
Threshold for search operation in the form "<op><value>"
1663+
These arguments are as follows.
1664+
op is the operator that must be satisfied for threshold (options include >,>=,<,<=,=,!=).
1665+
value is the value on the right-hand-side of the comparison.
1666+
1667+
--min_lon MIN_LON
1668+
The minimum longitude for candidate points. (default: 0.0)
1669+
1670+
--max_lon MAX_LON
1671+
The maximum longitude for candidate points.
1672+
As longitude is a periodic dimension,
1673+
when --regional is not specified --min_lon may be larger than --max_lon.
1674+
If --max_lon and --min_lon are equal then these arguments are ignored.
1675+
(default: 0.0)
1676+
1677+
--min_lat MIN_LAT
1678+
The minimum latitude for candidate points. (default: 0.0)
1679+
1680+
--max_lat MAX_LAT
1681+
The maximum latitude for candidate points.
1682+
If --max_lat and --min_lat are equal then these arguments are ignored.
1683+
(default: 0.0)
1684+
1685+
--min_abs_lat MIN_ABS_LAT
1686+
The minimum absolute value of the latitude for candidate points.
1687+
This argument has no effect if set to zero.
1688+
(default: 0.0)
1689+
1690+
--merge_dist MERGE_DIST
1691+
Minimum allowable distance between two candidates in degrees.
1692+
Candidate points with a distance (in degrees great-circle-distance)
1693+
shorter than the specified value are merged.
1694+
Among two candidates within the merge distance,
1695+
only the candidate with the lowest value of the --search_by_min field
1696+
or highest value of the --search_by_max field are retained.
1697+
(default: 6.0)
1698+
1699+
--closed_contour_cmd CLOSED_CONTOUR_CMD
1700+
Eliminate candidates if they do not have a closed contour.
1701+
The closed contour is determined by breadth first search:
1702+
if any paths exist from the candidate point
1703+
(or nearby minima/maxima if minmaxdist is specified)
1704+
that reach the specified distance before achieving the specified delta
1705+
then we say no closed contour is present.
1706+
Closed contour commands are separated by a semicolon ("<cmd1>;<cmd2>;...").
1707+
Each closed contour command takes the form "var,delta,dist,minmaxdist".
1708+
These arguments are as follows.
1709+
var is the name of the variable used for the contour search.
1710+
dist is the great-circle distance (in degrees) from the pivot
1711+
within which the closed_contour criteria must be satisfied.
1712+
delta is the amount by which the field must change from the pivot value.
1713+
If positive (negative) the field must increase (decrease) by this value along the contour.
1714+
minmaxdist is the great-circle distance away from the candidate
1715+
to search for the minima/maxima. If delta is positive (negative),
1716+
the pivot is a local minimum (maximum).
1717+
(default: SEA_LEVEL_PRESSURE,200.0,5.5,0;thickness,-6.0,6.5,1.0)
1718+
1719+
--no_closed_contour_cmd NO_CLOSED_CONTOUR_CMD
1720+
As --closed_contour_cmd,
1721+
except it eliminates candidates if a closed contour is present.
1722+
1723+
--candidate_threshold_cmd CANDIDATE_THRESHOLD_CMD
1724+
Threshold commands for candidates.
1725+
Eliminate candidates that do not satisfy a threshold criteria
1726+
(there must exist a point within a given distance of the candidate
1727+
that satisfies a given equality or inequality).
1728+
Search is performed by breadth-first search over the grid.
1729+
Threshold commands are separated by a semicolon ("<cmd1>;<cmd2>;...").
1730+
Each threshold command takes the form "var,op,value,dist".
1731+
These arguments are as follows.
1732+
var is the name of the variable used for the thresholding.
1733+
op is the operator that must be satisfied for threshold (options include >,>=,<,<=,=,!=).
1734+
value is the value on the right-hand-side of the comparison.
1735+
dist is the great-circle distance away from the candidate
1736+
to search for a point that satisfies the threshold.
1737+
1738+
--output_cmd OUTPUT_CMD
1739+
Include additional columns in the candidates output file.
1740+
Each output command takes the form "var,op,dist".
1741+
These arguments are as follows.
1742+
var is the name of the variable used for output.
1743+
op is the operator that is applied over all points
1744+
within the specified distance of the candidate (options include max, min, avg, maxdist, mindist).
1745+
dist is the great-circle distance away from the candidate wherein the operator is applied.
1746+
(default: SEA_LEVEL_PRESSURE,min,0;surface_wind_speed,max,2;GEOPOTENTIAL_AT_SURFACE,min,0)
1747+
1748+
--in_fmt IN_FMT
1749+
A comma-separated list of names of the auxiliary columns within the candidates output file.
1750+
(namely, the list must not include the time columns).
1751+
(default: i,j,lat,lon,SEA_LEVEL_PRESSURE,surface_wind_speed,GEOPOTENTIAL_AT_SURFACE)
1752+
1753+
--range RANGE
1754+
The maximum distance between candidates along a path (in great-circle degrees).
1755+
(default: 8.0)
1756+
1757+
--min_time MIN_TIME
1758+
The minimum length of a path either in terms of number of discrete times or as a duration, e.g. "24h".
1759+
Note that the duration of a path is computed as the difference between the final time and initial time,
1760+
so a "24h" duration correspond to 5 time steps in 6-hourly data (i.e. 0h,6,12,18,24UTC).
1761+
(default: 10)
1762+
1763+
--min_endpoint_distance MIN_ENDPOINT_DIST
1764+
The minimum great-circle distance between the first candidate on a path and the last candidate (in degrees).
1765+
(default: 0.0)
1766+
1767+
--min_path_distance MIN_PATH_DISTANCE
1768+
The minimum accumulated great-circle distance between nodes in a path (in degrees).
1769+
(default: 0.0)
1770+
1771+
--min_path_length MIN_PATH_LENGTH
1772+
Minimum path length (default: 0.0)
1773+
1774+
--max_gap MAX_GAP
1775+
The number of allowed missing points between spatially proximal candidate nodes
1776+
while still considering them part of the same path.
1777+
(default: 3)
1778+
1779+
--track_threshold_cmd TRACK_THRESHOLD_CMD
1780+
Filter paths based on the number of times where a particular threshold is satisfied.
1781+
Threshold commands are separated by a semicolon ("<cmd1>;<cmd2>;...").
1782+
Each threshold command takes the form "col,op,value,count".
1783+
These arguments are as follows.
1784+
col is the name of the column to use for thresholding, as specified in --in_fmt.
1785+
op is the operator that must be satisfied for threshold (options include >,>=,<,<=,=,!=,|>=,|<=).
1786+
value is the value on the right-hand-side of the comparison.
1787+
count is either the minimum number of time slices where the threshold must be satisfied
1788+
or the instruction "all", "first", or "last".
1789+
Here "all" is used to indicate the threshold must be satisfied at all points along the path,
1790+
"first" is used to indicate the threshold must be satisfied only at the first point along the path, and
1791+
"last" is used to indicate the threshold must be satisfied only at the last point along the path.
1792+
(default: surface_wind_speed,>=,10.0,10;lat,<=,50.0,10;lat,>=,-50.0,10;GEOPOTENTIAL_AT_SURFACE,<=,15.0,10)
1793+
1794+
--prioritize VARIABLE_NAME
1795+
Variable to use when prioritizing path
1796+
1797+
--allow_repeated_times true/false
1798+
Allow repeated times (default: false)
1799+
1800+
--cal_type CAL_TYPE
1801+
Calendar type (default: standard)
1802+
1803+
--first_step FIRST_STEP
1804+
first time step to process (default: 0)
1805+
1806+
--last_step LAST_STEP
1807+
last time step to process (default: -1)
1808+
1809+
--n_threads NUMBER_OF_THREADS
1810+
Sets the thread pool size on each MPI rank. When the default value of -1 is used TECA will
1811+
coordinate the thread pools across ranks such each thread is bound to a unique physical core.
1812+
(default: -1)
1813+
1814+
--help
1815+
displays documentation for application specific command line options
1816+
1817+
--advanced_help
1818+
displays documentation for algorithm specific command line options
1819+
1820+
--full_help
1821+
displays both basic and advanced documentation together
1822+
1823+
--verbose VERBOSE
1824+
Enable verbose output (default: 0)
1825+
1826+
Examples
1827+
~~~~~~~~
1828+
1829+
ERA5 data
1830+
^^^^^^^^^
1831+
1832+
.. code-block:: bash
1833+
1834+
#!/bin/bash
1835+
#SBATCH -C cpu
1836+
#SBATCH -q debug
1837+
#SBATCH -A m1517
1838+
#SBATCH -N 1
1839+
#SBATCH -n 64
1840+
#SBATCH -t 00:30:00
1841+
#SBATCH -J teca_detect_stitch.out
1842+
#SBATCH --output=%x-%j.out
1843+
1844+
# load the TECA module
1845+
module use /global/common/software/m1517/teca/perlmutter_cpu/develop/modulefiles
1846+
module load teca
1847+
1848+
srun -n 64 teca_detect_stitch_nodes \
1849+
--input_file era5_2017.mcf \
1850+
--sea_level_pressure MSL \
1851+
--surface_wind_u VAR_10U \
1852+
--surface_wind_v VAR_10V \
1853+
--geopotential Z \
1854+
--geopotential_at_surface ZS \
1855+
--x_axis_variable longitude \
1856+
--y_axis_variable latitude \
1857+
--max_lat 90 \
1858+
--min_lat -90 \
1859+
--max_lon 359.75 \
1860+
--min_lon 0 \
1861+
--search_by_min MSL
1862+
1863+
15601864
.. _teca_tc_detect:
15611865

15621866
teca_tc_detect
@@ -1595,7 +1899,7 @@ the following fields.
15951899

15961900
Outputs
15971901
~~~~~~~
1598-
1. Cyclone andidate table
1902+
1. Cyclone candidate table
15991903
2. Cyclone track table
16001904

16011905
Command Line Arguments

doc/rtd/bibliography.bib

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,15 @@ @article{tc_props
8181
url = {https://doi.org/10.1175/MWR3420.1},
8282
eprint = {https://journals.ametsoc.org/mwr/article-pdf/135/7/2568/4230462/mwr3420\_1.pdf},
8383
}
84+
85+
@article{tempestextremes,
86+
author = {Ullrich, P. A. and Zarzycki, C. M. and McClenny, E. E. and Pinheiro, M. C. and Stansfield, A. M. and Reed, K. A.},
87+
title = {TempestExtremes v2.1: a community framework for feature detection, tracking, and analysis in large datasets},
88+
journaL = {Geoscientific Model Development},
89+
volume = {14},
90+
year = {2021},
91+
number = {8},
92+
pages = {5023--5048},
93+
url = {https://gmd.copernicus.org/articles/14/5023/2021/},
94+
doi = {10.5194/gmd-14-5023-2021}
95+
}

0 commit comments

Comments
 (0)