next up previous contents
Next: casa_bgfluxes Up: Fortran: Module Interface CASAMod Previous: casa_npp   Contents

casa_allocate


INTERFACE:

   subroutine casa_allocate(lbp, ubp, num_soilp, filter_soilp)
DESCRIPTION:

Provides dynamic or fixed carbon allocation. ------------ code history -------------- allocate.f - Allocation Sub-model modified from allocate.c - Allocation Sub-model

Version 2.1

Designed by: Pierre Freidlingstein Implemented: 12-12-97 Greg Asner Modified: 9-14-98 Greg Asner Modified: 08-31-00 Jeff Hicke modified for LSM/CASA interface by J.John (2001)

---------------------------------

------------ notes -----------------

This code allows for either fixed or dynamic allocation using a flag Need to check units for all variables (CASA vs LSM)

code only executed for soils (ist = 1)

---------------------------------


ARGUMENTS:

     implicit none
     integer, intent(in) :: lbp, ubp   ! pft bounds
     integer, intent(in) :: num_soilp  ! number of soil points in pft filter
     integer, intent(in) :: filter_soilp(ubp-lbp+1) ! pft filter for soil points
LOCAL VARIABLES:
     integer f,c,g,j,l,p
 
     real(r8) livesum
 
     real(r8) leaf_fract
     real(r8) wood_fract
     real(r8) root_fract
     real(r8) tfact
     real(r8) pfact
     real(r8) Llim
     real(r8) Nutrient
     real(r8) WorN
 
     real(r8), parameter :: fixed_leaf = 0.33333333_r8 
     real(r8), parameter :: fixed_stem = 0.33333333_r8 
     real(r8), parameter :: fixed_root = 0.33333333_r8 
 
     real(r8), parameter :: S0        = 0.30_r8
     real(r8), parameter :: R0        = 0.30_r8
     real(r8), parameter :: Llim_min  = 0.1_r8  ! Light limitation min value
     real(r8), parameter :: Llim_max  = 1.0_r8  ! Light limitation max value
     real(r8), parameter :: Nut_min   = 0.1_r8  ! Nutrient limitation min value
     real(r8), parameter :: Nut_max   = 1.0_r8  ! Nutrient limitation max value
     real(r8), parameter :: pfact_min = 0.5_r8  ! min value of precip
     real(r8), parameter :: pfact_mid = 1.0_r8  ! mid value of precip
     real(r8), parameter :: pfact_max = 2.0_r8  ! max value of precip
     real(r8), parameter :: tfact_min = 0.5_r8  ! min value of temperature
     real(r8), parameter :: tfact_max = 1.0_r8  ! max value of temperature
     real(r8), parameter :: Wlim_min  = 0.1_r8  ! Water limitation min value
     real(r8), parameter :: Wlim_max  = 1.0_r8  ! Water limitation max value
 
     ! ------------------------ input/output variables -----------------
     ! input
 
     integer , pointer :: pgridcell(:)    !gridcell index of corresponding pft
     integer , pointer :: pcolumn(:)      !pft's column
     integer , pointer :: ivt(:)          !pft vegetation type
 
     real(r8), pointer :: btran(:)        ! transpiration factor (0 to 1)
     real(r8), pointer :: tlai(:)         ! leaf area index, one-sided, unadjust for burying by snow
     real(r8), pointer :: forc_rain(:)    ! convective precipitation (mm h2o /s)
     real(r8), pointer :: forc_snow(:)    ! large-scale precipitation (mm h2o /s)
 
     real(r8), pointer :: z(:,:)          ! soil layer depth (m)
     real(r8), pointer :: dz(:,:)         ! soil layer thickness (m)
     real(r8), pointer :: sz(:)           !thickness of soil layers contributing to output
     real(r8), pointer :: szc(:)          !thickness of soil layers contributing to output
     real(r8), pointer :: t_soisno(:,:)   ! soil temperature (K)
     real(r8), pointer :: h2osoi_liq(:,:) ! liquid water (kg/m2)
 
     real(r8), pointer :: livefr(:,:)     !live fraction
     real(r8), pointer :: soilt(:)        !soil temp for top 30cm
     real(r8), pointer :: smoist(:)       !soil moisture for top 30cm
     real(r8), pointer :: soiltc(:)       !soil temp for entire column
     real(r8), pointer :: smoistc(:)      !soil moisture for entire column
     real(r8), pointer :: watoptc(:)      !optimal soil water content for et for entire column (mm3/mm3)
     real(r8), pointer :: watdryc(:)      !soil water when et stops for entire column (mm3/mm3)
     real(r8), pointer :: Wlim(:)
CALLED FROM:
   Casa in CASAMod
REVISION HISTORY:
   2004.06.08 Vectorized and reformatted by Forrest Hoffman



Erik Kluzek 2011-06-15