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