<p>I am looking for a way to detect shearlines or confluence regions such as that shown in the figure below (red dashed line). </p>

<p>I was able to derive the stretching, shear, and total deformations.</p>

<p>The  shearline coincides with the region of maximum stretching deformation.</p>

<p>Currently, I am drawing the shearline manually. But I am wondering if there is a way to automatically detect this line or the deformation zone.</p>

<p>I am thinking of two ways</p>

<ol>
<li><p>Looking at the dynamic variables (i.e., stretching deformation)</p></li>
<li><p>Using Python's pattern recognition function to detect this kind of pattern.</p></li>
</ol>

<p><strong>Problems</strong></p>

<p>Any suggestions on how I can detect this automatically. I don't know how to implement the above methods. I am not sure what criteria to set in order to draw the shearline.</p>

<p>I am also new to Python so I don't know how to implement the second one.</p>

<p>I have wind data and calculated deformations in netcdf format. I uploaded the files to the following links:</p>

<p><a href="https://www.dropbox.com/s/ym5jo07cb7niqkw/T62_ncep_uwnd.nc?dl=0" rel="nofollow noreferrer">UWND</a></p>

<p><a href="https://www.dropbox.com/s/m40wu3al7tf32ut/T62_ncep_vwnd.nc?dl=0" rel="nofollow noreferrer">VWND</a></p>

<p><a href="https://www.dropbox.com/s/cfcq3awxe2a1tbo/deform.nc?dl=0" rel="nofollow noreferrer">Link to calculated deformation parameters</a></p>

<p>The deformation parameters are calculated this way:
<a href="https://i.sstatic.net/Y7aSt.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Y7aSt.png" alt="Deformation parameters"></a></p>

<p>where A, B, and V are the shearing, stretching, and total deformation parameters.</p>

<p>In the deform.nc file, shear_sph(shearing deformation; A in the equation above); stretch_sph(stretching deformation; B in the equation B); deform_sph(total deformation; V in the equation above).</p>

<p>I'll appreciate any help about this matter.</p>

<p><strong>SUMMARY</strong></p>

<p>I am looking for the <a href="https://www.ncl.ucar.edu/Document/Functions/Contributed/shear_stretch_deform.shtml" rel="nofollow noreferrer">NCL Shear, stretch, deform</a> functionality in Python. Are there any existing software packages or do I have to write my own ?</p>

CC BY-SA 4.0
2019-05-20T11:41:12.870Z
@gansub. I already calculated the deformation parameters (natural/cartesian coordinates) from the deform link in my post.
Lyndz
CC BY-SA 4.0
2019-05-20T12:31:21.780Z
@gansub. I just thought of another interesting point. What if I just locate the saddle point fromt the stream line chart? It seems that the center of the deformation is the saddle point, in algebraic sense
Lyndz
<meteorology><python>
Locating shearlines or deformation zones in a map
Lyndz
# Locating shearlines or deformation zones in a map

(Asked by: username_0 on 2019-05-20)

I am looking for a way to detect shearlines or confluence regions such as that shown in the figure below (red dashed line).

I was able to derive the stretching, shear, and total deformations.

The shearline coincides with the region of maximum stretching deformation.

Currently, I am drawing the shearline manually. But I am wondering if there is a way to automatically detect this line or the deformation zone.

I am thinking of two ways

1. Looking at the dynamic variables (i.e., stretching deformation)
2. Using Python's pattern recognition function to detect this kind of pattern.

**Problems**

Any suggestions on how I can detect this automatically. I don't know how to implement the above methods. I am not sure what criteria to set in order to draw the shearline.

I am also new to Python so I don't know how to implement the second one.

I have wind data and calculated deformations in netcdf format. I uploaded the files to the following links:

[UWND](https://www.dropbox.com/s/ym5jo07cb7niqkw/T62_ncep_uwnd.nc?dl=0)

[VWND](https://www.dropbox.com/s/m40wu3al7tf32ut/T62_ncep_vwnd.nc?dl=0)

[Link to calculated deformation parameters](https://www.dropbox.com/s/cfcq3awxe2a1tbo/deform.nc?dl=0)

The deformation parameters are calculated this way:
[![Deformation parameters](https://i.sstatic.net/Y7aSt.png)](https://i.sstatic.net/Y7aSt.png)

where A, B, and V are the shearing, stretching, and total deformation parameters.

In the deform.nc file, shear\_sph(shearing deformation; A in the equation above); stretch\_sph(stretching deformation; B in the equation B); deform\_sph(total deformation; V in the equation above).

I'll appreciate any help about this matter.

**SUMMARY**

I am looking for the [NCL Shear, stretch, deform](https://www.ncl.ucar.edu/Document/Functions/Contributed/shear_stretch_deform.shtml) functionality in Python. Are there any existing software packages or do I have to write my own ?

**Tags:** meteorology, python

> **Comments:**
> **username_0**: @gansub. I already calculated the deformation parameters (natural/cartesian coordinates) from the deform link in my post.  
> **username_0**: @gansub. I just thought of another interesting point. What if I just locate the saddle point fromt the stream line chart? It seems that the center of the deformation is the saddle point, in algebraic sense  

---

## 0 answers

