Skip to content

Commit

Permalink
Bug fix for izumi nag tests to pass
Browse files Browse the repository at this point in the history
  • Loading branch information
slevis-lmwg committed Jan 7, 2025
1 parent 6cf9dde commit 1c81c98
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/biogeochem/CNFUNMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -169,17 +169,17 @@ subroutine readParams ( ncid )
if ( .not. readv ) call endrun( msg=trim(errCode)//trim(tString)//errMsg(sourcefile, __LINE__))
params_inst%ndays_off=tempr

allocate(params_inst%nfix_tmin(mxpft))
allocate(params_inst%nfix_tmin(0:mxpft))
tString='nfix_tmin'
call ncd_io(trim(tString), params_inst%nfix_tmin(:), 'read', ncid, readvar=readv)
if ( .not. readv ) call endrun(msg=trim(errCode)//trim(tString)//errMsg(sourcefile, __LINE__))

allocate(params_inst%nfix_topt(mxpft))
allocate(params_inst%nfix_topt(0:mxpft))
tString='nfix_topt'
call ncd_io(trim(tString), params_inst%nfix_topt(:), 'read', ncid, readvar=readv)
if ( .not. readv ) call endrun(msg=trim(errCode)//trim(tString)//errMsg(sourcefile, __LINE__))

allocate(params_inst%nfix_tmax(mxpft))
allocate(params_inst%nfix_tmax(0:mxpft))
tString='nfix_tmax'
call ncd_io(trim(tString), params_inst%nfix_tmax(:), 'read', ncid, readvar=readv)
if ( .not. readv ) call endrun(msg=trim(errCode)//trim(tString)//errMsg(sourcefile, __LINE__))
Expand Down Expand Up @@ -535,7 +535,7 @@ subroutine CNFUN(bounds,num_soilc, filter_soilc,num_soilp&
real(r8) :: total_N_resistance ! C to of N for whole soil -leaf
! pathway
real(r8) :: free_RT_frac=0.0_r8 !fraction of N retranslocation which is automatic/free.
! SHould be made into a PFT parameter.
! Should be made into a PFT parameter.

real(r8) :: paid_for_n_retrans
real(r8) :: free_n_retrans
Expand Down Expand Up @@ -1136,13 +1136,13 @@ subroutine CNFUN(bounds,num_soilc, filter_soilc,num_soilp&

select case (nfix_method)
case ('Houlton')
costNit(j,icostFix) = fun_cost_fix(fixer,&
a_fix(ivt(p)),b_fix(ivt(p)),c_fix(ivt(p)),&
big_cost,crootfr(p,j),s_fix(ivt(p)),tc_soisno(c,j))
costNit(j,icostFix) = fun_cost_fix(fixer, &
a_fix(ivt(p)), b_fix(ivt(p)), c_fix(ivt(p)), &
big_cost, crootfr(p,j), s_fix(ivt(p)), tc_soisno(c,j))
case ('Bytnerowicz') ! no acclimation calculation
costNit(j,icostFix) = fun_cost_fix_Bytnerowicz_noAcc(fixer, &
params_inst%nfix_tmin(ivt(p)), params_inst%nfix_topt(ivt(p)), params_inst%nfix_tmax(ivt(p)), &
big_cost,crootfr(p,j),s_fix(ivt(p)),tc_soisno(c,j))
costNit(j,icostFix) = fun_cost_fix_Bytnerowicz_noAcc(fixer, &
params_inst%nfix_tmin(ivt(p)), params_inst%nfix_topt(ivt(p)), params_inst%nfix_tmax(ivt(p)), &
big_cost,crootfr(p,j), s_fix(ivt(p)), tc_soisno(c,j))
case default
errCode = ' ERROR: unknown nfix_method value: ' // nfix_method
call endrun( msg=trim(errCode) // errMsg(sourcefile, __LINE__))
Expand Down

0 comments on commit 1c81c98

Please sign in to comment.