 NCL Home > Documentation > Functions > Meteorology

# shear_stretch_deform_cfd

Using centered-finite-differences, estimate the kinematic shear-deformation, stretch-deformation and total-deformation of a global or regional horizontal (east-west) wind field. Available in version 6.6.2 and later.

## Prototype

```load "\$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"  ; This library is automatically loaded
; from NCL V6.2.0 onward.
; No need for user to explicitly load.

function shear_stretch_deform_cfd (
u          : numeric,
v          : numeric,
lat    [*] : numeric,
lon    [*] : numeric,
cyclic  : logical,
opt     : integer
)

return_val [dimsizes(lat)] :  float or double
```

## Arguments

u

Zonal wind component. Must be on a rectilinear grid ordered South-to-North.

v

Meridional wind component. Same size and shape as u.

lat

Latitudes (degrees).

lon

Longitudes (degrees).

cyclic

Grid type: cyclic=True means grid is cyclic in longitude; cyclic=False means grid is regional.

opt

• opt=0 means return the shear, stretch and total deformation [3 variables]
• opt=1 means return the shear, stretch, total deformation and the four gradient fields: du/dx, du/dy, dv/dx and dv/dy [7 variables].

## Return value

A variable of type list containing variables of the same size and shape as u. The returned variables do not include any explicit negative (or positive) sign or coefficient (eg: 0.5).

```
shear   = dvdx + dudy
stretch = dudx - dvdy
deform  = sqrt(shear^2 + stretch^2)
```

## Description

Divergence and vorticity are commonly used kinematic fields. Less commonly used are the shear-deformation (SHD) and stretch-deformation (STD).

```               SHD = dv/dx + du/dy
STD = du/dx - dv/dy

```
When the stretch-deformation is negative/positive the flow is confluent/diffluent. Typically, the individual shear- and stretch-deformation components are less useful that the total-deformation (TD):
```
TD = sqrt(SVD^2 + STD^2)
```

This function should be used only on high frequency 3-, 6-hrly or daily mean data.

References:

```   Kinematic Propeerties: Synoptic Meteorology I: 2014

Spensberger, C. and T. Spengler (2014)
A New Look at Deformation as a Diagnostic for Large-Scale Flow
J. Atmos. Sci
```

## Examples

Example 1: Read in a region using NCL's coordinate subscripting.

```
latS   =  25.          ; region
latN   =  50.
lonL   = 230.
lonR   = 300.

fuv    = addfile("...", "r")
u      = fuv->uwnd(:,:,{latS:latN},{lonL:lonR})   ; (time, level, lat, lon) ; level=17
v      = fuv->vwnd(:,:,{latS:latN},{lonL:lonR})

opt_ssd = 0      ; shear, stretch and total deformation only
cyclic  = False  ; region
ssdList = shear_stretch_deform_cfd(u,v, u&lat, u&lon, cyclic, opt_ssd)

stretch_region = ssdList    ; extract variables for clarity; append _region for clarity
shear_region   = ssdList
deform_region  = ssdList

delete(ssdList) ; not required;   just not needed anymore

printVarSummary(stretch_region)
printMinMax(stretch_region,0)

printVarSummary(shear_region)
printMinMax(shear_region,0)

printVarSummary(deform_region)
printMinMax(deform_region,0)

```
The (edited) output:
```
Variable: stretch_region
Type: float
Total Size: 151844 bytes
37961 values
Number of Dimensions: 4
Dimensions and sizes:   [time | 7] x [level | 17] x [lat | 11] x [lon | 29]
Coordinates:
time: [1823280..1823424]
level: [1000..10]
lat: [25..50]
lon: [230..300]
Number Of Attributes: 4
_FillValue :  -9.96921e+36
long_name :   (dudx-dvdy): CFD
units :       1/s
NCL_tag :     shear_stretch_deform_cfd

(0)     (dudx-dvdy): CFD (1/s) : min=-7.31857e-05   max=0.000132413
(0)     ===

Variable: shear_region
Type: float
Total Size: 151844 bytes
37961 values
Number of Dimensions: 4
Dimensions and sizes:   [time | 7] x [level | 17] x [lat | 11] x [lon | 29]
Coordinates:
time: [1823280..1823424]
level: [1000..10]
lat: [25..50]
lon: [230..300]
Number Of Attributes: 4
_FillValue :  -9.96921e+36
long_name :   (dvdx+dudy): CFD
units :       1/s
NCL_tag :     shear_stretch_deform_cfd

(0)     (dvdx+dudy): CFD (1/s) : min=-9.8741e-05   max=7.93867e-05
(0)     ===

Variable: deform_region
Type: float
Total Size: 151844 bytes
37961 values
Number of Dimensions: 4
Dimensions and sizes:   [time | 7] x [level | 17] x [lat | 11] x [lon | 29]
Coordinates:
time: [1823280..1823424]
level: [1000..10]
lat: [25..50]
lon: [230..300]
Number Of Attributes: 5
_FillValue :  -9.96921e+36
long_name :   deformation
units :       1/s
information : sqrt[shear^2 + stretch^2 ]
NCL_tag :     shear_stretch_deform_cfd

(0)     deformation (1/s) : min=6.17707e-08   max=0.000132802
```