Skip to content

Commit 59c7c8d

Browse files
committed
Removal of deprecated parameter structure EDecophyscon
1 parent 4667f15 commit 59c7c8d

File tree

9 files changed

+58
-304
lines changed

9 files changed

+58
-304
lines changed

biogeochem/EDCanopyStructureMod.F90

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module EDCanopyStructureMod
77

88
use FatesConstantsMod , only : r8 => fates_r8
99
use FatesGlobals , only : fates_log
10-
use EDPftvarcon , only : EDPftvarcon_inst
10+
use EDPftvarcon , only : EDPftvarcon_inst
1111
use EDGrowthFunctionsMod , only : c_area
1212
use EDCohortDynamicsMod , only : copy_cohort, terminate_cohorts, fuse_cohorts
1313
use EDtypesMod , only : ed_site_type, ed_patch_type, ed_cohort_type, ncwd
@@ -825,7 +825,6 @@ subroutine canopy_summarization( nsites, sites, bc_in )
825825
use EDPatchDynamicsMod , only : set_root_fraction
826826
use EDTypesMod , only : sizetype_class_index
827827
use EDGrowthFunctionsMod , only : tree_lai, c_area
828-
use EDEcophysConType , only : EDecophyscon
829828
use EDtypesMod , only : area
830829
use EDPftvarcon , only : EDPftvarcon_inst
831830

@@ -941,7 +940,6 @@ subroutine leaf_area_profile( currentSite , snow_depth_si, frac_sno_eff_si)
941940

942941
use EDGrowthFunctionsMod , only : tree_lai, tree_sai, c_area
943942
use EDtypesMod , only : area, dinc_ed, hitemax, n_hite_bins
944-
use EDEcophysConType , only : EDecophyscon
945943

946944
!
947945
! !ARGUMENTS
@@ -1051,19 +1049,19 @@ subroutine leaf_area_profile( currentSite , snow_depth_si, frac_sno_eff_si)
10511049
currentCohort => currentPatch%shortest
10521050
do while(associated(currentCohort))
10531051
ft = currentCohort%pft
1054-
min_chite = currentCohort%hite - currentCohort%hite * EDecophyscon%crown(ft)
1052+
min_chite = currentCohort%hite - currentCohort%hite * EDPftvarcon_inst%crown(ft)
10551053
max_chite = currentCohort%hite
10561054
do iv = 1,N_HITE_BINS
10571055
frac_canopy(iv) = 0.0_r8
10581056
! this layer is in the middle of the canopy
10591057
if(max_chite > maxh(iv).and.min_chite < minh(iv))then
1060-
frac_canopy(iv)= min(1.0_r8,dh / (currentCohort%hite*EDecophyscon%crown(ft)))
1058+
frac_canopy(iv)= min(1.0_r8,dh / (currentCohort%hite*EDPftvarcon_inst%crown(ft)))
10611059
! this is the layer with the bottom of the canopy in it.
10621060
elseif(min_chite < maxh(iv).and.min_chite > minh(iv).and.max_chite > maxh(iv))then
1063-
frac_canopy(iv) = (maxh(iv) -min_chite ) / (currentCohort%hite*EDecophyscon%crown(ft))
1061+
frac_canopy(iv) = (maxh(iv) -min_chite ) / (currentCohort%hite*EDPftvarcon_inst%crown(ft))
10641062
! this is the layer with the top of the canopy in it.
10651063
elseif(max_chite > minh(iv).and.max_chite < maxh(iv).and.min_chite < minh(iv))then
1066-
frac_canopy(iv) = (max_chite - minh(iv)) / (currentCohort%hite*EDecophyscon%crown(ft))
1064+
frac_canopy(iv) = (max_chite - minh(iv)) / (currentCohort%hite*EDPftvarcon_inst%crown(ft))
10671065
elseif(max_chite < maxh(iv).and.min_chite > minh(iv))then !the whole cohort is within this layer.
10681066
frac_canopy(iv) = 1.0_r8
10691067
endif
@@ -1159,9 +1157,9 @@ subroutine leaf_area_profile( currentSite , snow_depth_si, frac_sno_eff_si)
11591157
! what is the height of this layer? (for snow burial purposes...)
11601158
! EDPftvarcon_inst%vertical_canopy_frac(ft))! fudge - this should be pft specific but i cant get it to compile.
11611159
layer_top_hite = currentCohort%hite-((iv/currentCohort%NV) * currentCohort%hite * &
1162-
EDecophyscon%crown(currentCohort%pft) )
1160+
EDPftvarcon_inst%crown(currentCohort%pft) )
11631161
layer_bottom_hite = currentCohort%hite-(((iv+1)/currentCohort%NV) * currentCohort%hite * &
1164-
EDecophyscon%crown(currentCohort%pft)) ! EDPftvarcon_inst%vertical_canopy_frac(ft))
1162+
EDPftvarcon_inst%crown(currentCohort%pft)) ! EDPftvarcon_inst%vertical_canopy_frac(ft))
11651163

