Skip to content

Commit

Permalink
Merge pull request #10 from rgknox/mpaiao-pr-allom-modes-eca
Browse files Browse the repository at this point in the history
protections metadata on eca phosphatase
  • Loading branch information
mpaiao authored Feb 6, 2024
2 parents c644186 + e35f44c commit 37db010
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 7 deletions.
24 changes: 22 additions & 2 deletions main/EDPftvarcon.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1845,7 +1845,6 @@ subroutine FatesCheckParams(is_master)
call endrun(msg=errMsg(sourcefile, __LINE__))
end if
end if

end if
end if

Expand All @@ -1871,7 +1870,25 @@ subroutine FatesCheckParams(is_master)
call endrun(msg=errMsg(sourcefile, __LINE__))
end if
end if


! We are using a simple phosphatase model right now. There is
! no critical value (lambda) , and there is no preferential uptake (alpha).
! Make sure these parameters are both set to 0.

if ((hlm_phosphorus_spec>0) .and. (trim(hlm_nu_com).eq.'ECA')) then
if (any(abs(EDPftvarcon_inst%eca_lambda_ptase(:)) > nearzero ) ) then
write(fates_log(),*) 'Critical Values for phosphatase in ECA are not'
write(fates_log(),*) 'enabled right now. Please set fates_eca_lambda_ptase = 0'
write(fates_log(),*) ' Aborting'
call endrun(msg=errMsg(sourcefile, __LINE__))
end if
if (any(abs(EDPftvarcon_inst%eca_alpha_ptase(:)) > nearzero ) ) then
write(fates_log(),*) 'There is no preferential plant uptake of P from phosphatase'
write(fates_log(),*) 'enabled right now. Please set fates_eca_alpha_ptase = 0'
write(fates_log(),*) ' Aborting'
call endrun(msg=errMsg(sourcefile, __LINE__))
end if
end if

case (prt_carbon_allom_hyp)
! No additional checks needed for now.
Expand Down Expand Up @@ -1915,6 +1932,9 @@ subroutine FatesCheckParams(is_master)
end if
end if




do ipft = 1,npft

! xl must be between -0.4 and 0.6 according to Bonan (2019) doi:10.1017/9781107339217 pg. 238
Expand Down
20 changes: 20 additions & 0 deletions parameter_files/archive/api33.0.0_020524_patch_params.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,25 @@
<ln>Parameter 2 for h2cd allometry (log-slope or exponent). If allom_dmode=1; this is not needed (as exponent is assumed 1)</ln>
<val>1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1</val>
</mod>
<mod type="variable_del">
<na>fates_cnp_eca_alpha_ptase</na>
</mod>
<mod type="variable_del">
<na>fates_cnp_eca_lambda_ptase</na>
</mod>
<mod type="variable_add">
<na>fates_cnp_eca_alpha_ptase</na>
<di>fates_pft</di>
<un>g/m3</un>
<ln>(INACTIVE, KEEP AT 0) fraction of P from ptase activity sent directly to plant (ECA)</ln>
<val>0,0,0,0,0,0,0,0,0,0,0,0</val>
</mod>
<mod type="variable_add">
<na>fates_cnp_eca_lambda_ptase</na>
<di>fates_pft</di>
<un>g/m3</un>
<ln>(INACTIVE, KEEP AT 0) critical value for biochemical production (ECA)</ln>
<val>0,0,0,0,0,0,0,0,0,0,0,0</val>
</mod>
</mods>
</all>
9 changes: 4 additions & 5 deletions parameter_files/fates_params_default.cdl
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ variables:
fates_c2b:long_name = "Carbon to biomass multiplier of bulk structural tissues" ;
double fates_cnp_eca_alpha_ptase(fates_pft) ;
fates_cnp_eca_alpha_ptase:units = "g/m3" ;
fates_cnp_eca_alpha_ptase:long_name = "fraction of P from ptase activity sent directly to plant (ECA)" ;
fates_cnp_eca_alpha_ptase:long_name = "(INACTIVE, KEEP AT 0) fraction of P from ptase activity sent directly to plant (ECA)" ;
double fates_cnp_eca_decompmicc(fates_pft) ;
fates_cnp_eca_decompmicc:units = "gC/m3" ;
fates_cnp_eca_decompmicc:long_name = "maximum soil microbial decomposer biomass found over depth (will be applied at a reference depth w/ exponential attenuation) (ECA)" ;
Expand All @@ -197,7 +197,7 @@ variables:
fates_cnp_eca_km_ptase:long_name = "half-saturation constant for biochemical P (ECA)" ;
double fates_cnp_eca_lambda_ptase(fates_pft) ;
fates_cnp_eca_lambda_ptase:units = "g/m3" ;
fates_cnp_eca_lambda_ptase:long_name = "critical value for biochemical production (ECA)" ;
fates_cnp_eca_lambda_ptase:long_name = "(INACTIVE, KEEP AT 0) critical value for biochemical production (ECA)" ;
double fates_cnp_eca_vmax_ptase(fates_pft) ;
fates_cnp_eca_vmax_ptase:units = "gP/m2/s" ;
fates_cnp_eca_vmax_ptase:long_name = "maximum production rate for biochemical P (per m2) (ECA)" ;
Expand Down Expand Up @@ -1062,8 +1062,7 @@ data:

fates_c2b = 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ;

fates_cnp_eca_alpha_ptase = 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5,
0.5, 0.5, 0.5 ;
fates_cnp_eca_alpha_ptase = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ;

fates_cnp_eca_decompmicc = 280, 280, 280, 280, 280, 280, 280, 280, 280, 280,
280, 280 ;
Expand All @@ -1079,7 +1078,7 @@ data:

fates_cnp_eca_km_ptase = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ;

fates_cnp_eca_lambda_ptase = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ;
fates_cnp_eca_lambda_ptase = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ;

fates_cnp_eca_vmax_ptase = 5e-09, 5e-09, 5e-09, 5e-09, 5e-09, 5e-09, 5e-09,
5e-09, 5e-09, 5e-09, 5e-09, 5e-09 ;
Expand Down

0 comments on commit 37db010

Please sign in to comment.