qvector_isobaric_cfd
Use centered finite differences to derive the Q-vector components on a global or regional grid.
Available in version 6.6.0 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 qvector_isobaric_cfd (
u : numeric,
v : numeric,
t : numeric,
ss : numeric,
p [*] : numeric,
pdim [1] : integer,
gridType [1] : integer,
opt : integer
)
return_val [dimsizes(x)] : float or double
Arguments
uArray containing zonal wind components (m/s). The array must be global and ordered south to north.
vArray containing meridional wind components (m/s). Same size and shape as u.
tArray containing temperatures. Same size and shape as u.
ssArray containing static stability. Same size and shape as u.
gridTypeGrid type. gridType=0 means gaussian grid; gridType=1 means regular or fixed grid.
optoption.
- opt=0 means return the two Q-vector components (Qi and Qj)
- opt=1 means return a list variable containing: [/Qi, Qj, dtdx, dtdy, dudx, dudy, dvdx, dvdy/]
Return value
Two Q-vector component arrays of the same size and shape as t. The output will be double if u, v or t is of type double.
Description
Calculate the two Q-vector components on the globe using spherical harmonics This function requires that the grids be global because the "highly accurate" spherical harmonic functions are used to derive the gradients.
From Q-vectors: Q-vectors are used in atmospheric dynamics to understand physical processes such as vertical motion and frontogenesis. Q-vectors are not physical quantities that can be measured in the atmosphere but are derived from the quasi-geostrophic equations and can be used in the previous diagnostic situations. On meteorological charts, Q-vectors point toward upward motion and away from downward motion. Q-vectors are an alternative to the omega equation for diagnosing vertical motion in the quasi-geostrophic equations.
Qi = -R/(s*p)*[(du/dx)*(dt/dx) + (dv/dx)*(dt/dy)] ; R is ideal gas constant
Qj = -R/(s*p)*[(du/dy)*(dt/dx) + (dv/dy)*(dt/dy)]
Steenburgh's notes state that the advantages of the Q-vector form of the omega equation:
(a) Single forcing term
(b) Can be evaluated at a single level
Disadvantages:
(a) Without explicitly plotting the Q-vectors, it's extremely difficult (perhaps
impossible) to evaluate from traditional synoptic maps
(b) Not physically intuitive
NOTE: This is a non-linear quantity. Generally, it is not appropriate to use (say) monthly means quantities. Rather, high-frequency (hourly, 3-hr, 6-hr, daily) quantities should be used.
To see gradients derived via spherical harmonics and 'simple' centered finite differences, see: gradients.
References:
Steenburgh, J. (2011): Q-vectors
NOTE: This is a non-linear quantity. Generally, it is not appropriate to use (say) monthly means quantities. Rather, high-frequency (hourly, 3-hr, 6-hr, daily) quantities should be used.
To see gradients derived via spherical harmonics and 'simple' centered finite differences, see: gradients.
See Also
qvector_isobaric_cfd, beta_dfdy_rossby, grad_latlon_cfd
Examples
Example 1: Here the variables u,v (m/s) and T (degK) are ordered south to north and are on a global grid.
f = addfile("...", "r") u = f->U ; (time,lev,lat,lon); (0,1,2,3); m/s v = f->V t = f->T ; degK pPa = 100*t&level ; clarity; p[*] pPa@units = "Pa" pdim = 1 ; (time,level,lat,lon); (0,1,2,3) opt_ss = 0 ; =0 return static stability only ss = static_stability(pPa, t, pdim, opt_ss) printVarSummary(ss) printMinMax(ss, 0) ; min=-0.000322343 max=0.0595654 ; =1, return 3 varaibles as part of a list cyclic = True ; global opt_qv = 0 ; return only the two Q-vector components qvList = qvector_isobaric_cfd(u,v,t,ss,pPa,pdim, t&lat,t&lon, cyclic,opt_qv) Qi = qvList[0] ; explicitly extract for clarity Qj = qvList[1] delete(qvList) ; not necessary printVarSummary(Qi) printMinMax(Qi, 0) printVarSummary(Qj) printMinMax(Qj, 0)The edited output:
Variable: Qi
Type: float
Total Size: 5003712 bytes
1250928 values
Number of Dimensions: 4
Dimensions and sizes: [time | 7] x [level | 17] x [lat | 73] x [lon | 144]
Coordinates:
time: [1823280..1823424]
level: [1000..10]
lat: [-90..90]
lon: [ 0..357.5]
Number Of Attributes: 4
_FillValue : -9.96921e+36
long_name : QI
units :
gradients : spherical harmonics
(0) QI : min=-3.66776e-06 max=6.4694e-06
(0) ===
Variable: Qj
Type: float
Total Size: 5003712 bytes
1250928 values
Number of Dimensions: 4
Dimensions and sizes: [time | 7] x [level | 17] x [lat | 73] x [lon | 144]
Coordinates:
time: [1823280..1823424]
level: [1000..10]
lat: [-90..90]
lon: [ 0..357.5]
Number Of Attributes: 4
_FillValue : -9.96921e+36
long_name : QJ
units :
gradients : spherical harmonics
(0) QJ : min=-1.71243e-05 max=3.36954e-06
(0) ===
Example 2: Calculate Q-vectors on a regional grid.
; region
latS = 25. ; region USA
latN = 50.
lonL = 230.
lonR = 300.
U = u(:,:,{latS:latN},{lonL:lonR})
V = v(:,:,{latS:latN},{lonL:lonR})
T = t(:,:,{latS:latN},{lonL:lonR})
SS = ss(:,:,{latS:latN},{lonL:lonR})
cyclic = False ; region
qvList = qvector_isobaric_cfd(U,V,T,SS, pPa,pdim, T&lat,T&lon, cyclic,opt_qv)
Qi_region = qvList[0]
Qj_region = qvList[1]
delete(qvList)
printVarSummary(Qi_region)
printMinMax(Qi_region,0)
print("===")
printVarSummary(Qj_region)
printMinMax(Qj_region,0)
print("===")
The (edited) output:
Variable: Qi_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 : QI
units :
gradients : central-finite-difference
(0) QI : min=-2.51916e-07 max=5.57513e-06
(0) ===
Variable: Qj_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 : QJ
units :
gradients : central-finite-difference
(0) QJ : min=-5.25593e-06 max=1.57906e-07