11661164
fraction_exposed =1.0_r8
11671165

@@ -1192,10 +1190,10 @@ subroutine leaf_area_profile( currentSite , snow_depth_si, frac_sno_eff_si)
11921190
iv = currentCohort%NV
11931191
! EDPftvarcon_inst%vertical_canopy_frac(ft))! fudge - this should be pft specific but i cant get it to compile.
11941192
layer_top_hite = currentCohort%hite-((iv/currentCohort%NV) * currentCohort%hite * &
1195-
EDecophyscon%crown(currentCohort%pft) )
1193+
EDPftvarcon_inst%crown(currentCohort%pft) )
11961194
! EDPftvarcon_inst%vertical_canopy_frac(ft))
11971195
layer_bottom_hite = currentCohort%hite-(((iv+1)/currentCohort%NV) * currentCohort%hite * &
1198-
EDecophyscon%crown(currentCohort%pft))
1196+
EDPftvarcon_inst%crown(currentCohort%pft))
11991197

12001198
fraction_exposed = 1.0_r8 !default.
12011199
snow_depth_avg = snow_depth_si * frac_sno_eff_si

biogeochem/EDCohortDynamicsMod.F90

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ module EDCohortDynamicsMod
1313
use FatesConstantsMod , only : itrue
1414
use FatesInterfaceMod , only : hlm_days_per_year
1515
use EDPftvarcon , only : EDPftvarcon_inst
16-
use EDEcophysContype , only : EDecophyscon
1716
use EDGrowthFunctionsMod , only : c_area, tree_lai
1817
use EDTypesMod , only : ed_site_type, ed_patch_type, ed_cohort_type
1918
use EDTypesMod , only : nclmax

biogeochem/EDPhysiologyMod.F90

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ module EDPhysiologyMod
1313
use FatesInterfaceMod, only : hlm_day_of_year
1414
use FatesInterfaceMod, only : numpft
1515
use FatesConstantsMod, only : r8 => fates_r8
16-
use EDEcophysContype , only : EDecophyscon
1716
use EDPftvarcon , only : EDPftvarcon_inst
18-
use EDEcophysContype , only : EDecophyscon
1917
use FatesInterfaceMod, only : bc_in_type
2018
use EDCohortDynamicsMod , only : allocate_live_biomass, zero_cohort
2119
use EDCohortDynamicsMod , only : create_cohort, sort_cohorts
@@ -194,14 +192,14 @@ subroutine trim_canopy( currentSite )
194192
currentCohort%leaf_cost = 1._r8/(EDPftvarcon_inst%slatop(currentCohort%pft)*1000.0_r8)
195193
currentCohort%leaf_cost = currentCohort%leaf_cost + &
196194
1.0_r8/(EDPftvarcon_inst%slatop(currentCohort%pft)*1000.0_r8) * &
197-
EDPftvarcon_inst%allom_l2fr(currentCohort%pft) / EDecophyscon%root_long(currentCohort%pft)
195+
EDPftvarcon_inst%allom_l2fr(currentCohort%pft) / EDPftvarcon_inst%root_long(currentCohort%pft)
198196
currentCohort%leaf_cost = currentCohort%leaf_cost * (EDPftvarcon_inst%grperc(currentCohort%pft) + 1._r8)
199197
else !evergreen costs
200198
currentCohort%leaf_cost = 1.0_r8/(EDPftvarcon_inst%slatop(currentCohort%pft)* &
201199
EDPftvarcon_inst%leaf_long(currentCohort%pft)*1000.0_r8) !convert from sla in m2g-1 to m2kg-1
202200
currentCohort%leaf_cost = currentCohort%leaf_cost + &
203201
1.0_r8/(EDPftvarcon_inst%slatop(currentCohort%pft)*1000.0_r8) * &
204-
EDPftvarcon_inst%allom_l2fr(currentCohort%pft) / EDecophyscon%root_long(currentCohort%pft)
202+
EDPftvarcon_inst%allom_l2fr(currentCohort%pft) / EDPftvarcon_inst%root_long(currentCohort%pft)
205203
currentCohort%leaf_cost = currentCohort%leaf_cost * (EDPftvarcon_inst%grperc(currentCohort%pft) + 1._r8)
206204
endif
207205
if (currentCohort%year_net_uptake(z) < currentCohort%leaf_cost)then
@@ -212,7 +210,7 @@ subroutine trim_canopy( currentSite )
212210
endif
213211

