INTERFACE:
subroutine BalanceCheck (c)DESCRIPTION:
Water and energy balance check
This subroutine accumulates the numerical truncation errors of the water
and energy balance calculation. It is helpful to see the performance of
the process of integration.
The error for energy balance:
error = abs(Net radiation - the change of internal energy - Sensible heat
- Latent heat)
The error should be less than 0.02 W/m2 in each time integration interval;
The error for water balance:
error = abs(precipitation - change of water storage - evaporation - runoff)
The error should be less than 0.001 mm in each time integration interval.
USES:
use clmtype
use globals, only: dtime, nstep
ARGUMENTS:
implicit none
type (column_type),target,intent(inout) :: c !column derived type
CALLED FROM:
subroutine driverREVISION HISTORY:
15 September 1999: Yongjiu Dai; Initial code 15 December 1999: Paul Houser and Jon Radakovich; F90 Revision 10 November 2000: Mariana Vertenstein Migrated to new data structures by Mariana Vertenstein and Peter ThorntonLOCAL VARIABLES:
local pointers to original implicit in scalars
real(r8), pointer :: forc_rain !rain rate [mm/s]
real(r8), pointer :: forc_snow !snow rate [mm/s]
real(r8), pointer :: forc_lwrad !downward infrared (longwave) radiation (W/m**2)
real(r8), pointer :: endwb !water mass end of the time step
real(r8), pointer :: begwb !water mass begining of the time step
real(r8), pointer :: fsa !solar radiation absorbed (total) (W/m**2)
real(r8), pointer :: fsr !solar radiation reflected (W/m**2)
real(r8), pointer :: eflx_lwrad_out!emitted infrared (longwave) radiation (W/m**2)
real(r8), pointer :: eflx_lwrad_net!net infrared (longwave) rad (W/m**2) [+ = to atm]
real(r8), pointer :: sabv !solar radiation absorbed by vegetation (W/m**2)
real(r8), pointer :: sabg !solar radiation absorbed by ground (W/m**2)
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_soil_grnd!soil heat flux (W/m**2) [+ = into soil]
real(r8), pointer :: qflx_evap_tot !qflx_evap_soi + qflx_evap_veg + qflx_tran_veg
real(r8), pointer :: qflx_surf !surface runoff (mm H2O /s)
real(r8), pointer :: qflx_qrgwl !qflx_surf at glaciers, wetlands, lakes
real(r8), pointer :: qflx_drain !sub-surface runoff (mm H2O /s)
local pointers to original implicit inout scalars
real(r8), pointer :: acc_errh2o !accumulation of water balance error
real(r8), pointer :: acc_errseb !accumulation of surface energy balance error
local pointers to original implicit out scalars
real(r8), pointer :: errh2o !water conservation error (mm H2O)
real(r8), pointer :: errsol !solar radiation conservation error (W/m**2)
real(r8), pointer :: errlon !longwave radiation conservation error (W/m**2)
real(r8), pointer :: errseb !surface energy conservation error (W/m**2)
local pointers to original implicit in arrays
real(r8),dimension(:), pointer :: forc_solad !direct beam radiation (vis=forc_sols , nir=forc_soll )
real(r8),dimension(:), pointer :: forc_solai !diffuse radiation (vis=forc_solsd, nir=forc_solld)