next up previous contents index
Next: Module BareGroundFluxesMod (File: BareGroundFluxesMod.F90) Up: Module BalanceCheckMod (File: BalanceCheckMod.F90) Previous: Module BalanceCheckMod (File: BalanceCheckMod.F90)   Contents   Index


BalanceCheck


INTERFACE:

   subroutine BalanceCheck(lbp, ubp, lbc, ubc)
DESCRIPTION:

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 - change of internal energy - Sensible heat - Latent heat)

The error should be less than 0.02 W/m4#4 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 subgridAveMod
     use time_manager , only: get_step_size, get_nstep
ARGUMENTS:
     implicit none
     integer :: lbp, ubp ! pft-index bounds
     integer :: lbc, ubc ! column-index bounds
CALLED FROM:
   subroutine driver
REVISION 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 Thornton
LOCAL VARIABLES:
   local pointers to original implicit in arrays
     integer , pointer :: pgridcell(:)       ! pft's gridcell index
     integer , pointer :: cgridcell(:)       ! column's gridcell index
     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) ra
     real(r8), pointer :: endwb(:)           ! water mass end of the time step
     real(r8), pointer :: begwb(:)           ! water mass begining of the time
     real(r8), pointer :: fsa(:)             ! solar radiation absorbed (total
     real(r8), pointer :: fsr(:)             ! solar radiation reflected (W/m*
     real(r8), pointer :: eflx_lwrad_out(:)  ! emitted infrared (longwave) rad
     real(r8), pointer :: eflx_lwrad_net(:)  ! net infrared (longwave) rad (W/
     real(r8), pointer :: sabv(:)            ! solar radiation absorbed by veg
     real(r8), pointer :: sabg(:)            ! solar radiation absorbed by gro
     real(r8), pointer :: eflx_sh_tot(:)     ! total sensible heat flux (W/m**
     real(r8), pointer :: eflx_lh_tot(:)     ! total latent heat flux (W/m8*2)
     real(r8), pointer :: eflx_soil_grnd(:)  ! soil heat flux (W/m**2) [+ = in
     real(r8), pointer :: qflx_evap_tot(:)   ! qflx_evap_soi + qflx_evap_veg +
     real(r8), pointer :: qflx_surf(:)       ! surface runoff (mm H2O /s)
     real(r8), pointer :: qflx_qrgwl(:)      ! qflx_surf at glaciers, wetlands
     real(r8), pointer :: qflx_drain(:)      ! sub-surface runoff (mm H2O /s)
   local pointers to original implicit out arrays
     real(r8), pointer :: errh2o(:)          ! water conservation error (mm H2
     real(r8), pointer :: errsol(:)          ! solar radiation conservation er
     real(r8), pointer :: errlon(:)          ! longwave radiation conservation
     real(r8), pointer :: errseb(:)          ! surface energy conservation err
   local pointers to original implicit in multi-level arrays
     real(r8), pointer :: forc_solad(:,:)    ! direct beam radiation (vis=forc
     real(r8), pointer :: forc_solai(:,:)    ! diffuse radiation     (vis=forc



Mariana Vertenstein 2004-06-21