214212
! keep trimming until none of the canopy is in negative carbon balance.
215-
if (currentCohort%hite > EDecophyscon%hgt_min(currentCohort%pft))then
213+
if (currentCohort%hite > EDPftvarcon_inst%hgt_min(currentCohort%pft))then
216214
currentCohort%canopy_trim = currentCohort%canopy_trim - EDPftvarcon_inst%trim_inc(currentCohort%pft)
217215
if (EDPftvarcon_inst%evergreen(currentCohort%pft) /= 1)then
218216
currentCohort%laimemory = currentCohort%laimemory*(1.0_r8 - EDPftvarcon_inst%trim_inc(currentCohort%pft))
@@ -689,9 +687,9 @@ subroutine seeds_in( currentSite, cp_pnt )
689687
if (external_recruitment == 1) then !external seed rain - needed to prevent extinction
690688
do p = 1,numpft
691689
currentPatch%seeds_in(p) = currentPatch%seeds_in(p) + &
692-
EDecophyscon%seed_rain(p) !KgC/m2/year
690+
EDPftvarcon_inst%seed_rain(p) !KgC/m2/year
693691
currentSite%seed_rain_flux(p) = currentSite%seed_rain_flux(p) + &
694-
EDecophyscon%seed_rain(p) * currentPatch%area/AREA !KgC/m2/year
692+
EDPftvarcon_inst%seed_rain(p) * currentPatch%area/AREA !KgC/m2/year
695693
enddo
696694
endif
697695
currentPatch => currentPatch%younger
@@ -827,7 +825,7 @@ subroutine Growth_Derivatives( currentSite, currentCohort, bc_in)
827825
! Maintenance demands
828826
if (EDPftvarcon_inst%evergreen(currentCohort%pft) == 1)then !grass and EBT
829827
currentCohort%leaf_md = currentCohort%bl / EDPftvarcon_inst%leaf_long(currentCohort%pft)
830-
currentCohort%root_md = currentCohort%br / EDecophyscon%root_long(currentCohort%pft)
828+
currentCohort%root_md = currentCohort%br / EDPftvarcon_inst%root_long(currentCohort%pft)
831829
currentCohort%md = currentCohort%root_md + currentCohort%leaf_md
832830
endif
833831

@@ -837,13 +835,13 @@ subroutine Growth_Derivatives( currentSite, currentCohort, bc_in)
837835
!are still in an expansion phase.
838836

839837
if (EDPftvarcon_inst%season_decid(currentCohort%pft) == 1)then
840-
currentCohort%root_md = currentCohort%br /EDecophyscon%root_long(currentCohort%pft)
838+
currentCohort%root_md = currentCohort%br /EDPftvarcon_inst%root_long(currentCohort%pft)
841839
currentCohort%leaf_md = 0._r8
842840
currentCohort%md = currentCohort%root_md + currentCohort%leaf_md
843841
endif
844842

