Next: Fortran: Module Interface CanopyFluxesMod Up: Fortran: Module Interface BiogeophysicsLakeMod Previous: Fortran: Module Interface BiogeophysicsLakeMod   Contents

### BiogeophysicsLake

INTERFACE:

```   subroutine BiogeophysicsLake (c)
```
DESCRIPTION:

```   Calculates lake temperatures  and surface fluxes.
Lake temperatures are determined from a one-dimensional thermal
stratification model based on eddy diffusion concepts to
represent vertical mixing of heat.
d ts    d            d ts     1 ds
---- = -- [(km + ke) ----] + -- --
dt    dz             dz     cw dz
where: ts = temperature (kelvin)
t = time (s)
z = depth (m)
km = molecular diffusion coefficient (m**2/s)
ke = eddy diffusion coefficient (m**2/s)
cw = heat capacity (j/m**3/kelvin)
s = heat source term (w/m**2)
There are two types of lakes:
Deep lakes are 50 m.
Shallow lakes are 10 m deep.
For unfrozen deep lakes:    ke > 0 and    convective mixing
For unfrozen shallow lakes: ke = 0 and no convective mixing
Use the Crank-Nicholson method to set up tridiagonal system of equations to
solve for ts at time n+1, where the temperature equation for layer i is
r_i = a_i [ts_i-1] n+1 + b_i [ts_i] n+1 + c_i [ts_i+1] n+1
The solution conserves energy as:
cw*([ts(      1)] n+1 - [ts(      1)] n)*dz(      1)/dt + ... +
cw*([ts(nlevlak)] n+1 - [ts(nlevlak)] n)*dz(nlevlak)/dt = fin
where:
[ts] n   = old temperature (kelvin)
[ts] n+1 = new temperature (kelvin)
fin      = heat flux into lake (w/m**2)
- hm + phi(1) + ... + phi(nlevlak)
```
USES:
```     use shr_kind_mod, only: r8 => shr_kind_r8
use clmtype
use globals
use clm_varpar, only : nlevlak
use clm_varcon, only : hvap, hsub, hfus, cpair, cpliq, tkwat, tkice, &
sb, vkc, grav, denh2o, tfrz, spval
use QSatMod, only : QSat
use FrictionVelocityMod, only : MoninObukIni, FrictionVelocity
use TridiagonalMod, only : Tridiagonal
```
ARGUMENTS:
```     implicit none
type (column_type), target, intent(inout) :: c  !column derived type
```
CALLED FROM:
```   subroutine driver
```
REVISION HISTORY:
```   Author: Gordon Bonan
15 September 1999: Yongjiu Dai; Initial code
15 December 1999:  Paul Houser and Jon Radakovich; F90 Revision
Migrated to clm2.1 new data structures by Peter Thornton and M. Vertenstein
```
LOCAL VARIABLES:
```   local pointers to implicit in scalars
real(r8), pointer :: forc_t          !atmospheric temperature (Kelvin)
real(r8), pointer :: forc_pbot       !atmospheric pressure (Pa)
real(r8), pointer :: forc_hgt        !atmospheric reference height (m)
real(r8), pointer :: forc_hgt_q      !observational height of humidity [m]
real(r8), pointer :: forc_hgt_t      !observational height of temperature [m]
real(r8), pointer :: forc_hgt_u      !observational height of wind [m]
real(r8), pointer :: forc_th         !atmospheric potential temperature (Kelvin)
real(r8), pointer :: forc_q          !atmospheric specific humidity (kg/kg)
real(r8), pointer :: forc_u          !atmospheric wind speed in east direction (m/s)
real(r8), pointer :: forc_v          !atmospheric wind speed in north direction (m/s)
real(r8), pointer :: forc_rho        !density (kg/m**3)
real(r8), pointer :: forc_snow       !snow rate [mm/s]
real(r8), pointer :: forc_rain       !rain rate [mm/s]
real(r8), pointer :: t_grnd          !ground temperature (Kelvin)
real(r8), pointer :: h2osno          !snow water (mm H2O)
real(r8), pointer :: snowdp          !snow height (m)
real(r8), pointer :: sabg            !solar radiation absorbed by ground (W/m**2)
real(r8), pointer :: lat             !latitude (radians)
local pointers to implicit out scalars
real(r8), pointer :: begwb           !water mass begining of the time step
real(r8), pointer :: qflx_prec_grnd  !water onto ground including canopy runoff [kg/(m2 s)]
real(r8), pointer :: qflx_evap_soi   !soil evaporation (mm H2O/s) (+ = to atm)
real(r8), pointer :: qflx_evap_tot   !qflx_evap_soi + qflx_evap_veg + qflx_tran_veg
real(r8), pointer :: eflx_sh_grnd    !sensible heat flux from ground (W/m**2) [+ to atm]
real(r8), pointer :: eflx_lwrad_net  !net infrared (longwave) rad (W/m**2) [+ = to atm]
real(r8), pointer :: eflx_soil_grnd  !soil heat flux (W/m**2) [+ = into soil]
real(r8), pointer :: eflx_sh_tot     !total sensible heat flux (W/m**2) [+ to atm]
real(r8), pointer :: eflx_lh_tot     !total latent heat flux (W/m8*2)  [+ to atm]
real(r8), pointer :: eflx_lh_grnd    !ground evaporation heat flux (W/m**2) [+ to atm]
real(r8), pointer :: t_veg           !vegetation temperature (Kelvin)
real(r8), pointer :: t_ref2m         !2 m height surface air temperature (Kelvin)
real(r8), pointer :: taux            !wind (shear) stress: e-w (kg/m/s**2)
real(r8), pointer :: tauy            !wind (shear) stress: n-s (kg/m/s**2)
real(r8), pointer :: qmelt           !snow melt [mm/s]
real(r8), pointer :: u10             !10-m wind (m/s) (for dust model)
real(r8), pointer :: fv              !friction velocity (m/s) (for dust model)
real(r8), pointer :: ram1            !aerodynamical resistance (s/m)
real(r8), pointer :: errsoi          !soil/lake energy conservation error (W/m**2)
local pointers to implicit in arrays
real(r8), dimension(:), pointer :: dz !layer thickness (m)
real(r8), dimension(:), pointer :: z  !layer depth (m)
local pointers to implicit out arrays
real(r8), dimension(:), pointer :: t_lake !lake temperature (Kelvin)
```

Mariana Vertenstein 2003-01-14