Git Product home page Git Product logo

jet_stream_detect's Introduction

Demo code computing sinuosity of the jet stream

The purpose of this demo is to illustrate how to extend TECA for a non-trivial use case and how to load and post process data produced. The demo makes use of a number of existing TECA algorithms (teca_cf_reader, teca_l2_norm, teca_binary_segmentation, teca_connected_components, teca_2d_component_area, teca_component_area_filter, teca_topological_spine, teca_jet_stream_sinuosity, teca_table_reduce, teca_table_sort, teca_table_calendar, teca_table_writer) and 2 new customized algoritghms written in Python (teca_topological_spine.py, teca_jet_stream_sinuosity.py). The demo comes with a command line application (teca_jet_stream_sinuosity) that constructs and runs the pipeline. A second script (plot_sinusoty.py) illustrates how to read in the resulting table and access the data. This demo has been tested with TECA version 3.0.0.

Segmentation and topological spine

Segmentation and topological spine We use a binary segmentation of wind speed(30 m/s) high in the atmosphere(200 hPa) followed by a medial axis transform followed by a pruning step to compute a topological spine of the jet stream. In the above figure the segmentation is bound by black lines, wind speed is shown by pseudocolor, and topological spine is shown as a green line in the northern hemisphere and a blue line in the southern hemisphere.

Sinuosity

Sinuosity defined We compute the sinuosity by dividing the length along the topological spine by the length of an arc of parallel latitude between the most westerly and easterly longitude at the mean latitude. Length along the spine is calculated using Vincenty's formula for great circle distance. In the above figure the green line shows the spine and the yellow line shows the distance between westerly and easterly points.

Result

Result The command line application runs in parallel and produces a table of sinuosity with a row for northern hemisphere and southern hemisphere for each step in the input dataset. A second app can be used to load this table and plot the results as shown in the above figure.

How to run the code

On cori the code can be run using the included run_demo_cori.sh script on a compute node.

mpiexec -np 10 ./teca_jet_stream_sinuosity \
    --input_regex=/home/bloring/work/teca/jet_stream_data/cam5_1_amip_run2'.*\.nc'  \
    --output_file=sinuosity.bin --area_threshold 7.e6

python plot_sinuosity.py sinuosity.bin sinuosity.png

jet_stream_detect's People

Contributors

burlen avatar taobrienlbl avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.