845843
if (EDPftvarcon_inst%stress_decid(currentCohort%pft) == 1)then
846-
currentCohort%root_md = currentCohort%br /EDecophyscon%root_long(currentCohort%pft)
844+
currentCohort%root_md = currentCohort%br /EDPftvarcon_inst%root_long(currentCohort%pft)
847845
currentCohort%leaf_md = 0._r8
848846
currentCohort%md = currentCohort%root_md + currentCohort%leaf_md
849847
endif
@@ -865,17 +863,17 @@ subroutine Growth_Derivatives( currentSite, currentCohort, bc_in)
865863
! this is the fraction of maintenance demand we -have- to do...
866864

867865
if ( DEBUG ) write(fates_log(),*) 'EDphys 760 ',currentCohort%npp_acc_hold, currentCohort%md, &
868-
EDecophyscon%leaf_stor_priority(currentCohort%pft)
866+
EDPftvarcon_inst%leaf_stor_priority(currentCohort%pft)
869867

870868
currentCohort%carbon_balance = currentCohort%npp_acc_hold - &
871-
currentCohort%md * EDecophyscon%leaf_stor_priority(currentCohort%pft)
869+
currentCohort%md * EDPftvarcon_inst%leaf_stor_priority(currentCohort%pft)
872870

873871
! Allowing only carbon from NPP pool to account for npp flux into the maintenance turnover pools
874872
! ie this does not include any use of storage carbon or balive to make up for missing carbon balance in the transfer
875873
currentCohort%npp_leaf = max(0.0_r8,min(currentCohort%npp_acc_hold*currentCohort%leaf_md/currentCohort%md, &
876-
currentCohort%leaf_md*EDecophyscon%leaf_stor_priority(currentCohort%pft)))
874+
currentCohort%leaf_md*EDPftvarcon_inst%leaf_stor_priority(currentCohort%pft)))
877875
currentCohort%npp_froot = max(0.0_r8,min(currentCohort%npp_acc_hold*currentCohort%root_md/currentCohort%md, &
878-
currentCohort%root_md*EDecophyscon%leaf_stor_priority(currentCohort%pft)))
876+
currentCohort%root_md*EDPftvarcon_inst%leaf_stor_priority(currentCohort%pft)))
879877

880878
if (Bleaf(currentCohort) > 0._r8)then
881879

@@ -884,7 +882,7 @@ subroutine Growth_Derivatives( currentSite, currentCohort, bc_in)
884882
if (currentCohort%carbon_balance > 0._r8)then !spend C on growing and storing
885883

886884
!what fraction of the target storage do we have?
887-
frac = max(0.0_r8,currentCohort%bstore/(Bleaf(currentCohort) * EDecophyscon%cushion(currentCohort%pft)))
885+
frac = max(0.0_r8,currentCohort%bstore/(Bleaf(currentCohort) * EDPftvarcon_inst%cushion(currentCohort%pft)))
888886
! FIX(SPM,080514,fstore never used )
889887
f_store = max(exp(-1.*frac**4._r8) - exp( -1.0_r8 ),0.0_r8)
890888
!what fraction of allocation do we divert to storage?
@@ -916,14 +914,14 @@ subroutine Growth_Derivatives( currentSite, currentCohort, bc_in)
916914

917915
!Do we have enough carbon left over to make up the rest of the turnover demand?
918916
balive_loss = 0._r8
919-
if (currentCohort%carbon_balance > currentCohort%md*(1.0_r8- EDecophyscon%leaf_stor_priority(currentCohort%pft)))then ! Yes...
917+
if (currentCohort%carbon_balance > currentCohort%md*(1.0_r8- EDPftvarcon_inst%leaf_stor_priority(currentCohort%pft)))then ! Yes...
920918
currentCohort%carbon_balance = currentCohort%carbon_balance - currentCohort%md * (1.0_r8 - &
921-
EDecophyscon%leaf_stor_priority(currentCohort%pft))
919+
EDPftvarcon_inst%leaf_stor_priority(currentCohort%pft))
922920

