Subroutine vom_init_vegpar

992 : 
993 : !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
994 : !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
995 : !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
996 : !*-----Initial values---------------------------------------------------
997 : 
998 :       subroutine vom_init_vegpar ()
999 :       use vom_vegwat_mod
1000 :       implicit none
1001 : 
1002 :       REAL*8  :: dummy
1003 : 
1004 :       topt_ = i_toptstart
1005 : 
1006 : !     * Set soil moisture and vegetation parameters to initial conditions
1007 : 
1008 :       call waterbalance_init()
1009 : 
1010 :       if (o_rtdepth .gt. i_cz) then
1011 :         write(*,*) 'Root depth greater than soil depth'
1012 :         o_rtdepth = i_cz
1013 :       endif
1014 : 
1015 :       wsold  = SUM(cH2Ol_s(:))               ! initial soil water storage
1016 :       wsnew = wsold
1017 : 
1018 : !     * Set vegetation parameters
1019 : 
1020 :       q_md   = o_cai * i_mdtf + o_mdstore
1021 :       q_mqx  = q_md * i_mqxtf
1022 :       mqtnew = 0.95d0 * q_mqx                  ! initial wood water storage
1023 :       mqtold = mqtnew
1024 :       rsurftnew(:) = 0.d0
1025 :       lai_lt(:) = 2.5d0 * (/1.0d0-i_incrlait,1.0d0,1.0d0+i_incrlait/)
1026 :       lai_lg(:) = 2.5d0 * (/1.0d0-i_incrlaig,1.0d0,1.0d0+i_incrlaig/)
1027 : 
1028 : !     * Determining the position of the bottom of the tree root zone
1029 : 
1030 :       pos_slt = 0
1031 :       dummy = 0
1032 :       do while (o_rtdepth .gt. dummy)
1033 :         pos_slt = pos_slt + 1
1034 :         dummy = dummy + s_delz(pos_slt)
1035 :       enddo
1036 : 
1037 : !     * Determining the position of the bottom of the tree root zone
1038 : 
1039 :       pos_slg = 0
1040 :       dummy = 0
1041 :       do while (o_rgdepth .gt. dummy)
1042 :         pos_slg = pos_slg + 1
1043 :         dummy = dummy + s_delz(pos_slg)
1044 :       enddo
1045 : 
1046 :       rsurfgnew(1:pos_slg) = i_rsurf_ * s_delz(1:pos_slg)
1047 :       rsurfgnew(pos_slg+1:s_maxlayer) = 0.d0
1048 :       if (pos_slg .gt. wlayernew) then
1049 :         rsurfgnew(wlayernew+1:pos_slg) = i_rsurfmin * s_delz(wlayernew+1:pos_slt)
1050 :       endif
1051 : 
1052 : !     * root surface density (root surface area/soil volume) in each sublayer
1053 : 
1054 :       rsurftnew(1:pos_slt) = i_rsurf_ * s_delz(1:pos_slt)
1055 :       if (pos_slt .gt. wlayernew) then
1056 :         rsurftnew(wlayernew+1:pos_slt) = i_rsurfmin * s_delz(wlayernew+1:pos_slt)
1057 :       endif
1058 :       jmax25t_d(2) = 0.0003d0
1059 :       jmax25g_d(2) = 0.0003d0
1060 : 
1061 :       !set minimum grass coverage, 0 if no vegetation
1062 :       if(i_no_veg .eq. 0) then
1063 :          c_pcgmin     = 0.02d0 ! minimum grass pc; initial point for growth
1064 :       else
1065 :          c_pcgmin     = 0.00d0 !no grasses
1066 :       end if
1067 : 
1068 :       !check if seasonal coverage is read
1069 :       if(i_read_pc == 1) then
1070 :          pcg_d(:) = perc_cov_veg( 1 )
1071 :          !adjust value if perennial + seasonal > 1
1072 :          if( (pcg_d(1) + o_cai) .gt. 1.0) then
1073 :             pcg_d(:) = 1.d0 - o_cai
1074 :          end if
1075 : 
1076 :       else       
1077 :          pcg_d(2)     = MIN(1.d0 - o_cai, c_pcgmin)
1078 :          pcg_d(:)     = pcg_d(2) + (/-i_incrcovg,0.0d0,i_incrcovg/)  ! vector with values varying by 1%
1079 :          pcg_d(3)     = MIN(MAX(c_pcgmin, pcg_d(3)), 1.d0 - o_cai)
1080 :       end if
1081 : 
1082 :       rootlim(:,:,:) = 0.d0
1083 : 
1084 : !     * Direct costs
1085 : 
1086 :       select case(i_lai_function)
1087 :       case(1)
1088 : !        * (3.38)  foliage turnover costs, assuming crown LAI of 2.5
1089 :          q_tct_d(:) = i_tcf * o_cai * 2.5d0
1090 : 
1091 :       case(2)
1092 : !        * foliage turnover costs, LAI as a function of cover (Choudhurry,1987; Monsi and Saeki,1953)
1093 :          q_tct_d(:) = i_tcf * o_cai * lai_lt(:)
1094 :       end select
1095 : 
1096 : !     * Setting yearly, daily and hourly parameters
1097 : 
1098 :       nyear       = fyear(1)
1099 :       rain_y      = 0.d0
1100 :       par_y       = 0.d0
1101 :       srad_y      = 0.d0
1102 :       vd_y        = 0.d0
1103 :       etm_y       = 0.d0
1104 :       esoil_y     = 0.d0
1105 :       ruptkt_d(:) = 0.d0
1106 :       ruptkg_d(:) = 0.d0
1107 :       asst_d(:,:)   = 0.d0
1108 :       assg_d(:,:,:) = 0.d0
1109 :       ioacum      = 0.d0
1110 : !     * for grasses
1111 :       etmg_y      = 0.d0
1112 :       assg_y      = 0.d0
1113 :       rlg_y       = 0.d0
1114 :       rrg_y       = 0.d0
1115 :       cpccg_y     = 0.d0
1116 :       tcg_y       = 0.d0
1117 : !     * for trees
1118 :       etmt_y      = 0.d0
1119 :       asst_y      = 0.d0
1120 :       rlt_y       = 0.d0
1121 :       rrt_y       = 0.d0
1122 :       cpcct_y     = 0.d0
1123 :       tct_y       = 0.d0
1124 : 
1125 :       return
1126 :       end subroutine vom_init_vegpar