• Main Page
  • Modules
  • Data Types List
  • Files
  • File List
  • File Members

calculate_td.F90

Go to the documentation of this file.
00001 subroutine calculate_td (sib, midmon, curNDVI)
00002 
00003 ! Calls mapper for each sib point.  Mapper calculates the time dependent
00004 !   boundary condition data.  This data is then assigned to appropriate 
00005 !   variables.
00006 
00007 !     CREATED BY:
00008 !        Owen Leonard   August 10, 2001
00009 !     MODIFICATIONS:
00010 !     SUBROUTINES CALLED:
00011 !     FUNCTIONS CALLED:
00012 
00013 use sibtype
00014 use sib_const_module
00015 use sib_bc_module
00016 use kinds
00017 
00018 implicit none
00019 
00020 ! parameters
00021 type(sib_t), dimension(subcount), intent(inout) :: sib
00022 real(kind=real_kind), intent (in) :: midmon     ! middle of month
00023 !ndvi variables (local)
00024 real(kind=real_kind), dimension(subcount), intent(in) :: curndvi
00025 
00026 ! local variables
00027 integer(kind=int_kind) :: i,k   ! index variable
00028 real(kind=real_kind) :: temptran (2,2)
00029 real(kind=real_kind) :: tempref (2,2)
00030 type time_dep_var
00031     real(kind=real_kind) :: fpar       ! canopy absorbed fraction of par
00032     real(kind=real_kind) :: lai        ! leaf-area index
00033     real(kind=real_kind) :: green      ! canopy greeness fraction of lai
00034     real(kind=real_kind) :: zo         ! canopy roughness coeff 
00035     real(kind=real_kind) :: zp_disp    ! zero plane displacement
00036     real(kind=real_kind) :: rbc        ! rb coefficient (c1)
00037     real(kind=real_kind) :: rdc        ! rc coefficient (c2)
00038     real(kind=real_kind) :: gmudmu     ! time-mean leaf projection
00039 end type time_dep_var
00040 type(time_dep_var) :: timevar
00041 
00042 type(aero_var) :: tempaerovar(50,50)
00043 
00044 
00045 
00046     do i = 1, subcount  
00047         k = int(sib(i)%param%biome)
00048         temptran = sib(i)%param%tran(:,:)
00049         tempref = sib(i)%param%ref(:,:)
00050         tempaerovar = aerovar(:,:,k)
00051 
00052         call mapper(          &
00053             latsib(subset(i)),&
00054             midmon,           &
00055             prevndvi(i),      &
00056             curndvi(i),       &
00057             sib(i)%param%vcover, &
00058             sib(i)%param%chil,   &
00059             temptran,         &
00060             tempref,          &
00061             morphtab(k),      &
00062             tempaerovar,      &
00063             laigrid,          &
00064             fvcovergrid,      &
00065             timevar)
00066 
00067         sib(i)%param%aparc2 = timevar%fpar
00068         sib(i)%param%zlt2 = timevar%lai
00069         sib(i)%param%green2 = timevar%green
00070         sib(i)%param%z0d2 = timevar%zo
00071         sib(i)%param%zp_disp2 = timevar%zp_disp
00072         sib(i)%param%rbc2 = timevar%rbc
00073         sib(i)%param%rdc2 = timevar%rdc
00074         sib(i)%param%gmudmu2 = timevar%gmudmu
00075     enddo      
00076 
00077 end subroutine calculate_td

Generated on Tue Apr 16 2013 21:01:40 for SIB by  doxygen 1.7.1