923921
currentCohort%npp_leaf = currentCohort%npp_leaf + &
924-
currentCohort%leaf_md * (1.0_r8-EDecophyscon%leaf_stor_priority(currentCohort%pft))
922+
currentCohort%leaf_md * (1.0_r8-EDPftvarcon_inst%leaf_stor_priority(currentCohort%pft))
925923
currentCohort%npp_froot = currentCohort%npp_froot + &
926-
currentCohort%root_md * (1.0_r8-EDecophyscon%leaf_stor_priority(currentCohort%pft))
924+
currentCohort%root_md * (1.0_r8-EDPftvarcon_inst%leaf_stor_priority(currentCohort%pft))
927925

928926
else ! we can't maintain constant leaf area and root area. Balive is reduced
929927

@@ -932,7 +930,7 @@ subroutine Growth_Derivatives( currentSite, currentCohort, bc_in)
932930
currentCohort%npp_froot = currentCohort%npp_froot + &
933931
max(0.0_r8,currentCohort%carbon_balance*(currentCohort%root_md/currentCohort%md))
934932

935-
balive_loss = currentCohort%md *(1.0_r8- EDecophyscon%leaf_stor_priority(currentCohort%pft))- currentCohort%carbon_balance
933+
balive_loss = currentCohort%md *(1.0_r8- EDPftvarcon_inst%leaf_stor_priority(currentCohort%pft))- currentCohort%carbon_balance
936934
currentCohort%carbon_balance = 0._r8
937935
endif
938936

@@ -944,20 +942,20 @@ subroutine Growth_Derivatives( currentSite, currentCohort, bc_in)
944942
!only if carbon balance is +ve
945943
if ((currentCohort%balive >= target_balive).AND.(currentCohort%carbon_balance > 0._r8))then
946944
! fraction of carbon going into active vs structural carbon
947-
if (currentCohort%dbh <= EDecophyscon%max_dbh(currentCohort%pft))then ! cap on leaf biomass
945+
if (currentCohort%dbh <= EDPftvarcon_inst%max_dbh(currentCohort%pft))then ! cap on leaf biomass
948946
dbldbd = dDbhdBd(currentCohort)/dDbhdBl(currentCohort)
949947
dbrdbd = EDPftvarcon_inst%allom_l2fr(currentCohort%pft) * dbldbd
950948
dhdbd_fn = dhdbd(currentCohort)
951949
dbswdbd = EDpftvarcon_inst%allom_latosa_int(currentCohort%pft) * (h*dbldbd + currentCohort%bl*dhdbd_fn)
952950
u = 1.0_r8 / (dbldbd + dbrdbd + dbswdbd)
953951
va = 1.0_r8 / (1.0_r8 + u)
954952
vs = u / (1.0_r8 + u)
955-
gr_fract = 1.0_r8 - EDecophyscon%seed_alloc(currentCohort%pft)
953+
gr_fract = 1.0_r8 - EDPftvarcon_inst%seed_alloc(currentCohort%pft)
956954
else
957955
dbldbd = 0._r8; dbrdbd = 0._r8 ;dbswdbd = 0._r8
958956
va = 0.0_r8
959957
vs = 1.0_r8
960-
gr_fract = 1.0_r8 - (EDecophyscon%seed_alloc(currentCohort%pft) + EDecophyscon%clone_alloc(currentCohort%pft))
958+
gr_fract = 1.0_r8 - (EDPftvarcon_inst%seed_alloc(currentCohort%pft) + EDPftvarcon_inst%clone_alloc(currentCohort%pft))
961959
endif
962960

