This SUBROUTINE evaluates the value of the friction velocity  as used
 during the iteration loop of the Monin-Obukhov (MO) similarity theory in
 define_canopy.  is used when quantifying the stability
 parameter canopy%zetar in update_zetar, and when evaluating the
 resistance network components rt0 and rt1 in define_canopy.
 The friction velocity quantifies the magnitude of turbulent mixing that
 is occurring as well as the flux of momentum from the atmosphere to
 the land.
The output friction_vel is known as canopy%us elsewhere in the code.
The basic formula is derived from the modified log-law for the vertical profile of wind speed near to the ground namely
with  the integrated similarity function given by psim,
  the wind speed at height ,
  the current value of the stability parameter, and  the
 roughness length.
 A minimum value is applied to the input wind speed, ua= ,
 to assist with convergence of the MO iteration in light wind conditions.
 Small and large value limits are applied to the evaluated .
NOTE Most literature references assume that the reference levels
 for wind and temperature are equal inside the arguments to the
 stability functions  and  - in CABLE this need
 not be true.
  is always defined relative to the reference level for temperature,
 in  the reference height for wind is needed.
 Consequently the calls to psim include conversion
 factors to account for the different reference levels.
 zref_uv and zref_tq passed to comp_friction_vel are the heights above
 the displacement height rough%disp.
Kowalczyk et al. (2006) - section 3.1, equations 1-9.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real, | intent(out) | :: | friction_vel(mp) | friction velocity (ms) | ||
| integer, | intent(in) | :: | iter | MO iteration counter (-) | ||
| integer, | intent(in) | :: | mp | size of cable vector of land points (-) | ||
| real, | intent(in) | :: | CVONK | von Karman constant (-) | ||
| real, | intent(in) | :: | CUMIN | minimum value of wind speed (ms) | ||
| real, | intent(in) | :: | CPI_C | (-) | ||
| real, | intent(in) | :: | zetar(mp,iter) | stability parameter - see update_zetar  | ||
| real, | intent(in) | :: | zref_uv(mp) | reference height for wind  | ||
| real, | intent(in) | :: | zref_tq(mp) | reference height for temperature and humidity  | ||
| real, | intent(in) | :: | z0m(mp) | roughness length  | ||
| real, | intent(in) | :: | ua(mp) | wind speed  |