Skip to content

Commit

Permalink
added xdaily back to getrow_statstable
Browse files Browse the repository at this point in the history
  • Loading branch information
stineb committed Nov 30, 2018
1 parent 67ed550 commit 1e0ab04
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion R/eval_sofun.R
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ eval_sofun <- function( mod, settings_eval, settings_sims, obs_eval = NA, overwr
right_join( ddf, by = c("sitename", "date"))

## metrics for daily and x-daily values, all sites pooled
metrics$gpp$fluxnet2015$daily_pooled <- with( ddf, get_stats( gpp_mod, gpp_obs ) )
metrics$gpp$fluxnet2015$daily_pooled <- with( ddf, get_stats( gpp_mod, gpp_obs ) )
metrics$gpp$fluxnet2015$xdaily_pooled <- with( xdf, get_stats( gpp_mod, gpp_obs ) )

##------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion R/getrow_statstable.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ getrow_statstable <- function( out_eval, stat ){
addrow <- tibble( spatial = out_eval$metrics$gpp$fluxnet2015$spatial[[ stat ]],
annual = out_eval$metrics$gpp$fluxnet2015$annual_pooled[[ stat ]],
monthly = out_eval$metrics$gpp$fluxnet2015$monthly_pooled[[ stat ]],
# xdaily = out_eval$metrics$gpp$fluxnet2015$xdaily_pooled[[ stat ]],
xdaily = out_eval$metrics$gpp$fluxnet2015$xdaily_pooled[[ stat ]],
daily = out_eval$metrics$gpp$fluxnet2015$daily_pooled[[ stat ]],
seasonal = out_eval$metrics$gpp$fluxnet2015$meandoy[[ stat ]],
# seasonal_xdaily = out_eval$metrics$gpp$fluxnet2015$meanxoy[[ stat ]],
Expand Down
6 changes: 3 additions & 3 deletions R/rpmodel.R
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ rpmodel <- function( tc, vpd, co2, elv, kphio, fapar = NA, ppfd = NA, method="fu
## 'do_ftemp_kphio' is not actually a stress function, but is the temperature-dependency of
## the quantum yield efficiency after Bernacchi et al., 2003 PCE
if (do_ftemp_kphio){
ftemp_kphio <- calc_ftemp_kphio( dtemp )
ftemp_kphio <- calc_ftemp_kphio( tc )
} else {
ftemp_kphio <- 1.0
}
Expand Down Expand Up @@ -698,13 +698,13 @@ calc_viscosity_h2o_vogel <- function( tc ) {
return( visc )
}

calc_ftemp_kphio <- function( dtemp ){
calc_ftemp_kphio <- function( tc ){
#////////////////////////////////////////////////////////////////
# Calculates the instantaneous temperature response of the quantum
# yield efficiency based on Bernacchi et al., 2003 PCE (Equation
# and parameter values taken from Appendix B)
#----------------------------------------------------------------
ftemp <- 0.352 + 0.022 * dtemp - 3.4e-4 * dtemp^2
ftemp <- 0.352 + 0.022 * tc - 3.4e-4 * tc^2

return(ftemp)
}
Expand Down

0 comments on commit 1e0ab04

Please sign in to comment.