963961
!FIX(RF,032414) - to fix high bl's. needed to prevent numerical errors without the ODEINT.
@@ -987,7 +985,7 @@ subroutine Growth_Derivatives( currentSite, currentCohort, bc_in)
987985
write(fates_log(),*) 'cohort fluxes',currentCohort%pft,currentCohort%canopy_layer,currentCohort%n, &
988986
currentCohort%npp_acc_hold,currentCohort%dbalivedt,balive_loss, &
989987
currentCohort%dbdeaddt,currentCohort%dbstoredt,currentCohort%seed_prod,currentCohort%md * &
990-
EDecophyscon%leaf_stor_priority(currentCohort%pft)
988+
EDPftvarcon_inst%leaf_stor_priority(currentCohort%pft)
991989
write(fates_log(),*) 'proxies' ,target_balive,currentCohort%balive,currentCohort%dbh,va,vs,gr_fract
992990
endif
993991

@@ -1042,12 +1040,12 @@ subroutine recruitment( t, currentSite, currentPatch, bc_in )
10421040

10431041
temp_cohort%canopy_trim = 0.8_r8 !starting with the canopy not fully expanded
10441042
temp_cohort%pft = ft
1045-
temp_cohort%hite = EDecophyscon%hgt_min(ft)
1043+
temp_cohort%hite = EDPftvarcon_inst%hgt_min(ft)
10461044
temp_cohort%dbh = Dbh(temp_cohort)
10471045
temp_cohort%bdead = Bdead(temp_cohort)
10481046
temp_cohort%balive = Bleaf(temp_cohort)*(1.0_r8 + EDPftvarcon_inst%allom_l2fr(ft) &
10491047
+ EDpftvarcon_inst%allom_latosa_int(ft)*temp_cohort%hite)
1050-
temp_cohort%bstore = EDecophyscon%cushion(ft)*(temp_cohort%balive/ (1.0_r8 + EDPftvarcon_inst%allom_l2fr(ft) &
1048+
temp_cohort%bstore = EDPftvarcon_inst%cushion(ft)*(temp_cohort%balive/ (1.0_r8 + EDPftvarcon_inst%allom_l2fr(ft) &
10511049
+ EDpftvarcon_inst%allom_latosa_int(ft)*temp_cohort%hite))
10521050
temp_cohort%n = currentPatch%area * currentPatch%seed_germination(ft)*hlm_freq_day &
10531051
/ (temp_cohort%bdead+temp_cohort%balive+temp_cohort%bstore)

biogeophys/FatesPlantHydraulicsMod.F90

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ module FatesPlantHydraulicsMod
2424
use FatesInterfaceMod , only : bc_out_type
2525
use FatesInterfaceMod , only : hlm_numlevsoil
2626

27-
use EDEcophysconType, only : EDecophyscon
28-
2927
use FatesHydraulicsMemMod, only: ed_site_hydr_type
3028
use FatesHydraulicsMemMod, only: ed_patch_hydr_type
3129
use FatesHydraulicsMemMod, only: ed_cohort_hydr_type
@@ -42,6 +40,8 @@ module FatesPlantHydraulicsMod
4240
use FatesHydraulicsMemMod, only: porous_media
4341
use FatesHydraulicsMemMod, only: nlevsoi_hyd
4442

43+
use EDPftvarcon, only : EDPftvarcon_inst
44+
4545
! CIME Globals
4646
use shr_log_mod , only : errMsg => shr_log_errMsg
4747
use shr_infnan_mod , only : isnan => shr_infnan_isnan
@@ -125,7 +125,6 @@ subroutine initTreeHydStates(cc_p, bc_in)
125125
! !DESCRIPTION:
126126
!
127127
! !USES:
128-
use EDEcophysConType , only : EDecophyscon
129128

130129
! !ARGUMENTS:
131130
type(ed_cohort_type), intent(inout), target :: cc_p ! current cohort pointer
@@ -146,7 +145,6 @@ subroutine updateSizeDepTreeHydProps(cc_p,bc_in)
146145
!
147146
! !USES:
148147
use FatesConstantsMod , only : pi_const
149-
use EDEcophysConType , only : EDecophyscon
150148
use shr_sys_mod , only : shr_sys_abort
151149
!
152150
! !ARGUMENTS:

0 commit comments

Comments
 (0)