NCL Home > Documentation > Functions > Meteorology

brunt_vaisala

Compute the Brunt-Vaisala frequency which is a measure of bouyancy

Available in version 6.4.0 and later.

Prototype

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"

	function brunt_vaisala (
		th      : numeric,  ; float, double, integer only
		z       : numeric,  
		dim [1] : integer   
	)

	return_val [dimsizes(th)] :  float or double

Arguments

th

Potential temperature (K).

z

Geometric height (m). Same dimensionality as th.

dim

The dimension number of z which corresponds to th.

Return value

An array of the same size and shape as th. The output will be double if th or z is of type double.

Description

The Brunt-Vaisala frequency (1/s) is a measure of bouyancy. In a continuously stratified fluid, it is the natural frequency of the vertical oscillation of fluid parcels.

For plotting, the returned values which have units (1/s) are often multiplied by 86400 (s/day) to get units of (1/day).

See Also

coriolis_param, pot_temp, static_stability, eady_growth_rate, rigrad_bruntv_atm

Examples

Example 1: Read data from a WRF file and calculate assorted quantities.

;----------------------------------------------------------
;                     WRF DATA
;----------------------------------------------------------

   a  = addfile("wrfout_d01_2013-05-17_12","r") ;[Time|1]x[bottom_top|40]x[south_north|324]x[west_east|414]
                                               ;     0            1              2              3

   th = wrf_user_getvar(a,"theta",-1)      ; potential temperature (degK)
   z  = wrf_user_getvar(a,"z",-1)          ; model height
   ua = wrf_user_getvar(a,"ua"   ,-1)      ; u at mass grid points

   brunt = brunt_vaisala_frq(th, z, 1)
   printVarSummary(brunt)
   printMinMax(brunt, 0)

   xlat = a->XLAT                          ; [Time|1]x[south_north|324]x[west_east|414] 
   printVarSummary(xlat)

   XLAT = conform(th, xlat, (/0,2,3/))     ; (1,40,324,414)

   egr = brunt_vaisala(th, ua, z, XLAT,  1)
   printVarSummary(egr)
   printMinMax(egr, 0)

  ; print all vertical values at an arbitrarily chosen grid point

   ix = 20        ; arbitrary
   jy = 21
   dimTimes = getfilevardimsizes(a,"Times")
   ntim = dimTimes(0)

   print( sprintf("%7.1f", z(ntim-1,:,jy,ix))     \
        + sprintf("%15.5e",brunt(ntim-1,:,jy,ix)) \
        + sprintf("%15.5e",egr(ntim-1,:,jy,ix))   )


The (edited) output is:

   Variable: brunt
   Type: float
   Total Size: 20925216 bytes
               5231304 values
   Number of Dimensions: 4
   Dimensions and sizes:   [Time | 1] x [bottom_top | 39] x [south_north | 324] x [west_east | 414]
   Coordinates: 
   Number Of Attributes: 3
     long_name :   Brunt–Vaisala (buoyancy) frequency: atm
     units :       1/s
     info :        http://glossary.ametsoc.org/wiki/Brunt-v%C3%A4is%C3%A4l%C3%A4_frequency

   (0)     Brunt-Vaisala (buoyancy) frequency: atm: min=0   max=0.0743625
   

   Variable: xlat
   Type: float
   Total Size: 536544 bytes
               134136 values
   Number of Dimensions: 3
   Dimensions and sizes:   [Time | 1] x [south_north | 324] x [west_east | 414]
   Coordinates: 
   Number Of Attributes: 5
     FieldType :   104
     MemoryOrder : XY 
     description : LATITUDE, SOUTH IS NEGATIVE
     units :       degree_north
     stagger :     
   
   Variable: egr
   Type: float
   Total Size: 20925216 bytes
               5231304 values
   Number of Dimensions: 4
   Dimensions and sizes:   [Time | 1] x [bottom_top | 39] x [south_north | 324] x [west_east | 414]
   Coordinates: 
   Number Of Attributes: 3
     _FillValue :  1e+20
     long_name :   maximum eady growth rate
     units :       
   (0)     maximum eady growth rate: min=6.5775e-13   max=0.00406928

   ------------------------------------------
            Z         BRUNT          EGR
   (0)	   29.2    0.00000e+00    1.00000e+20
   (1)	   99.1    0.00000e+00    1.00000e+20
   (2)	  192.9    0.00000e+00    1.00000e+20
   (3)	  313.0    0.00000e+00    1.00000e+20
   (4)	  463.0    3.77258e-03    3.49967e-06
   (5)	  647.4    1.02118e-02    1.24992e-05
   (6)	  872.0    1.06960e-02    1.05712e-05
   (7)	 1142.9    1.34968e-02    2.63051e-06
   (8)	 1463.4    1.98726e-02    3.39886e-06
   (9)	 1835.1    1.83999e-02    4.34887e-06
   (10)	 2258.8    1.26123e-02    2.34866e-06
   (11)	 2733.7    1.07150e-02    5.76828e-07
   (12)	 3259.3    9.99975e-03    3.18521e-06
   (13)	 3835.0    1.02520e-02    4.51157e-06
   (14)	 4442.5    1.24183e-02    2.02051e-06
   (15)	 5057.9    1.37012e-02    9.44995e-07
   (16)	 5674.7    1.16770e-02    1.08149e-06
   (17)	 6292.0    8.31896e-03    5.79138e-06
   (18)	 6907.9    9.73829e-03    1.05950e-05
   (19)	 7523.3    1.10047e-02    5.64395e-06
   (20)	 8139.1    1.07249e-02    3.27011e-07
   (21)	 8755.4    1.01392e-02    8.26907e-07
   (22)	 9372.1    9.75036e-03    3.56708e-06
   (23)	 9988.7    1.10250e-02    7.66039e-06
   (24)	10606.4    1.13320e-02    1.39343e-05
   (25)	11225.7    1.00888e-02    1.61388e-05
   (26)	11845.9    7.97759e-03    1.17152e-05
   (27)	12465.8    8.47375e-03    4.51332e-06
   (28)	13085.9    1.04011e-02    5.23316e-06
   (29)	13707.9    1.33597e-02    1.15163e-05
   (30)	14335.0    1.68360e-02    7.09510e-06
   (31)	14971.9    1.79719e-02    5.89672e-06
   (32)	15621.2    2.00726e-02    6.78411e-06
   (33)	16288.0    2.13622e-02    4.65560e-06
   (34)	16976.2    2.06080e-02    4.16494e-06
   (35)	17686.4    2.01936e-02    4.20652e-06
   (36)	18420.1    2.23056e-02    2.95023e-06
   (37)	19185.4    2.51125e-02    2.68033e-06
   (38)	20094.5    2.53134e-02    3.04996e-06