This subroutine computes the balance of heat in the form
Horizontal advection is optionally included (see obs.nml) by means of prescribed horizontal gradients and and calculated horizontal mean velocities and . Relaxation with the time scale towards a precribed profile , changing in time, is possible.
The sum of latent, sensible, and longwave radiation is treated as a boundary condition. Solar radiation is treated as an inner source, . It is computed according the exponential law (see Paulson and Simpson (1977))
Diffusion is numerically treated implicitly, see equations (7)- (9). The tri-diagonal matrix is solved then by a simplified Gauss elimination. Vertical advection is included, and it must be non-conservative, which is ensured by setting the local variable adv_mode=0, see section 8.5 on page .
use meanflow, only: avmolt,rho_0,cp use meanflow, only: h,u,v,w,T,S,avh use meanflow, only: bioshade use observations, only: dtdx,dtdy,t_adv use observations, only: w_adv_discr,w_adv_method use observations, only: tprof,TRelaxTau use observations, only: A,g1,g2 use util, only: Dirichlet,Neumann use util, only: oneSided,zeroDivergence IMPLICIT NONEINPUT PARAMETERS:
number of vertical layers integer, intent(in) :: nlev time step (s) REALTYPE, intent(in) :: dt numerical "implicitness" parameter REALTYPE, intent(in) :: cnpar surface short waves radiation (W/m^2) REALTYPE, intent(in) :: I_0 surface heat flux (W/m^2) (negative for heat loss) REALTYPE, intent(in) :: heat diffusivity of heat (m^2/s) REALTYPE, intent(in) :: nuh(0:nlev) non-local heat flux (Km/s) REALTYPE, intent(in) :: gamh(0:nlev)OUTPUT PARAMETERS:
shortwave radiation profile (W/m^2) REALTYPE :: rad(0:nlev)REVISION HISTORY:
Original author(s): Hans Burchard & Karsten Bolding
Karsten Bolding 2012-12-28