@@ -23,10 +23,13 @@ module FatesFactoryMod
2323 use EDParamsMod, only : nclmax
2424 use EDParamsMod, only : photo_temp_acclim_timescale
2525 use EDParamsMod, only : photo_temp_acclim_thome_time
26+ use EDParamsMod, only : FatesParamsInitForFactory
2627 use FatesRunningMeanMod, only : ema_24hr, fixed_24hr, ema_lpa, ema_longterm
2728 use FatesRunningMeanMod, only : moving_ema_window, fixed_window
2829 use EDCohortDynamicsMod, only : InitPRTObject
2930 use PRTParametersMod, only : prt_params
31+ use EDPftvarcon, only : EDPftvarcon_inst
32+ use FatesParameterDerivedMod, only : param_derived
3033 use PRTGenericMod, only : element_pos
3134 use PRTGenericMod, only : num_elements
3235 use PRTGenericMod, only : element_list
@@ -80,6 +83,57 @@ subroutine InitializeGlobals(step_size)
8083
8184 ! LOCALS:
8285 integer :: i ! looping index
86+ integer , parameter :: n_pfts = 14
87+ integer , parameter :: n_leafage_class = 1
88+
89+ ! Things from parameter file for prt_params
90+ call FatesParamsInitForFactory()
91+ allocate (prt_params% allom_amode(n_pfts)); prt_params% allom_amode = [3 , 3 , 3 , 3 , 3 , 3 , 1 , 1 , 1 , 1 , 1 , 5 , 5 , 5 ]
92+ allocate (prt_params% allom_agb1(n_pfts)); prt_params% allom_agb1 = [0.0673 , 0.1364012 , 0.0393057 , 0.2653695 , 0.0673 , 0.0728698 , 0.06896 , 0.06896 , 0.06896 , 0.06896 , 0.06896 , 0.001 , 0.001 , 0.003 ]
93+ allocate (prt_params% allom_agb2(n_pfts)); prt_params% allom_agb2 = [0.976 , 0.9449041 , 1.087335 , 0.8321321 , 0.976 , 1.0373211 , 0.572 , 0.572 , 0.572 , 0.5289883 , 0.6853945 , 1.6592 , 1.6592 , 1.3456 ]
94+ allocate (prt_params% allom_agb3(n_pfts)); prt_params% allom_agb3 = [1.94 , 1.94 , 1.94 , 1.94 , 1.94 , 1.94 , 1.94 , 1.94 , 1.94 , 2.1010352 , 1.7628613 , 1.248 , 1.248 , 1.869 ]
95+ allocate (prt_params% allom_agb4(n_pfts)); prt_params% allom_agb4 = [0.931 , 0.931 , 0.931 , 0.931 , 0.931 , 0.931 , 0.931 , 0.931 , 0.931 , 0.931 , 0.931 , - 999.9 , - 999.9 , - 999.9 ]
96+ allocate (prt_params% allom_agb_frac(n_pfts)); prt_params% allom_agb_frac = [0.6 , 0.6 , 0.6 , 0.6 , 0.6 , 0.6 , 0.6 , 0.6 , 0.6 , 0.6 , 0.6 , 1 ., 1 ., 1 .]
97+ allocate (prt_params% allom_blca_expnt_diff(n_pfts)); prt_params% allom_blca_expnt_diff = [- 0.12 , - 0.34 , - 0.32 , - 0.22 , - 0.12 , - 0.35 , 0 ., 0 ., 0 ., 0 ., 0 ., - 0.487 , - 0.487 , - 0.259 ]
98+ allocate (prt_params% allom_d2bl1(n_pfts)); prt_params% allom_d2bl1 = [0.04 , 0.07 , 0.07 , 0.01 , 0.04 , 0.07 , 0.07 , 0.07 , 0.07 , 0.0481934 , 0.0481934 , 0.0004 , 0.0004 , 0.0012 ]
99+ allocate (prt_params% allom_d2bl2(n_pfts)); prt_params% allom_d2bl2 = [1.6019679 , 1.5234373 , 1.3051237 , 1.9621397 , 1.6019679 , 1.3998939 , 1.3 , 1.3 , 1.3 , 1.0600586 , 1.7176758 , 1.7092 , 1.7092 , 1.5879 ]
100+ allocate (prt_params% allom_d2bl3(n_pfts)); prt_params% allom_d2bl3 = [0.55 , 0.55 , 0.55 , 0.55 , 0.55 , 0.55 , 0.55 , 0.55 , 0.55 , 0.55 , 0.55 , 0.3417 , 0.3417 , 0.9948 ]
101+ allocate (prt_params% allom_d2ca_coefficient_max(n_pfts)); prt_params% allom_d2ca_coefficient_max = [0.2715891 , 0.3693718 , 1.0787259 , 0.0579297 , 0.2715891 , 1.1553612 , 0.6568464 , 0.6568464 , 0.6568464 , 0.4363427 , 0.3166497 , 0.0408 , 0.0408 , 0.0862 ]
102+ allocate (prt_params% allom_d2ca_coefficient_min(n_pfts)); prt_params% allom_d2ca_coefficient_min = prt_params% allom_d2ca_coefficient_max
103+ allocate (prt_params% allom_d2h1(n_pfts)); prt_params% allom_d2h1 = [78.4087704 , 306.842667 , 106.8745821 , 104.3586841 , 78.4087704 , 31.4557047 , 0.64 , 0.64 , 0.64 , 0.8165625 , 0.778125 , 0.1812 , 0.1812 , 0.3353 ]
104+ allocate (prt_params% allom_d2h2(n_pfts)); prt_params% allom_d2h2 = [0.8124383 , 0.752377 , 0.9471302 , 1.1146973 , 0.8124383 , 0.9734088 , 0.37 , 0.37 , 0.37 , 0.2316113 , 0.4027002 , 0.6384 , 0.6384 , 0.4235 ]
105+ allocate (prt_params% allom_d2h3(n_pfts)); prt_params% allom_d2h3 = [47.6666164 , 196.6865691 , 93.9790461 , 160.6835089 , 47.6666164 , 16.5928174 , - 999.9 , - 999.9 , - 999.9 , - 999.9 , - 999.9 , - 999.9 , - 999.9 , - 999.9 ]
106+ allocate (prt_params% allom_dbh_maxheight(n_pfts)); prt_params% allom_dbh_maxheight = [1000 ., 1000 ., 1000 ., 1000 ., 1000 ., 1000 ., 3 ., 3 ., 2 ., 2.4 , 1.9 , 20 ., 20 ., 30 .]
107+ allocate (prt_params% allom_hmode(n_pfts)); prt_params% allom_hmode = [5 , 5 , 5 , 5 , 5 , 5 , 1 , 1 , 1 , 1 , 1 , 3 , 3 , 3 ]
108+ allocate (prt_params% allom_lmode(n_pfts)); prt_params% allom_lmode = [2 , 2 , 2 , 2 , 2 , 2 , 1 , 1 , 1 , 1 , 1 , 5 , 5 , 5 ]
109+ allocate (prt_params% c2b(n_pfts)); prt_params% c2b(:) = 2
110+ allocate (prt_params% phen_leaf_habit(n_pfts)); prt_params% phen_leaf_habit = [1 , 1 , 2 , 1 , 3 , 2 , 1 , 3 , 2 , 1 , 2 , 2 , 3 , 3 ]
111+ allocate (prt_params% wood_density(n_pfts)); prt_params% wood_density = [0.548327 , 0.44235 , 0.454845 , 0.754336 , 0.548327 , 0.566452 , 0.7 , 0.7 , 0.7 , 0.7 , 0.7 , 0.7 , 0.7 , 0.7 ]
112+ allocate (prt_params% allom_cmode(n_pfts)); prt_params% allom_cmode(:) = 1
113+ allocate (prt_params% allom_l2fr(n_pfts)); prt_params% allom_l2fr = [1 ., 1 ., 1 ., 1 ., 1 ., 1 ., 1 ., 1 ., 1 ., 1 ., 1 ., 0.67 , 0.67 , 1.41 ]
114+ allocate (prt_params% allom_fmode(n_pfts)); prt_params% allom_fmode(:) = 1
115+ allocate (prt_params% allom_smode(n_pfts)); prt_params% allom_smode = [1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 2 , 2 , 2 ]
116+ allocate (prt_params% slatop(n_pfts)); prt_params% slatop = [0.012 , 0.005 , 0.024 , 0.009 , 0.03 , 0.03 , 0.012 , 0.03 , 0.03 , 0.01 , 0.032 , 0.027 , 0.05 , 0.05 ]
117+ allocate (prt_params% allom_la_per_sa_int(n_pfts)); prt_params% allom_la_per_sa_int(:) = 0.8
118+ allocate (prt_params% allom_la_per_sa_slp(n_pfts)); prt_params% allom_la_per_sa_slp(:) = 0 .
119+ allocate (prt_params% allom_stmode(n_pfts)); prt_params% allom_stmode(:) = 1
120+ allocate (prt_params% cushion(n_pfts)); prt_params% cushion = [1.2 , 1.2 , 1.2 , 1.2 , 2.4 , 1.2 , 1.2 , 2.4 , 1.2 , 1.5 , 1.4 , 1.2 , 1.2 , 1.2 ]
121+ allocate (prt_params% leafn_vert_scaler_coeff1(n_pfts)); prt_params% leafn_vert_scaler_coeff1(:) = 0.00963
122+ allocate (prt_params% leafn_vert_scaler_coeff2(n_pfts)); prt_params% leafn_vert_scaler_coeff2(:) = 2.43
123+ allocate (prt_params% slamax(n_pfts)); prt_params% slamax = [0.0954 , 0.0954 , 0.0954 , 0.0954 , 0.0954 , 0.0954 , 0.012 , 0.03 , 0.03 , 0.012 , 0.032 , 0.05 , 0.05 , 0.05 ]
124+ allocate (prt_params% allom_sai_scaler(n_pfts)); prt_params% allom_sai_scaler(:) = 0.1
125+ allocate (prt_params% phen_fnrt_drop_fraction(n_pfts)); prt_params% phen_fnrt_drop_fraction(:) = 0 .
126+ allocate (prt_params% phen_stem_drop_fraction(n_pfts)); prt_params% phen_stem_drop_fraction(:) = 0 .
127+ allocate (prt_params% leaf_long(n_pfts,n_leafage_class)); prt_params% leaf_long = reshape ([1.5 , 4 ., 1 ., 1.5 , 1 ., 1 ., 1.5 , 1 ., 1 ., 1.5 , 1 ., 1 ., 1 ., 1 .], shape (prt_params% leaf_long))
128+
129+ ! Things from parameter file for EDPftvarcon_inst
130+ allocate (EDPftvarcon_inst% damage_frac(n_pfts))
131+ EDPftvarcon_inst% damage_frac = [0.01 , 0.01 , 0.01 , 0.01 , 0.01 , 0.01 , 0.01 , 0.01 , 0.01 , 0.01 , &
132+ 0.01 , 0.01 , 0.01 , 0.01 ]
133+
134+ ! Derived parameters
135+ ! call EDPftvarcon_inst%EDpftconInit()
136+ call param_derived% Init(n_pfts)
83137
84138 ! initialize some values
85139 hlm_parteh_mode = prt_carbon_allom_hyp
0 commit comments