// Generated by using Rcpp::compileAttributes() -> do not edit by hand
// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#include "../inst/include/medfate.h"
#include <RcppArmadillo.h>
#include <Rcpp.h>
#include <string>
#include <set>

using namespace Rcpp;

#ifdef RCPP_USE_GLOBAL_ROSTREAM
Rcpp::Rostream<true>&  Rcpp::Rcout = Rcpp::Rcpp_cout_get();
Rcpp::Rostream<false>& Rcpp::Rcerr = Rcpp::Rcpp_cerr_get();
#endif

// nswbInput
List nswbInput(String land_cover_type, double snowpack);
static SEXP _medfate_nswbInput_try(SEXP land_cover_typeSEXP, SEXP snowpackSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< String >::type land_cover_type(land_cover_typeSEXP);
    Rcpp::traits::input_parameter< double >::type snowpack(snowpackSEXP);
    rcpp_result_gen = Rcpp::wrap(nswbInput(land_cover_type, snowpack));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_nswbInput(SEXP land_cover_typeSEXP, SEXP snowpackSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_nswbInput_try(land_cover_typeSEXP, snowpackSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// aspwbInput
List aspwbInput(double crop_factor, List control, DataFrame soil);
static SEXP _medfate_aspwbInput_try(SEXP crop_factorSEXP, SEXP controlSEXP, SEXP soilSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< double >::type crop_factor(crop_factorSEXP);
    Rcpp::traits::input_parameter< List >::type control(controlSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type soil(soilSEXP);
    rcpp_result_gen = Rcpp::wrap(aspwbInput(crop_factor, control, soil));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_aspwbInput(SEXP crop_factorSEXP, SEXP controlSEXP, SEXP soilSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_aspwbInput_try(crop_factorSEXP, controlSEXP, soilSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// defineASPWBDailyOutput
List defineASPWBDailyOutput(double latitude, double elevation, double slope, double aspect, CharacterVector dateStrings, List x);
static SEXP _medfate_defineASPWBDailyOutput_try(SEXP latitudeSEXP, SEXP elevationSEXP, SEXP slopeSEXP, SEXP aspectSEXP, SEXP dateStringsSEXP, SEXP xSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< double >::type latitude(latitudeSEXP);
    Rcpp::traits::input_parameter< double >::type elevation(elevationSEXP);
    Rcpp::traits::input_parameter< double >::type slope(slopeSEXP);
    Rcpp::traits::input_parameter< double >::type aspect(aspectSEXP);
    Rcpp::traits::input_parameter< CharacterVector >::type dateStrings(dateStringsSEXP);
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    rcpp_result_gen = Rcpp::wrap(defineASPWBDailyOutput(latitude, elevation, slope, aspect, dateStrings, x));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_defineASPWBDailyOutput(SEXP latitudeSEXP, SEXP elevationSEXP, SEXP slopeSEXP, SEXP aspectSEXP, SEXP dateStringsSEXP, SEXP xSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_defineASPWBDailyOutput_try(latitudeSEXP, elevationSEXP, slopeSEXP, aspectSEXP, dateStringsSEXP, xSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// fillASPWBDailyOutput
void fillASPWBDailyOutput(List l, List x, List sDay, int iday);
static SEXP _medfate_fillASPWBDailyOutput_try(SEXP lSEXP, SEXP xSEXP, SEXP sDaySEXP, SEXP idaySEXP) {
BEGIN_RCPP
    Rcpp::traits::input_parameter< List >::type l(lSEXP);
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< List >::type sDay(sDaySEXP);
    Rcpp::traits::input_parameter< int >::type iday(idaySEXP);
    fillASPWBDailyOutput(l, x, sDay, iday);
    return R_NilValue;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_fillASPWBDailyOutput(SEXP lSEXP, SEXP xSEXP, SEXP sDaySEXP, SEXP idaySEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_fillASPWBDailyOutput_try(lSEXP, xSEXP, sDaySEXP, idaySEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// aspwb
List aspwb(List x, DataFrame meteo, double latitude, double elevation, double slope, double aspect, double waterTableDepth);
static SEXP _medfate_aspwb_try(SEXP xSEXP, SEXP meteoSEXP, SEXP latitudeSEXP, SEXP elevationSEXP, SEXP slopeSEXP, SEXP aspectSEXP, SEXP waterTableDepthSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type meteo(meteoSEXP);
    Rcpp::traits::input_parameter< double >::type latitude(latitudeSEXP);
    Rcpp::traits::input_parameter< double >::type elevation(elevationSEXP);
    Rcpp::traits::input_parameter< double >::type slope(slopeSEXP);
    Rcpp::traits::input_parameter< double >::type aspect(aspectSEXP);
    Rcpp::traits::input_parameter< double >::type waterTableDepth(waterTableDepthSEXP);
    rcpp_result_gen = Rcpp::wrap(aspwb(x, meteo, latitude, elevation, slope, aspect, waterTableDepth));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_aspwb(SEXP xSEXP, SEXP meteoSEXP, SEXP latitudeSEXP, SEXP elevationSEXP, SEXP slopeSEXP, SEXP aspectSEXP, SEXP waterTableDepthSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_aspwb_try(xSEXP, meteoSEXP, latitudeSEXP, elevationSEXP, slopeSEXP, aspectSEXP, waterTableDepthSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// radiationDiurnalPattern_c
double radiationDiurnalPattern_c(double t, double daylength);
RcppExport SEXP _medfate_radiationDiurnalPattern_c(SEXP tSEXP, SEXP daylengthSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type t(tSEXP);
    Rcpp::traits::input_parameter< double >::type daylength(daylengthSEXP);
    rcpp_result_gen = Rcpp::wrap(radiationDiurnalPattern_c(t, daylength));
    return rcpp_result_gen;
END_RCPP
}
// temperatureDiurnalPattern_c
double temperatureDiurnalPattern_c(double t, double tmin, double tmax, double tminPrev, double tmaxPrev, double tminNext, double daylength);
RcppExport SEXP _medfate_temperatureDiurnalPattern_c(SEXP tSEXP, SEXP tminSEXP, SEXP tmaxSEXP, SEXP tminPrevSEXP, SEXP tmaxPrevSEXP, SEXP tminNextSEXP, SEXP daylengthSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type t(tSEXP);
    Rcpp::traits::input_parameter< double >::type tmin(tminSEXP);
    Rcpp::traits::input_parameter< double >::type tmax(tmaxSEXP);
    Rcpp::traits::input_parameter< double >::type tminPrev(tminPrevSEXP);
    Rcpp::traits::input_parameter< double >::type tmaxPrev(tmaxPrevSEXP);
    Rcpp::traits::input_parameter< double >::type tminNext(tminNextSEXP);
    Rcpp::traits::input_parameter< double >::type daylength(daylengthSEXP);
    rcpp_result_gen = Rcpp::wrap(temperatureDiurnalPattern_c(t, tmin, tmax, tminPrev, tmaxPrev, tminNext, daylength));
    return rcpp_result_gen;
END_RCPP
}
// leafTemperature_c
double leafTemperature_c(double absRad, double airTemperature, double u, double E, double leafWidth);
RcppExport SEXP _medfate_leafTemperature_c(SEXP absRadSEXP, SEXP airTemperatureSEXP, SEXP uSEXP, SEXP ESEXP, SEXP leafWidthSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type absRad(absRadSEXP);
    Rcpp::traits::input_parameter< double >::type airTemperature(airTemperatureSEXP);
    Rcpp::traits::input_parameter< double >::type u(uSEXP);
    Rcpp::traits::input_parameter< double >::type E(ESEXP);
    Rcpp::traits::input_parameter< double >::type leafWidth(leafWidthSEXP);
    rcpp_result_gen = Rcpp::wrap(leafTemperature_c(absRad, airTemperature, u, E, leafWidth));
    return rcpp_result_gen;
END_RCPP
}
// leafTemperature2_c
double leafTemperature2_c(double SWRabs, double LWRnet, double airTemperature, double u, double E, double leafWidth);
RcppExport SEXP _medfate_leafTemperature2_c(SEXP SWRabsSEXP, SEXP LWRnetSEXP, SEXP airTemperatureSEXP, SEXP uSEXP, SEXP ESEXP, SEXP leafWidthSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type SWRabs(SWRabsSEXP);
    Rcpp::traits::input_parameter< double >::type LWRnet(LWRnetSEXP);
    Rcpp::traits::input_parameter< double >::type airTemperature(airTemperatureSEXP);
    Rcpp::traits::input_parameter< double >::type u(uSEXP);
    Rcpp::traits::input_parameter< double >::type E(ESEXP);
    Rcpp::traits::input_parameter< double >::type leafWidth(leafWidthSEXP);
    rcpp_result_gen = Rcpp::wrap(leafTemperature2_c(SWRabs, LWRnet, airTemperature, u, E, leafWidth));
    return rcpp_result_gen;
END_RCPP
}
// leafVapourPressure_c
double leafVapourPressure_c(double leafTemp, double leafPsi);
RcppExport SEXP _medfate_leafVapourPressure_c(SEXP leafTempSEXP, SEXP leafPsiSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type leafTemp(leafTempSEXP);
    Rcpp::traits::input_parameter< double >::type leafPsi(leafPsiSEXP);
    rcpp_result_gen = Rcpp::wrap(leafVapourPressure_c(leafTemp, leafPsi));
    return rcpp_result_gen;
END_RCPP
}
// irradianceToPhotonFlux_c
double irradianceToPhotonFlux_c(double I, double lambda);
RcppExport SEXP _medfate_irradianceToPhotonFlux_c(SEXP ISEXP, SEXP lambdaSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type I(ISEXP);
    Rcpp::traits::input_parameter< double >::type lambda(lambdaSEXP);
    rcpp_result_gen = Rcpp::wrap(irradianceToPhotonFlux_c(I, lambda));
    return rcpp_result_gen;
END_RCPP
}
// waterDynamicViscosity_c
double waterDynamicViscosity_c(double temp);
RcppExport SEXP _medfate_waterDynamicViscosity_c(SEXP tempSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type temp(tempSEXP);
    rcpp_result_gen = Rcpp::wrap(waterDynamicViscosity_c(temp));
    return rcpp_result_gen;
END_RCPP
}
// belowgroundSapwoodStructuralBiomass
double belowgroundSapwoodStructuralBiomass(double SA, NumericVector L, NumericVector V, double woodDensity);
RcppExport SEXP _medfate_belowgroundSapwoodStructuralBiomass(SEXP SASEXP, SEXP LSEXP, SEXP VSEXP, SEXP woodDensitySEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type SA(SASEXP);
    Rcpp::traits::input_parameter< NumericVector >::type L(LSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type V(VSEXP);
    Rcpp::traits::input_parameter< double >::type woodDensity(woodDensitySEXP);
    rcpp_result_gen = Rcpp::wrap(belowgroundSapwoodStructuralBiomass(SA, L, V, woodDensity));
    return rcpp_result_gen;
END_RCPP
}
// sapwoodStructuralBiomass
double sapwoodStructuralBiomass(double SA, double H, NumericVector L, NumericVector V, double woodDensity);
RcppExport SEXP _medfate_sapwoodStructuralBiomass(SEXP SASEXP, SEXP HSEXP, SEXP LSEXP, SEXP VSEXP, SEXP woodDensitySEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type SA(SASEXP);
    Rcpp::traits::input_parameter< double >::type H(HSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type L(LSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type V(VSEXP);
    Rcpp::traits::input_parameter< double >::type woodDensity(woodDensitySEXP);
    rcpp_result_gen = Rcpp::wrap(sapwoodStructuralBiomass(SA, H, L, V, woodDensity));
    return rcpp_result_gen;
END_RCPP
}
// belowgroundHeartwoodStructuralBiomass
double belowgroundHeartwoodStructuralBiomass(double DBH, double SA, NumericVector L, NumericVector V, double woodDensity);
RcppExport SEXP _medfate_belowgroundHeartwoodStructuralBiomass(SEXP DBHSEXP, SEXP SASEXP, SEXP LSEXP, SEXP VSEXP, SEXP woodDensitySEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type DBH(DBHSEXP);
    Rcpp::traits::input_parameter< double >::type SA(SASEXP);
    Rcpp::traits::input_parameter< NumericVector >::type L(LSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type V(VSEXP);
    Rcpp::traits::input_parameter< double >::type woodDensity(woodDensitySEXP);
    rcpp_result_gen = Rcpp::wrap(belowgroundHeartwoodStructuralBiomass(DBH, SA, L, V, woodDensity));
    return rcpp_result_gen;
END_RCPP
}
// heartwoodStructuralBiomass
double heartwoodStructuralBiomass(double DBH, double SA, double H, NumericVector L, NumericVector V, double woodDensity);
RcppExport SEXP _medfate_heartwoodStructuralBiomass(SEXP DBHSEXP, SEXP SASEXP, SEXP HSEXP, SEXP LSEXP, SEXP VSEXP, SEXP woodDensitySEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type DBH(DBHSEXP);
    Rcpp::traits::input_parameter< double >::type SA(SASEXP);
    Rcpp::traits::input_parameter< double >::type H(HSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type L(LSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type V(VSEXP);
    Rcpp::traits::input_parameter< double >::type woodDensity(woodDensitySEXP);
    rcpp_result_gen = Rcpp::wrap(heartwoodStructuralBiomass(DBH, SA, H, L, V, woodDensity));
    return rcpp_result_gen;
END_RCPP
}
// sapwoodStarchCapacity
double sapwoodStarchCapacity(double SA, double H, NumericVector L, NumericVector V, double woodDensity, double conduit2sapwood);
RcppExport SEXP _medfate_sapwoodStarchCapacity(SEXP SASEXP, SEXP HSEXP, SEXP LSEXP, SEXP VSEXP, SEXP woodDensitySEXP, SEXP conduit2sapwoodSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type SA(SASEXP);
    Rcpp::traits::input_parameter< double >::type H(HSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type L(LSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type V(VSEXP);
    Rcpp::traits::input_parameter< double >::type woodDensity(woodDensitySEXP);
    Rcpp::traits::input_parameter< double >::type conduit2sapwood(conduit2sapwoodSEXP);
    rcpp_result_gen = Rcpp::wrap(sapwoodStarchCapacity(SA, H, L, V, woodDensity, conduit2sapwood));
    return rcpp_result_gen;
END_RCPP
}
// carbonCompartments
DataFrame carbonCompartments(List x, String biomassUnits);
RcppExport SEXP _medfate_carbonCompartments(SEXP xSEXP, SEXP biomassUnitsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< String >::type biomassUnits(biomassUnitsSEXP);
    rcpp_result_gen = Rcpp::wrap(carbonCompartments(x, biomassUnits));
    return rcpp_result_gen;
END_RCPP
}
// sugarStarchDynamicsLeaf_c
double sugarStarchDynamicsLeaf_c(double sugarConc, double starchConc, double eqSugarConc);
RcppExport SEXP _medfate_sugarStarchDynamicsLeaf_c(SEXP sugarConcSEXP, SEXP starchConcSEXP, SEXP eqSugarConcSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type sugarConc(sugarConcSEXP);
    Rcpp::traits::input_parameter< double >::type starchConc(starchConcSEXP);
    Rcpp::traits::input_parameter< double >::type eqSugarConc(eqSugarConcSEXP);
    rcpp_result_gen = Rcpp::wrap(sugarStarchDynamicsLeaf_c(sugarConc, starchConc, eqSugarConc));
    return rcpp_result_gen;
END_RCPP
}
// sugarStarchDynamicsStem_c
double sugarStarchDynamicsStem_c(double sugarConc, double starchConc, double eqSugarConc);
RcppExport SEXP _medfate_sugarStarchDynamicsStem_c(SEXP sugarConcSEXP, SEXP starchConcSEXP, SEXP eqSugarConcSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type sugarConc(sugarConcSEXP);
    Rcpp::traits::input_parameter< double >::type starchConc(starchConcSEXP);
    Rcpp::traits::input_parameter< double >::type eqSugarConc(eqSugarConcSEXP);
    rcpp_result_gen = Rcpp::wrap(sugarStarchDynamicsStem_c(sugarConc, starchConc, eqSugarConc));
    return rcpp_result_gen;
END_RCPP
}
// osmoticWaterPotential_c
double osmoticWaterPotential_c(double sugarConc, double temp, double nonSugarConc);
RcppExport SEXP _medfate_osmoticWaterPotential_c(SEXP sugarConcSEXP, SEXP tempSEXP, SEXP nonSugarConcSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type sugarConc(sugarConcSEXP);
    Rcpp::traits::input_parameter< double >::type temp(tempSEXP);
    Rcpp::traits::input_parameter< double >::type nonSugarConc(nonSugarConcSEXP);
    rcpp_result_gen = Rcpp::wrap(osmoticWaterPotential_c(sugarConc, temp, nonSugarConc));
    return rcpp_result_gen;
END_RCPP
}
// sugarConcentration_c
double sugarConcentration_c(double osmoticWP, double temp, double nonSugarConc);
RcppExport SEXP _medfate_sugarConcentration_c(SEXP osmoticWPSEXP, SEXP tempSEXP, SEXP nonSugarConcSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type osmoticWP(osmoticWPSEXP);
    Rcpp::traits::input_parameter< double >::type temp(tempSEXP);
    Rcpp::traits::input_parameter< double >::type nonSugarConc(nonSugarConcSEXP);
    rcpp_result_gen = Rcpp::wrap(sugarConcentration_c(osmoticWP, temp, nonSugarConc));
    return rcpp_result_gen;
END_RCPP
}
// relativeSapViscosity_c
double relativeSapViscosity_c(double sugarConc, double temp);
RcppExport SEXP _medfate_relativeSapViscosity_c(SEXP sugarConcSEXP, SEXP tempSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type sugarConc(sugarConcSEXP);
    Rcpp::traits::input_parameter< double >::type temp(tempSEXP);
    rcpp_result_gen = Rcpp::wrap(relativeSapViscosity_c(sugarConc, temp));
    return rcpp_result_gen;
END_RCPP
}
// leafStructuralBiomass_c
double leafStructuralBiomass_c(double LAI, double N, double SLA);
RcppExport SEXP _medfate_leafStructuralBiomass_c(SEXP LAISEXP, SEXP NSEXP, SEXP SLASEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type LAI(LAISEXP);
    Rcpp::traits::input_parameter< double >::type N(NSEXP);
    Rcpp::traits::input_parameter< double >::type SLA(SLASEXP);
    rcpp_result_gen = Rcpp::wrap(leafStructuralBiomass_c(LAI, N, SLA));
    return rcpp_result_gen;
END_RCPP
}
// twigStructuralBiomass_c
double twigStructuralBiomass_c(double LAI, double N, double SLA, double r635);
RcppExport SEXP _medfate_twigStructuralBiomass_c(SEXP LAISEXP, SEXP NSEXP, SEXP SLASEXP, SEXP r635SEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type LAI(LAISEXP);
    Rcpp::traits::input_parameter< double >::type N(NSEXP);
    Rcpp::traits::input_parameter< double >::type SLA(SLASEXP);
    Rcpp::traits::input_parameter< double >::type r635(r635SEXP);
    rcpp_result_gen = Rcpp::wrap(twigStructuralBiomass_c(LAI, N, SLA, r635));
    return rcpp_result_gen;
END_RCPP
}
// leafStarchCapacity_c
double leafStarchCapacity_c(double LAI, double N, double SLA, double leafDensity);
RcppExport SEXP _medfate_leafStarchCapacity_c(SEXP LAISEXP, SEXP NSEXP, SEXP SLASEXP, SEXP leafDensitySEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type LAI(LAISEXP);
    Rcpp::traits::input_parameter< double >::type N(NSEXP);
    Rcpp::traits::input_parameter< double >::type SLA(SLASEXP);
    Rcpp::traits::input_parameter< double >::type leafDensity(leafDensitySEXP);
    rcpp_result_gen = Rcpp::wrap(leafStarchCapacity_c(LAI, N, SLA, leafDensity));
    return rcpp_result_gen;
END_RCPP
}
// abovegroundSapwoodStructuralBiomass_c
double abovegroundSapwoodStructuralBiomass_c(double SA, double H, double woodDensity);
RcppExport SEXP _medfate_abovegroundSapwoodStructuralBiomass_c(SEXP SASEXP, SEXP HSEXP, SEXP woodDensitySEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type SA(SASEXP);
    Rcpp::traits::input_parameter< double >::type H(HSEXP);
    Rcpp::traits::input_parameter< double >::type woodDensity(woodDensitySEXP);
    rcpp_result_gen = Rcpp::wrap(abovegroundSapwoodStructuralBiomass_c(SA, H, woodDensity));
    return rcpp_result_gen;
END_RCPP
}
// abovegroundHeartwoodStructuralBiomass_c
double abovegroundHeartwoodStructuralBiomass_c(double DBH, double SA, double H, double woodDensity);
RcppExport SEXP _medfate_abovegroundHeartwoodStructuralBiomass_c(SEXP DBHSEXP, SEXP SASEXP, SEXP HSEXP, SEXP woodDensitySEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type DBH(DBHSEXP);
    Rcpp::traits::input_parameter< double >::type SA(SASEXP);
    Rcpp::traits::input_parameter< double >::type H(HSEXP);
    Rcpp::traits::input_parameter< double >::type woodDensity(woodDensitySEXP);
    rcpp_result_gen = Rcpp::wrap(abovegroundHeartwoodStructuralBiomass_c(DBH, SA, H, woodDensity));
    return rcpp_result_gen;
END_RCPP
}
// copyModelOutput
List copyModelOutput(List internalCommunication, List x, String model);
static SEXP _medfate_copyModelOutput_try(SEXP internalCommunicationSEXP, SEXP xSEXP, SEXP modelSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< List >::type internalCommunication(internalCommunicationSEXP);
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< String >::type model(modelSEXP);
    rcpp_result_gen = Rcpp::wrap(copyModelOutput(internalCommunication, x, model));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_copyModelOutput(SEXP internalCommunicationSEXP, SEXP xSEXP, SEXP modelSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_copyModelOutput_try(internalCommunicationSEXP, xSEXP, modelSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// testControlListToStructure
int testControlListToStructure(List x);
RcppExport SEXP _medfate_testControlListToStructure(SEXP xSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    rcpp_result_gen = Rcpp::wrap(testControlListToStructure(x));
    return rcpp_result_gen;
END_RCPP
}
// pHEffect
double pHEffect(double x, String pool);
RcppExport SEXP _medfate_pHEffect(SEXP xSEXP, SEXP poolSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type x(xSEXP);
    Rcpp::traits::input_parameter< String >::type pool(poolSEXP);
    rcpp_result_gen = Rcpp::wrap(pHEffect(x, pool));
    return rcpp_result_gen;
END_RCPP
}
// DAYCENTsnags
NumericVector DAYCENTsnags(DataFrame snags, NumericVector baseAnnualRates, DataFrame paramsLitterDecomposition, DataFrame paramsAnatomy, double airTemperature, double airRelativeHumidity, double tstep);
RcppExport SEXP _medfate_DAYCENTsnags(SEXP snagsSEXP, SEXP baseAnnualRatesSEXP, SEXP paramsLitterDecompositionSEXP, SEXP paramsAnatomySEXP, SEXP airTemperatureSEXP, SEXP airRelativeHumiditySEXP, SEXP tstepSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< DataFrame >::type snags(snagsSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type baseAnnualRates(baseAnnualRatesSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type paramsLitterDecomposition(paramsLitterDecompositionSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type paramsAnatomy(paramsAnatomySEXP);
    Rcpp::traits::input_parameter< double >::type airTemperature(airTemperatureSEXP);
    Rcpp::traits::input_parameter< double >::type airRelativeHumidity(airRelativeHumiditySEXP);
    Rcpp::traits::input_parameter< double >::type tstep(tstepSEXP);
    rcpp_result_gen = Rcpp::wrap(DAYCENTsnags(snags, baseAnnualRates, paramsLitterDecomposition, paramsAnatomy, airTemperature, airRelativeHumidity, tstep));
    return rcpp_result_gen;
END_RCPP
}
// DAYCENTlitter
NumericVector DAYCENTlitter(DataFrame litter, DataFrame paramsLitterDecomposition, NumericVector baseAnnualRates, double sand, double clay, double soilTemperature, double soilMoisture, double soilPH, double soilO2, double cultfac, double tstep);
RcppExport SEXP _medfate_DAYCENTlitter(SEXP litterSEXP, SEXP paramsLitterDecompositionSEXP, SEXP baseAnnualRatesSEXP, SEXP sandSEXP, SEXP claySEXP, SEXP soilTemperatureSEXP, SEXP soilMoistureSEXP, SEXP soilPHSEXP, SEXP soilO2SEXP, SEXP cultfacSEXP, SEXP tstepSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< DataFrame >::type litter(litterSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type paramsLitterDecomposition(paramsLitterDecompositionSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type baseAnnualRates(baseAnnualRatesSEXP);
    Rcpp::traits::input_parameter< double >::type sand(sandSEXP);
    Rcpp::traits::input_parameter< double >::type clay(claySEXP);
    Rcpp::traits::input_parameter< double >::type soilTemperature(soilTemperatureSEXP);
    Rcpp::traits::input_parameter< double >::type soilMoisture(soilMoistureSEXP);
    Rcpp::traits::input_parameter< double >::type soilPH(soilPHSEXP);
    Rcpp::traits::input_parameter< double >::type soilO2(soilO2SEXP);
    Rcpp::traits::input_parameter< double >::type cultfac(cultfacSEXP);
    Rcpp::traits::input_parameter< double >::type tstep(tstepSEXP);
    rcpp_result_gen = Rcpp::wrap(DAYCENTlitter(litter, paramsLitterDecomposition, baseAnnualRates, sand, clay, soilTemperature, soilMoisture, soilPH, soilO2, cultfac, tstep));
    return rcpp_result_gen;
END_RCPP
}
// DAYCENT
List DAYCENT(DataFrame snags, DataFrame litter, NumericVector SOC, DataFrame paramsLitterDecomposition, DataFrame paramsAnatomy, NumericVector baseAnnualRates, double annualTurnoverRate, DataFrame environmentalConditions, DataFrame litterProduction, double sand, double clay, double soilPH, double soilO2, double cultfac, double tstep, bool balanceCheck);
RcppExport SEXP _medfate_DAYCENT(SEXP snagsSEXP, SEXP litterSEXP, SEXP SOCSEXP, SEXP paramsLitterDecompositionSEXP, SEXP paramsAnatomySEXP, SEXP baseAnnualRatesSEXP, SEXP annualTurnoverRateSEXP, SEXP environmentalConditionsSEXP, SEXP litterProductionSEXP, SEXP sandSEXP, SEXP claySEXP, SEXP soilPHSEXP, SEXP soilO2SEXP, SEXP cultfacSEXP, SEXP tstepSEXP, SEXP balanceCheckSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< DataFrame >::type snags(snagsSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type litter(litterSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type SOC(SOCSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type paramsLitterDecomposition(paramsLitterDecompositionSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type paramsAnatomy(paramsAnatomySEXP);
    Rcpp::traits::input_parameter< NumericVector >::type baseAnnualRates(baseAnnualRatesSEXP);
    Rcpp::traits::input_parameter< double >::type annualTurnoverRate(annualTurnoverRateSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type environmentalConditions(environmentalConditionsSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type litterProduction(litterProductionSEXP);
    Rcpp::traits::input_parameter< double >::type sand(sandSEXP);
    Rcpp::traits::input_parameter< double >::type clay(claySEXP);
    Rcpp::traits::input_parameter< double >::type soilPH(soilPHSEXP);
    Rcpp::traits::input_parameter< double >::type soilO2(soilO2SEXP);
    Rcpp::traits::input_parameter< double >::type cultfac(cultfacSEXP);
    Rcpp::traits::input_parameter< double >::type tstep(tstepSEXP);
    Rcpp::traits::input_parameter< bool >::type balanceCheck(balanceCheckSEXP);
    rcpp_result_gen = Rcpp::wrap(DAYCENT(snags, litter, SOC, paramsLitterDecomposition, paramsAnatomy, baseAnnualRates, annualTurnoverRate, environmentalConditions, litterProduction, sand, clay, soilPH, soilO2, cultfac, tstep, balanceCheck));
    return rcpp_result_gen;
END_RCPP
}
// annualLitterDecompositionRate_c
double annualLitterDecompositionRate_c(double AET, double lignin);
RcppExport SEXP _medfate_annualLitterDecompositionRate_c(SEXP AETSEXP, SEXP ligninSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type AET(AETSEXP);
    Rcpp::traits::input_parameter< double >::type lignin(ligninSEXP);
    rcpp_result_gen = Rcpp::wrap(annualLitterDecompositionRate_c(AET, lignin));
    return rcpp_result_gen;
END_RCPP
}
// snagFallProbability_c
double snagFallProbability_c(double DBH, int decayClass, double durability);
RcppExport SEXP _medfate_snagFallProbability_c(SEXP DBHSEXP, SEXP decayClassSEXP, SEXP durabilitySEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type DBH(DBHSEXP);
    Rcpp::traits::input_parameter< int >::type decayClass(decayClassSEXP);
    Rcpp::traits::input_parameter< double >::type durability(durabilitySEXP);
    rcpp_result_gen = Rcpp::wrap(snagFallProbability_c(DBH, decayClass, durability));
    return rcpp_result_gen;
END_RCPP
}
// litterMetabolicFraction_c
double litterMetabolicFraction_c(double ligninPercent, double Nmass);
RcppExport SEXP _medfate_litterMetabolicFraction_c(SEXP ligninPercentSEXP, SEXP NmassSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type ligninPercent(ligninPercentSEXP);
    Rcpp::traits::input_parameter< double >::type Nmass(NmassSEXP);
    rcpp_result_gen = Rcpp::wrap(litterMetabolicFraction_c(ligninPercent, Nmass));
    return rcpp_result_gen;
END_RCPP
}
// moistureEffect_c
double moistureEffect_c(double sand, double clay, double soilMoisture);
RcppExport SEXP _medfate_moistureEffect_c(SEXP sandSEXP, SEXP claySEXP, SEXP soilMoistureSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type sand(sandSEXP);
    Rcpp::traits::input_parameter< double >::type clay(claySEXP);
    Rcpp::traits::input_parameter< double >::type soilMoisture(soilMoistureSEXP);
    rcpp_result_gen = Rcpp::wrap(moistureEffect_c(sand, clay, soilMoisture));
    return rcpp_result_gen;
END_RCPP
}
// temperatureEffect_c
double temperatureEffect_c(double soilTemperature);
RcppExport SEXP _medfate_temperatureEffect_c(SEXP soilTemperatureSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type soilTemperature(soilTemperatureSEXP);
    rcpp_result_gen = Rcpp::wrap(temperatureEffect_c(soilTemperature));
    return rcpp_result_gen;
END_RCPP
}
// FCCSbehaviour
List FCCSbehaviour(DataFrame FCCSpropsSI, NumericVector MliveSI, NumericVector MdeadSI, double slope, double windSpeedSI);
RcppExport SEXP _medfate_FCCSbehaviour(SEXP FCCSpropsSISEXP, SEXP MliveSISEXP, SEXP MdeadSISEXP, SEXP slopeSEXP, SEXP windSpeedSISEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< DataFrame >::type FCCSpropsSI(FCCSpropsSISEXP);
    Rcpp::traits::input_parameter< NumericVector >::type MliveSI(MliveSISEXP);
    Rcpp::traits::input_parameter< NumericVector >::type MdeadSI(MdeadSISEXP);
    Rcpp::traits::input_parameter< double >::type slope(slopeSEXP);
    Rcpp::traits::input_parameter< double >::type windSpeedSI(windSpeedSISEXP);
    rcpp_result_gen = Rcpp::wrap(FCCSbehaviour(FCCSpropsSI, MliveSI, MdeadSI, slope, windSpeedSI));
    return rcpp_result_gen;
END_RCPP
}
// rothermel
List rothermel(String modeltype, NumericVector wSI, NumericVector sSI, double delta, double mx_dead, NumericVector hSI, NumericVector mSI, double u, double windDir, double slope, double aspect);
RcppExport SEXP _medfate_rothermel(SEXP modeltypeSEXP, SEXP wSISEXP, SEXP sSISEXP, SEXP deltaSEXP, SEXP mx_deadSEXP, SEXP hSISEXP, SEXP mSISEXP, SEXP uSEXP, SEXP windDirSEXP, SEXP slopeSEXP, SEXP aspectSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< String >::type modeltype(modeltypeSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type wSI(wSISEXP);
    Rcpp::traits::input_parameter< NumericVector >::type sSI(sSISEXP);
    Rcpp::traits::input_parameter< double >::type delta(deltaSEXP);
    Rcpp::traits::input_parameter< double >::type mx_dead(mx_deadSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type hSI(hSISEXP);
    Rcpp::traits::input_parameter< NumericVector >::type mSI(mSISEXP);
    Rcpp::traits::input_parameter< double >::type u(uSEXP);
    Rcpp::traits::input_parameter< double >::type windDir(windDirSEXP);
    Rcpp::traits::input_parameter< double >::type slope(slopeSEXP);
    Rcpp::traits::input_parameter< double >::type aspect(aspectSEXP);
    rcpp_result_gen = Rcpp::wrap(rothermel(modeltype, wSI, sSI, delta, mx_dead, hSI, mSI, u, windDir, slope, aspect));
    return rcpp_result_gen;
END_RCPP
}
// criticalFirelineIntensity_c
double criticalFirelineIntensity_c(double CBH, double M);
RcppExport SEXP _medfate_criticalFirelineIntensity_c(SEXP CBHSEXP, SEXP MSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type CBH(CBHSEXP);
    Rcpp::traits::input_parameter< double >::type M(MSEXP);
    rcpp_result_gen = Rcpp::wrap(criticalFirelineIntensity_c(CBH, M));
    return rcpp_result_gen;
END_RCPP
}
// plumeTemperature_c
double plumeTemperature_c(double Ib_surf, double z, double T_air, double rho_air);
RcppExport SEXP _medfate_plumeTemperature_c(SEXP Ib_surfSEXP, SEXP zSEXP, SEXP T_airSEXP, SEXP rho_airSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type Ib_surf(Ib_surfSEXP);
    Rcpp::traits::input_parameter< double >::type z(zSEXP);
    Rcpp::traits::input_parameter< double >::type T_air(T_airSEXP);
    Rcpp::traits::input_parameter< double >::type rho_air(rho_airSEXP);
    rcpp_result_gen = Rcpp::wrap(plumeTemperature_c(Ib_surf, z, T_air, rho_air));
    return rcpp_result_gen;
END_RCPP
}
// barkThermalDiffusivity_c
double barkThermalDiffusivity_c(double fmc_bark, double rho_bark, double T_air);
RcppExport SEXP _medfate_barkThermalDiffusivity_c(SEXP fmc_barkSEXP, SEXP rho_barkSEXP, SEXP T_airSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type fmc_bark(fmc_barkSEXP);
    Rcpp::traits::input_parameter< double >::type rho_bark(rho_barkSEXP);
    Rcpp::traits::input_parameter< double >::type T_air(T_airSEXP);
    rcpp_result_gen = Rcpp::wrap(barkThermalDiffusivity_c(fmc_bark, rho_bark, T_air));
    return rcpp_result_gen;
END_RCPP
}
// radialBoleNecrosis_c
double radialBoleNecrosis_c(double Ib_surf, double t_res, double bark_diffusivity, double T_air, double rho_air);
RcppExport SEXP _medfate_radialBoleNecrosis_c(SEXP Ib_surfSEXP, SEXP t_resSEXP, SEXP bark_diffusivitySEXP, SEXP T_airSEXP, SEXP rho_airSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type Ib_surf(Ib_surfSEXP);
    Rcpp::traits::input_parameter< double >::type t_res(t_resSEXP);
    Rcpp::traits::input_parameter< double >::type bark_diffusivity(bark_diffusivitySEXP);
    Rcpp::traits::input_parameter< double >::type T_air(T_airSEXP);
    Rcpp::traits::input_parameter< double >::type rho_air(rho_airSEXP);
    rcpp_result_gen = Rcpp::wrap(radialBoleNecrosis_c(Ib_surf, t_res, bark_diffusivity, T_air, rho_air));
    return rcpp_result_gen;
END_RCPP
}
// leafThermalFactor_c
double leafThermalFactor_c(double SLA, double h, double c);
RcppExport SEXP _medfate_leafThermalFactor_c(SEXP SLASEXP, SEXP hSEXP, SEXP cSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type SLA(SLASEXP);
    Rcpp::traits::input_parameter< double >::type h(hSEXP);
    Rcpp::traits::input_parameter< double >::type c(cSEXP);
    rcpp_result_gen = Rcpp::wrap(leafThermalFactor_c(SLA, h, c));
    return rcpp_result_gen;
END_RCPP
}
// necrosisCriticalTemperature_c
double necrosisCriticalTemperature_c(double t_res, double thermal_factor, double T_air);
RcppExport SEXP _medfate_necrosisCriticalTemperature_c(SEXP t_resSEXP, SEXP thermal_factorSEXP, SEXP T_airSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type t_res(t_resSEXP);
    Rcpp::traits::input_parameter< double >::type thermal_factor(thermal_factorSEXP);
    Rcpp::traits::input_parameter< double >::type T_air(T_airSEXP);
    rcpp_result_gen = Rcpp::wrap(necrosisCriticalTemperature_c(t_res, thermal_factor, T_air));
    return rcpp_result_gen;
END_RCPP
}
// necrosisHeight_c
double necrosisHeight_c(double Ib_surf, double t_res, double thermal_factor, double T_air, double rho_air);
RcppExport SEXP _medfate_necrosisHeight_c(SEXP Ib_surfSEXP, SEXP t_resSEXP, SEXP thermal_factorSEXP, SEXP T_airSEXP, SEXP rho_airSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type Ib_surf(Ib_surfSEXP);
    Rcpp::traits::input_parameter< double >::type t_res(t_resSEXP);
    Rcpp::traits::input_parameter< double >::type thermal_factor(thermal_factorSEXP);
    Rcpp::traits::input_parameter< double >::type T_air(T_airSEXP);
    Rcpp::traits::input_parameter< double >::type rho_air(rho_airSEXP);
    rcpp_result_gen = Rcpp::wrap(necrosisHeight_c(Ib_surf, t_res, thermal_factor, T_air, rho_air));
    return rcpp_result_gen;
END_RCPP
}
// treeBasalArea
NumericVector treeBasalArea(NumericVector N, NumericVector dbh);
RcppExport SEXP _medfate_treeBasalArea(SEXP NSEXP, SEXP dbhSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type N(NSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type dbh(dbhSEXP);
    rcpp_result_gen = Rcpp::wrap(treeBasalArea(N, dbh));
    return rcpp_result_gen;
END_RCPP
}
// shrubCrownRatioAllometric
NumericVector shrubCrownRatioAllometric(IntegerVector SP, DataFrame SpParams);
RcppExport SEXP _medfate_shrubCrownRatioAllometric(SEXP SPSEXP, SEXP SpParamsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< IntegerVector >::type SP(SPSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    rcpp_result_gen = Rcpp::wrap(shrubCrownRatioAllometric(SP, SpParams));
    return rcpp_result_gen;
END_RCPP
}
// shrubCover
double shrubCover(List x, double excludeMinHeight);
RcppExport SEXP _medfate_shrubCover(SEXP xSEXP, SEXP excludeMinHeightSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< double >::type excludeMinHeight(excludeMinHeightSEXP);
    rcpp_result_gen = Rcpp::wrap(shrubCover(x, excludeMinHeight));
    return rcpp_result_gen;
END_RCPP
}
// herbCover
double herbCover(List x, double excludeMinHeight);
RcppExport SEXP _medfate_herbCover(SEXP xSEXP, SEXP excludeMinHeightSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< double >::type excludeMinHeight(excludeMinHeightSEXP);
    rcpp_result_gen = Rcpp::wrap(herbCover(x, excludeMinHeight));
    return rcpp_result_gen;
END_RCPP
}
// shrubPhytovolumeAllometric
NumericVector shrubPhytovolumeAllometric(IntegerVector SP, NumericVector Cover, NumericVector H, DataFrame SpParams);
RcppExport SEXP _medfate_shrubPhytovolumeAllometric(SEXP SPSEXP, SEXP CoverSEXP, SEXP HSEXP, SEXP SpParamsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< IntegerVector >::type SP(SPSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type Cover(CoverSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type H(HSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    rcpp_result_gen = Rcpp::wrap(shrubPhytovolumeAllometric(SP, Cover, H, SpParams));
    return rcpp_result_gen;
END_RCPP
}
// cohortIDs
CharacterVector cohortIDs(List x, DataFrame SpParams, int treeOffset, int shrubOffset, int herbOffset);
RcppExport SEXP _medfate_cohortIDs(SEXP xSEXP, SEXP SpParamsSEXP, SEXP treeOffsetSEXP, SEXP shrubOffsetSEXP, SEXP herbOffsetSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    Rcpp::traits::input_parameter< int >::type treeOffset(treeOffsetSEXP);
    Rcpp::traits::input_parameter< int >::type shrubOffset(shrubOffsetSEXP);
    Rcpp::traits::input_parameter< int >::type herbOffset(herbOffsetSEXP);
    rcpp_result_gen = Rcpp::wrap(cohortIDs(x, SpParams, treeOffset, shrubOffset, herbOffset));
    return rcpp_result_gen;
END_RCPP
}
// cohortType
CharacterVector cohortType(CharacterVector IDs);
RcppExport SEXP _medfate_cohortType(SEXP IDsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< CharacterVector >::type IDs(IDsSEXP);
    rcpp_result_gen = Rcpp::wrap(cohortType(IDs));
    return rcpp_result_gen;
END_RCPP
}
// cohortBasalArea
NumericVector cohortBasalArea(List x, DataFrame SpParams);
RcppExport SEXP _medfate_cohortBasalArea(SEXP xSEXP, SEXP SpParamsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    rcpp_result_gen = Rcpp::wrap(cohortBasalArea(x, SpParams));
    return rcpp_result_gen;
END_RCPP
}
// cohortLargerTreeBasalArea
NumericVector cohortLargerTreeBasalArea(List x, DataFrame SpParams, double self_proportion);
RcppExport SEXP _medfate_cohortLargerTreeBasalArea(SEXP xSEXP, SEXP SpParamsSEXP, SEXP self_proportionSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    Rcpp::traits::input_parameter< double >::type self_proportion(self_proportionSEXP);
    rcpp_result_gen = Rcpp::wrap(cohortLargerTreeBasalArea(x, SpParams, self_proportion));
    return rcpp_result_gen;
END_RCPP
}
// cohortCover
NumericVector cohortCover(List x, DataFrame SpParams);
RcppExport SEXP _medfate_cohortCover(SEXP xSEXP, SEXP SpParamsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    rcpp_result_gen = Rcpp::wrap(cohortCover(x, SpParams));
    return rcpp_result_gen;
END_RCPP
}
// cohortSpecies
IntegerVector cohortSpecies(List x, DataFrame SpParams);
RcppExport SEXP _medfate_cohortSpecies(SEXP xSEXP, SEXP SpParamsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    rcpp_result_gen = Rcpp::wrap(cohortSpecies(x, SpParams));
    return rcpp_result_gen;
END_RCPP
}
// cohortSpeciesName
CharacterVector cohortSpeciesName(List x, DataFrame SpParams);
RcppExport SEXP _medfate_cohortSpeciesName(SEXP xSEXP, SEXP SpParamsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    rcpp_result_gen = Rcpp::wrap(cohortSpeciesName(x, SpParams));
    return rcpp_result_gen;
END_RCPP
}
// cohortDensity
NumericVector cohortDensity(List x, DataFrame SpParams);
RcppExport SEXP _medfate_cohortDensity(SEXP xSEXP, SEXP SpParamsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    rcpp_result_gen = Rcpp::wrap(cohortDensity(x, SpParams));
    return rcpp_result_gen;
END_RCPP
}
// cohortHeight
NumericVector cohortHeight(List x, DataFrame SpParams);
RcppExport SEXP _medfate_cohortHeight(SEXP xSEXP, SEXP SpParamsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    rcpp_result_gen = Rcpp::wrap(cohortHeight(x, SpParams));
    return rcpp_result_gen;
END_RCPP
}
// cohortIndividualArea
NumericVector cohortIndividualArea(List x, DataFrame SpParams);
RcppExport SEXP _medfate_cohortIndividualArea(SEXP xSEXP, SEXP SpParamsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    rcpp_result_gen = Rcpp::wrap(cohortIndividualArea(x, SpParams));
    return rcpp_result_gen;
END_RCPP
}
// cohortCrownRatio
NumericVector cohortCrownRatio(List x, DataFrame SpParams);
RcppExport SEXP _medfate_cohortCrownRatio(SEXP xSEXP, SEXP SpParamsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    rcpp_result_gen = Rcpp::wrap(cohortCrownRatio(x, SpParams));
    return rcpp_result_gen;
END_RCPP
}
// cohortCrownBaseHeight
NumericVector cohortCrownBaseHeight(List x, DataFrame SpParams);
RcppExport SEXP _medfate_cohortCrownBaseHeight(SEXP xSEXP, SEXP SpParamsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    rcpp_result_gen = Rcpp::wrap(cohortCrownBaseHeight(x, SpParams));
    return rcpp_result_gen;
END_RCPP
}
// cohortCrownLength
NumericVector cohortCrownLength(List x, DataFrame SpParams);
RcppExport SEXP _medfate_cohortCrownLength(SEXP xSEXP, SEXP SpParamsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    rcpp_result_gen = Rcpp::wrap(cohortCrownLength(x, SpParams));
    return rcpp_result_gen;
END_RCPP
}
// cohortFoliarBiomass
NumericVector cohortFoliarBiomass(List x, DataFrame SpParams, double gdd, bool competitionEffect);
RcppExport SEXP _medfate_cohortFoliarBiomass(SEXP xSEXP, SEXP SpParamsSEXP, SEXP gddSEXP, SEXP competitionEffectSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    Rcpp::traits::input_parameter< double >::type gdd(gddSEXP);
    Rcpp::traits::input_parameter< bool >::type competitionEffect(competitionEffectSEXP);
    rcpp_result_gen = Rcpp::wrap(cohortFoliarBiomass(x, SpParams, gdd, competitionEffect));
    return rcpp_result_gen;
END_RCPP
}
// cohortFuelLoading
NumericVector cohortFuelLoading(List x, DataFrame SpParams, double gdd, bool includeDead);
RcppExport SEXP _medfate_cohortFuelLoading(SEXP xSEXP, SEXP SpParamsSEXP, SEXP gddSEXP, SEXP includeDeadSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    Rcpp::traits::input_parameter< double >::type gdd(gddSEXP);
    Rcpp::traits::input_parameter< bool >::type includeDead(includeDeadSEXP);
    rcpp_result_gen = Rcpp::wrap(cohortFuelLoading(x, SpParams, gdd, includeDead));
    return rcpp_result_gen;
END_RCPP
}
// cohortEquilibriumLeafLitter
NumericVector cohortEquilibriumLeafLitter(List x, DataFrame SpParams, double AET);
RcppExport SEXP _medfate_cohortEquilibriumLeafLitter(SEXP xSEXP, SEXP SpParamsSEXP, SEXP AETSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    Rcpp::traits::input_parameter< double >::type AET(AETSEXP);
    rcpp_result_gen = Rcpp::wrap(cohortEquilibriumLeafLitter(x, SpParams, AET));
    return rcpp_result_gen;
END_RCPP
}
// cohortEquilibriumSmallBranchLitter
NumericVector cohortEquilibriumSmallBranchLitter(List x, DataFrame SpParams, double smallBranchDecompositionRate);
RcppExport SEXP _medfate_cohortEquilibriumSmallBranchLitter(SEXP xSEXP, SEXP SpParamsSEXP, SEXP smallBranchDecompositionRateSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    Rcpp::traits::input_parameter< double >::type smallBranchDecompositionRate(smallBranchDecompositionRateSEXP);
    rcpp_result_gen = Rcpp::wrap(cohortEquilibriumSmallBranchLitter(x, SpParams, smallBranchDecompositionRate));
    return rcpp_result_gen;
END_RCPP
}
// cohortPhytovolume
NumericVector cohortPhytovolume(List x, DataFrame SpParams);
RcppExport SEXP _medfate_cohortPhytovolume(SEXP xSEXP, SEXP SpParamsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    rcpp_result_gen = Rcpp::wrap(cohortPhytovolume(x, SpParams));
    return rcpp_result_gen;
END_RCPP
}
// cohortLAI
NumericVector cohortLAI(List x, DataFrame SpParams, double gdd, bool bounded, bool competitionEffect);
RcppExport SEXP _medfate_cohortLAI(SEXP xSEXP, SEXP SpParamsSEXP, SEXP gddSEXP, SEXP boundedSEXP, SEXP competitionEffectSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    Rcpp::traits::input_parameter< double >::type gdd(gddSEXP);
    Rcpp::traits::input_parameter< bool >::type bounded(boundedSEXP);
    Rcpp::traits::input_parameter< bool >::type competitionEffect(competitionEffectSEXP);
    rcpp_result_gen = Rcpp::wrap(cohortLAI(x, SpParams, gdd, bounded, competitionEffect));
    return rcpp_result_gen;
END_RCPP
}
// herbFoliarBiomass
double herbFoliarBiomass(List x, DataFrame SpParams);
RcppExport SEXP _medfate_herbFoliarBiomass(SEXP xSEXP, SEXP SpParamsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    rcpp_result_gen = Rcpp::wrap(herbFoliarBiomass(x, SpParams));
    return rcpp_result_gen;
END_RCPP
}
// herbFuelLoading
double herbFuelLoading(List x, DataFrame SpParams);
RcppExport SEXP _medfate_herbFuelLoading(SEXP xSEXP, SEXP SpParamsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    rcpp_result_gen = Rcpp::wrap(herbFuelLoading(x, SpParams));
    return rcpp_result_gen;
END_RCPP
}
// herbLAI
double herbLAI(List x, DataFrame SpParams);
RcppExport SEXP _medfate_herbLAI(SEXP xSEXP, SEXP SpParamsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    rcpp_result_gen = Rcpp::wrap(herbLAI(x, SpParams));
    return rcpp_result_gen;
END_RCPP
}
// speciesBasalArea
NumericVector speciesBasalArea(List x, DataFrame SpParams);
RcppExport SEXP _medfate_speciesBasalArea(SEXP xSEXP, SEXP SpParamsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    rcpp_result_gen = Rcpp::wrap(speciesBasalArea(x, SpParams));
    return rcpp_result_gen;
END_RCPP
}
// speciesCover
NumericVector speciesCover(List x, DataFrame SpParams);
RcppExport SEXP _medfate_speciesCover(SEXP xSEXP, SEXP SpParamsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    rcpp_result_gen = Rcpp::wrap(speciesCover(x, SpParams));
    return rcpp_result_gen;
END_RCPP
}
// speciesDensity
NumericVector speciesDensity(List x, DataFrame SpParams);
RcppExport SEXP _medfate_speciesDensity(SEXP xSEXP, SEXP SpParamsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    rcpp_result_gen = Rcpp::wrap(speciesDensity(x, SpParams));
    return rcpp_result_gen;
END_RCPP
}
// speciesFoliarBiomass
NumericVector speciesFoliarBiomass(List x, DataFrame SpParams, double gdd);
RcppExport SEXP _medfate_speciesFoliarBiomass(SEXP xSEXP, SEXP SpParamsSEXP, SEXP gddSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    Rcpp::traits::input_parameter< double >::type gdd(gddSEXP);
    rcpp_result_gen = Rcpp::wrap(speciesFoliarBiomass(x, SpParams, gdd));
    return rcpp_result_gen;
END_RCPP
}
// speciesFuelLoading
NumericVector speciesFuelLoading(List x, DataFrame SpParams, double gdd, bool includeDead);
RcppExport SEXP _medfate_speciesFuelLoading(SEXP xSEXP, SEXP SpParamsSEXP, SEXP gddSEXP, SEXP includeDeadSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    Rcpp::traits::input_parameter< double >::type gdd(gddSEXP);
    Rcpp::traits::input_parameter< bool >::type includeDead(includeDeadSEXP);
    rcpp_result_gen = Rcpp::wrap(speciesFuelLoading(x, SpParams, gdd, includeDead));
    return rcpp_result_gen;
END_RCPP
}
// speciesLAI
NumericVector speciesLAI(List x, DataFrame SpParams, double gdd, bool bounded);
RcppExport SEXP _medfate_speciesLAI(SEXP xSEXP, SEXP SpParamsSEXP, SEXP gddSEXP, SEXP boundedSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    Rcpp::traits::input_parameter< double >::type gdd(gddSEXP);
    Rcpp::traits::input_parameter< bool >::type bounded(boundedSEXP);
    rcpp_result_gen = Rcpp::wrap(speciesLAI(x, SpParams, gdd, bounded));
    return rcpp_result_gen;
END_RCPP
}
// standBasalArea
double standBasalArea(List x, double minDBH);
RcppExport SEXP _medfate_standBasalArea(SEXP xSEXP, SEXP minDBHSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< double >::type minDBH(minDBHSEXP);
    rcpp_result_gen = Rcpp::wrap(standBasalArea(x, minDBH));
    return rcpp_result_gen;
END_RCPP
}
// standFoliarBiomass
double standFoliarBiomass(List x, DataFrame SpParams, double gdd);
RcppExport SEXP _medfate_standFoliarBiomass(SEXP xSEXP, SEXP SpParamsSEXP, SEXP gddSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    Rcpp::traits::input_parameter< double >::type gdd(gddSEXP);
    rcpp_result_gen = Rcpp::wrap(standFoliarBiomass(x, SpParams, gdd));
    return rcpp_result_gen;
END_RCPP
}
// standFuelLoading
double standFuelLoading(List x, DataFrame SpParams, double gdd, bool includeDead);
RcppExport SEXP _medfate_standFuelLoading(SEXP xSEXP, SEXP SpParamsSEXP, SEXP gddSEXP, SEXP includeDeadSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    Rcpp::traits::input_parameter< double >::type gdd(gddSEXP);
    Rcpp::traits::input_parameter< bool >::type includeDead(includeDeadSEXP);
    rcpp_result_gen = Rcpp::wrap(standFuelLoading(x, SpParams, gdd, includeDead));
    return rcpp_result_gen;
END_RCPP
}
// standShrubVolume
double standShrubVolume(List x, DataFrame SpParams);
RcppExport SEXP _medfate_standShrubVolume(SEXP xSEXP, SEXP SpParamsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    rcpp_result_gen = Rcpp::wrap(standShrubVolume(x, SpParams));
    return rcpp_result_gen;
END_RCPP
}
// standLAI
double standLAI(List x, DataFrame SpParams, double gdd, bool bounded);
RcppExport SEXP _medfate_standLAI(SEXP xSEXP, SEXP SpParamsSEXP, SEXP gddSEXP, SEXP boundedSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    Rcpp::traits::input_parameter< double >::type gdd(gddSEXP);
    Rcpp::traits::input_parameter< bool >::type bounded(boundedSEXP);
    rcpp_result_gen = Rcpp::wrap(standLAI(x, SpParams, gdd, bounded));
    return rcpp_result_gen;
END_RCPP
}
// LAIdistributionVectors
NumericMatrix LAIdistributionVectors(NumericVector z, NumericVector LAI, NumericVector H, NumericVector CR);
RcppExport SEXP _medfate_LAIdistributionVectors(SEXP zSEXP, SEXP LAISEXP, SEXP HSEXP, SEXP CRSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type z(zSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type LAI(LAISEXP);
    Rcpp::traits::input_parameter< NumericVector >::type H(HSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type CR(CRSEXP);
    rcpp_result_gen = Rcpp::wrap(LAIdistributionVectors(z, LAI, H, CR));
    return rcpp_result_gen;
END_RCPP
}
// LAIdistribution
NumericMatrix LAIdistribution(NumericVector z, List x, DataFrame SpParams, double gdd, bool bounded);
RcppExport SEXP _medfate_LAIdistribution(SEXP zSEXP, SEXP xSEXP, SEXP SpParamsSEXP, SEXP gddSEXP, SEXP boundedSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type z(zSEXP);
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    Rcpp::traits::input_parameter< double >::type gdd(gddSEXP);
    Rcpp::traits::input_parameter< bool >::type bounded(boundedSEXP);
    rcpp_result_gen = Rcpp::wrap(LAIdistribution(z, x, SpParams, gdd, bounded));
    return rcpp_result_gen;
END_RCPP
}
// LAIprofileVectors
NumericVector LAIprofileVectors(NumericVector z, NumericVector LAI, NumericVector H, NumericVector CR);
RcppExport SEXP _medfate_LAIprofileVectors(SEXP zSEXP, SEXP LAISEXP, SEXP HSEXP, SEXP CRSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type z(zSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type LAI(LAISEXP);
    Rcpp::traits::input_parameter< NumericVector >::type H(HSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type CR(CRSEXP);
    rcpp_result_gen = Rcpp::wrap(LAIprofileVectors(z, LAI, H, CR));
    return rcpp_result_gen;
END_RCPP
}
// LAIprofile
NumericVector LAIprofile(NumericVector z, List x, DataFrame SpParams, double gdd, bool bounded);
RcppExport SEXP _medfate_LAIprofile(SEXP zSEXP, SEXP xSEXP, SEXP SpParamsSEXP, SEXP gddSEXP, SEXP boundedSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type z(zSEXP);
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    Rcpp::traits::input_parameter< double >::type gdd(gddSEXP);
    Rcpp::traits::input_parameter< bool >::type bounded(boundedSEXP);
    rcpp_result_gen = Rcpp::wrap(LAIprofile(z, x, SpParams, gdd, bounded));
    return rcpp_result_gen;
END_RCPP
}
// forest2aboveground
DataFrame forest2aboveground(List x, DataFrame SpParams, double gdd, bool loading);
RcppExport SEXP _medfate_forest2aboveground(SEXP xSEXP, SEXP SpParamsSEXP, SEXP gddSEXP, SEXP loadingSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    Rcpp::traits::input_parameter< double >::type gdd(gddSEXP);
    Rcpp::traits::input_parameter< bool >::type loading(loadingSEXP);
    rcpp_result_gen = Rcpp::wrap(forest2aboveground(x, SpParams, gdd, loading));
    return rcpp_result_gen;
END_RCPP
}
// forest2belowground
NumericMatrix forest2belowground(List x, DataFrame soil, DataFrame SpParams);
RcppExport SEXP _medfate_forest2belowground(SEXP xSEXP, SEXP soilSEXP, SEXP SpParamsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type soil(soilSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    rcpp_result_gen = Rcpp::wrap(forest2belowground(x, soil, SpParams));
    return rcpp_result_gen;
END_RCPP
}
// EMCdesorption_c
double EMCdesorption_c(double fuelTemperature, double fuelHumidity);
RcppExport SEXP _medfate_EMCdesorption_c(SEXP fuelTemperatureSEXP, SEXP fuelHumiditySEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type fuelTemperature(fuelTemperatureSEXP);
    Rcpp::traits::input_parameter< double >::type fuelHumidity(fuelHumiditySEXP);
    rcpp_result_gen = Rcpp::wrap(EMCdesorption_c(fuelTemperature, fuelHumidity));
    return rcpp_result_gen;
END_RCPP
}
// EMCadsorption_c
double EMCadsorption_c(double fuelTemperature, double fuelHumidity);
RcppExport SEXP _medfate_EMCadsorption_c(SEXP fuelTemperatureSEXP, SEXP fuelHumiditySEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type fuelTemperature(fuelTemperatureSEXP);
    Rcpp::traits::input_parameter< double >::type fuelHumidity(fuelHumiditySEXP);
    rcpp_result_gen = Rcpp::wrap(EMCadsorption_c(fuelTemperature, fuelHumidity));
    return rcpp_result_gen;
END_RCPP
}
// EMCSimard_c
double EMCSimard_c(double fuelTemperature, double fuelHumidity);
RcppExport SEXP _medfate_EMCSimard_c(SEXP fuelTemperatureSEXP, SEXP fuelHumiditySEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type fuelTemperature(fuelTemperatureSEXP);
    Rcpp::traits::input_parameter< double >::type fuelHumidity(fuelHumiditySEXP);
    rcpp_result_gen = Rcpp::wrap(EMCSimard_c(fuelTemperature, fuelHumidity));
    return rcpp_result_gen;
END_RCPP
}
// woodyFuelProfile
NumericVector woodyFuelProfile(NumericVector z, List x, DataFrame SpParams, double gdd);
RcppExport SEXP _medfate_woodyFuelProfile(SEXP zSEXP, SEXP xSEXP, SEXP SpParamsSEXP, SEXP gddSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type z(zSEXP);
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    Rcpp::traits::input_parameter< double >::type gdd(gddSEXP);
    rcpp_result_gen = Rcpp::wrap(woodyFuelProfile(z, x, SpParams, gdd));
    return rcpp_result_gen;
END_RCPP
}
// layerCohortFuelLoading
NumericVector layerCohortFuelLoading(double minHeight, double maxHeight, NumericVector cohortLoading, NumericVector H, NumericVector CR);
RcppExport SEXP _medfate_layerCohortFuelLoading(SEXP minHeightSEXP, SEXP maxHeightSEXP, SEXP cohortLoadingSEXP, SEXP HSEXP, SEXP CRSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type minHeight(minHeightSEXP);
    Rcpp::traits::input_parameter< double >::type maxHeight(maxHeightSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type cohortLoading(cohortLoadingSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type H(HSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type CR(CRSEXP);
    rcpp_result_gen = Rcpp::wrap(layerCohortFuelLoading(minHeight, maxHeight, cohortLoading, H, CR));
    return rcpp_result_gen;
END_RCPP
}
// layerFuelLoading
double layerFuelLoading(double minHeight, double maxHeight, NumericVector cohortLoading, NumericVector H, NumericVector CR);
RcppExport SEXP _medfate_layerFuelLoading(SEXP minHeightSEXP, SEXP maxHeightSEXP, SEXP cohortLoadingSEXP, SEXP HSEXP, SEXP CRSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type minHeight(minHeightSEXP);
    Rcpp::traits::input_parameter< double >::type maxHeight(maxHeightSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type cohortLoading(cohortLoadingSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type H(HSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type CR(CRSEXP);
    rcpp_result_gen = Rcpp::wrap(layerFuelLoading(minHeight, maxHeight, cohortLoading, H, CR));
    return rcpp_result_gen;
END_RCPP
}
// layerLAI
double layerLAI(double minHeight, double maxHeight, NumericVector cohortLAI, NumericVector H, NumericVector CR);
RcppExport SEXP _medfate_layerLAI(SEXP minHeightSEXP, SEXP maxHeightSEXP, SEXP cohortLAISEXP, SEXP HSEXP, SEXP CRSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type minHeight(minHeightSEXP);
    Rcpp::traits::input_parameter< double >::type maxHeight(maxHeightSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type cohortLAI(cohortLAISEXP);
    Rcpp::traits::input_parameter< NumericVector >::type H(HSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type CR(CRSEXP);
    rcpp_result_gen = Rcpp::wrap(layerLAI(minHeight, maxHeight, cohortLAI, H, CR));
    return rcpp_result_gen;
END_RCPP
}
// layerFuelAverageSpeciesParameter
double layerFuelAverageSpeciesParameter(String spParName, double minHeight, double maxHeight, List x, DataFrame SpParams, double gdd);
RcppExport SEXP _medfate_layerFuelAverageSpeciesParameter(SEXP spParNameSEXP, SEXP minHeightSEXP, SEXP maxHeightSEXP, SEXP xSEXP, SEXP SpParamsSEXP, SEXP gddSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< String >::type spParName(spParNameSEXP);
    Rcpp::traits::input_parameter< double >::type minHeight(minHeightSEXP);
    Rcpp::traits::input_parameter< double >::type maxHeight(maxHeightSEXP);
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    Rcpp::traits::input_parameter< double >::type gdd(gddSEXP);
    rcpp_result_gen = Rcpp::wrap(layerFuelAverageSpeciesParameter(spParName, minHeight, maxHeight, x, SpParams, gdd));
    return rcpp_result_gen;
END_RCPP
}
// layerFuelAverageParameter
double layerFuelAverageParameter(double minHeight, double maxHeight, NumericVector cohortParameter, NumericVector cohortLoading, NumericVector H, NumericVector CR);
RcppExport SEXP _medfate_layerFuelAverageParameter(SEXP minHeightSEXP, SEXP maxHeightSEXP, SEXP cohortParameterSEXP, SEXP cohortLoadingSEXP, SEXP HSEXP, SEXP CRSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type minHeight(minHeightSEXP);
    Rcpp::traits::input_parameter< double >::type maxHeight(maxHeightSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type cohortParameter(cohortParameterSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type cohortLoading(cohortLoadingSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type H(HSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type CR(CRSEXP);
    rcpp_result_gen = Rcpp::wrap(layerFuelAverageParameter(minHeight, maxHeight, cohortParameter, cohortLoading, H, CR));
    return rcpp_result_gen;
END_RCPP
}
// layerFuelAverageCrownLength
double layerFuelAverageCrownLength(double minHeight, double maxHeight, NumericVector cohortCrownLength, NumericVector cohortLoading, NumericVector H, NumericVector CR);
RcppExport SEXP _medfate_layerFuelAverageCrownLength(SEXP minHeightSEXP, SEXP maxHeightSEXP, SEXP cohortCrownLengthSEXP, SEXP cohortLoadingSEXP, SEXP HSEXP, SEXP CRSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type minHeight(minHeightSEXP);
    Rcpp::traits::input_parameter< double >::type maxHeight(maxHeightSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type cohortCrownLength(cohortCrownLengthSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type cohortLoading(cohortLoadingSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type H(HSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type CR(CRSEXP);
    rcpp_result_gen = Rcpp::wrap(layerFuelAverageCrownLength(minHeight, maxHeight, cohortCrownLength, cohortLoading, H, CR));
    return rcpp_result_gen;
END_RCPP
}
// fuelLiveStratification
List fuelLiveStratification(List object, DataFrame SpParams, double gdd, double heightProfileStep, double maxHeightProfile, double bulkDensityThreshold);
RcppExport SEXP _medfate_fuelLiveStratification(SEXP objectSEXP, SEXP SpParamsSEXP, SEXP gddSEXP, SEXP heightProfileStepSEXP, SEXP maxHeightProfileSEXP, SEXP bulkDensityThresholdSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type object(objectSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    Rcpp::traits::input_parameter< double >::type gdd(gddSEXP);
    Rcpp::traits::input_parameter< double >::type heightProfileStep(heightProfileStepSEXP);
    Rcpp::traits::input_parameter< double >::type maxHeightProfile(maxHeightProfileSEXP);
    Rcpp::traits::input_parameter< double >::type bulkDensityThreshold(bulkDensityThresholdSEXP);
    rcpp_result_gen = Rcpp::wrap(fuelLiveStratification(object, SpParams, gdd, heightProfileStep, maxHeightProfile, bulkDensityThreshold));
    return rcpp_result_gen;
END_RCPP
}
// FCCSproperties
DataFrame FCCSproperties(List object, DataFrame SpParams, NumericVector cohortFMC, NumericVector loadingOffset, double gdd, double heightProfileStep, double maxHeightProfile, double bulkDensityThreshold, String depthMode);
RcppExport SEXP _medfate_FCCSproperties(SEXP objectSEXP, SEXP SpParamsSEXP, SEXP cohortFMCSEXP, SEXP loadingOffsetSEXP, SEXP gddSEXP, SEXP heightProfileStepSEXP, SEXP maxHeightProfileSEXP, SEXP bulkDensityThresholdSEXP, SEXP depthModeSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type object(objectSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type cohortFMC(cohortFMCSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type loadingOffset(loadingOffsetSEXP);
    Rcpp::traits::input_parameter< double >::type gdd(gddSEXP);
    Rcpp::traits::input_parameter< double >::type heightProfileStep(heightProfileStepSEXP);
    Rcpp::traits::input_parameter< double >::type maxHeightProfile(maxHeightProfileSEXP);
    Rcpp::traits::input_parameter< double >::type bulkDensityThreshold(bulkDensityThresholdSEXP);
    Rcpp::traits::input_parameter< String >::type depthMode(depthModeSEXP);
    rcpp_result_gen = Rcpp::wrap(FCCSproperties(object, SpParams, cohortFMC, loadingOffset, gdd, heightProfileStep, maxHeightProfile, bulkDensityThreshold, depthMode));
    return rcpp_result_gen;
END_RCPP
}
// defineGrowthDailyOutput
List defineGrowthDailyOutput(double latitude, double elevation, double slope, double aspect, CharacterVector dateStrings, List x);
static SEXP _medfate_defineGrowthDailyOutput_try(SEXP latitudeSEXP, SEXP elevationSEXP, SEXP slopeSEXP, SEXP aspectSEXP, SEXP dateStringsSEXP, SEXP xSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< double >::type latitude(latitudeSEXP);
    Rcpp::traits::input_parameter< double >::type elevation(elevationSEXP);
    Rcpp::traits::input_parameter< double >::type slope(slopeSEXP);
    Rcpp::traits::input_parameter< double >::type aspect(aspectSEXP);
    Rcpp::traits::input_parameter< CharacterVector >::type dateStrings(dateStringsSEXP);
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    rcpp_result_gen = Rcpp::wrap(defineGrowthDailyOutput(latitude, elevation, slope, aspect, dateStrings, x));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_defineGrowthDailyOutput(SEXP latitudeSEXP, SEXP elevationSEXP, SEXP slopeSEXP, SEXP aspectSEXP, SEXP dateStringsSEXP, SEXP xSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_defineGrowthDailyOutput_try(latitudeSEXP, elevationSEXP, slopeSEXP, aspectSEXP, dateStringsSEXP, xSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// fillGrowthDailyOutput
void fillGrowthDailyOutput(List l, List x, List sDay, int iday);
static SEXP _medfate_fillGrowthDailyOutput_try(SEXP lSEXP, SEXP xSEXP, SEXP sDaySEXP, SEXP idaySEXP) {
BEGIN_RCPP
    Rcpp::traits::input_parameter< List >::type l(lSEXP);
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< List >::type sDay(sDaySEXP);
    Rcpp::traits::input_parameter< int >::type iday(idaySEXP);
    fillGrowthDailyOutput(l, x, sDay, iday);
    return R_NilValue;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_fillGrowthDailyOutput(SEXP lSEXP, SEXP xSEXP, SEXP sDaySEXP, SEXP idaySEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_fillGrowthDailyOutput_try(lSEXP, xSEXP, sDaySEXP, idaySEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// growth
List growth(List x, DataFrame meteo, double latitude, double elevation, double slope, double aspect, NumericVector CO2ByYear, double waterTableDepth);
static SEXP _medfate_growth_try(SEXP xSEXP, SEXP meteoSEXP, SEXP latitudeSEXP, SEXP elevationSEXP, SEXP slopeSEXP, SEXP aspectSEXP, SEXP CO2ByYearSEXP, SEXP waterTableDepthSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type meteo(meteoSEXP);
    Rcpp::traits::input_parameter< double >::type latitude(latitudeSEXP);
    Rcpp::traits::input_parameter< double >::type elevation(elevationSEXP);
    Rcpp::traits::input_parameter< double >::type slope(slopeSEXP);
    Rcpp::traits::input_parameter< double >::type aspect(aspectSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type CO2ByYear(CO2ByYearSEXP);
    Rcpp::traits::input_parameter< double >::type waterTableDepth(waterTableDepthSEXP);
    rcpp_result_gen = Rcpp::wrap(growth(x, meteo, latitude, elevation, slope, aspect, CO2ByYear, waterTableDepth));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_growth(SEXP xSEXP, SEXP meteoSEXP, SEXP latitudeSEXP, SEXP elevationSEXP, SEXP slopeSEXP, SEXP aspectSEXP, SEXP CO2ByYearSEXP, SEXP waterTableDepthSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_growth_try(xSEXP, meteoSEXP, latitudeSEXP, elevationSEXP, slopeSEXP, aspectSEXP, CO2ByYearSEXP, waterTableDepthSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// growthDay
List growthDay(List x, CharacterVector date, NumericVector meteovec, double latitude, double elevation, double slope, double aspect, double runon, Nullable<NumericVector> lateralFlows, double waterTableDepth, bool modifyInput);
static SEXP _medfate_growthDay_try(SEXP xSEXP, SEXP dateSEXP, SEXP meteovecSEXP, SEXP latitudeSEXP, SEXP elevationSEXP, SEXP slopeSEXP, SEXP aspectSEXP, SEXP runonSEXP, SEXP lateralFlowsSEXP, SEXP waterTableDepthSEXP, SEXP modifyInputSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< CharacterVector >::type date(dateSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type meteovec(meteovecSEXP);
    Rcpp::traits::input_parameter< double >::type latitude(latitudeSEXP);
    Rcpp::traits::input_parameter< double >::type elevation(elevationSEXP);
    Rcpp::traits::input_parameter< double >::type slope(slopeSEXP);
    Rcpp::traits::input_parameter< double >::type aspect(aspectSEXP);
    Rcpp::traits::input_parameter< double >::type runon(runonSEXP);
    Rcpp::traits::input_parameter< Nullable<NumericVector> >::type lateralFlows(lateralFlowsSEXP);
    Rcpp::traits::input_parameter< double >::type waterTableDepth(waterTableDepthSEXP);
    Rcpp::traits::input_parameter< bool >::type modifyInput(modifyInputSEXP);
    rcpp_result_gen = Rcpp::wrap(growthDay(x, date, meteovec, latitude, elevation, slope, aspect, runon, lateralFlows, waterTableDepth, modifyInput));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_growthDay(SEXP xSEXP, SEXP dateSEXP, SEXP meteovecSEXP, SEXP latitudeSEXP, SEXP elevationSEXP, SEXP slopeSEXP, SEXP aspectSEXP, SEXP runonSEXP, SEXP lateralFlowsSEXP, SEXP waterTableDepthSEXP, SEXP modifyInputSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_growthDay_try(xSEXP, dateSEXP, meteovecSEXP, latitudeSEXP, elevationSEXP, slopeSEXP, aspectSEXP, runonSEXP, lateralFlowsSEXP, waterTableDepthSEXP, modifyInputSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// dailyMortalityProbability_c
double dailyMortalityProbability_c(double stressValue, double stressThreshold);
RcppExport SEXP _medfate_dailyMortalityProbability_c(SEXP stressValueSEXP, SEXP stressThresholdSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type stressValue(stressValueSEXP);
    Rcpp::traits::input_parameter< double >::type stressThreshold(stressThresholdSEXP);
    rcpp_result_gen = Rcpp::wrap(dailyMortalityProbability_c(stressValue, stressThreshold));
    return rcpp_result_gen;
END_RCPP
}
// averagePsi
double averagePsi(NumericVector psi, NumericVector v, double exp_extract, double psi_extract);
RcppExport SEXP _medfate_averagePsi(SEXP psiSEXP, SEXP vSEXP, SEXP exp_extractSEXP, SEXP psi_extractSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type psi(psiSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type v(vSEXP);
    Rcpp::traits::input_parameter< double >::type exp_extract(exp_extractSEXP);
    Rcpp::traits::input_parameter< double >::type psi_extract(psi_extractSEXP);
    rcpp_result_gen = Rcpp::wrap(averagePsi(psi, v, exp_extract, psi_extract));
    return rcpp_result_gen;
END_RCPP
}
// psi2Weibull
NumericVector psi2Weibull(double psi50, double psi88, double psi12);
RcppExport SEXP _medfate_psi2Weibull(SEXP psi50SEXP, SEXP psi88SEXP, SEXP psi12SEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type psi50(psi50SEXP);
    Rcpp::traits::input_parameter< double >::type psi88(psi88SEXP);
    Rcpp::traits::input_parameter< double >::type psi12(psi12SEXP);
    rcpp_result_gen = Rcpp::wrap(psi2Weibull(psi50, psi88, psi12));
    return rcpp_result_gen;
END_RCPP
}
// E2psiBelowground
List E2psiBelowground(double E, List hydraulicNetwork, NumericVector psiIni);
RcppExport SEXP _medfate_E2psiBelowground(SEXP ESEXP, SEXP hydraulicNetworkSEXP, SEXP psiIniSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type E(ESEXP);
    Rcpp::traits::input_parameter< List >::type hydraulicNetwork(hydraulicNetworkSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type psiIni(psiIniSEXP);
    rcpp_result_gen = Rcpp::wrap(E2psiBelowground(E, hydraulicNetwork, psiIni));
    return rcpp_result_gen;
END_RCPP
}
// E2psiAboveground
List E2psiAboveground(double E, double psiRootCrown, List hydraulicNetwork);
RcppExport SEXP _medfate_E2psiAboveground(SEXP ESEXP, SEXP psiRootCrownSEXP, SEXP hydraulicNetworkSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type E(ESEXP);
    Rcpp::traits::input_parameter< double >::type psiRootCrown(psiRootCrownSEXP);
    Rcpp::traits::input_parameter< List >::type hydraulicNetwork(hydraulicNetworkSEXP);
    rcpp_result_gen = Rcpp::wrap(E2psiAboveground(E, psiRootCrown, hydraulicNetwork));
    return rcpp_result_gen;
END_RCPP
}
// E2psiNetwork
List E2psiNetwork(double E, List hydraulicNetwork, NumericVector psiIni);
RcppExport SEXP _medfate_E2psiNetwork(SEXP ESEXP, SEXP hydraulicNetworkSEXP, SEXP psiIniSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type E(ESEXP);
    Rcpp::traits::input_parameter< List >::type hydraulicNetwork(hydraulicNetworkSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type psiIni(psiIniSEXP);
    rcpp_result_gen = Rcpp::wrap(E2psiNetwork(E, hydraulicNetwork, psiIni));
    return rcpp_result_gen;
END_RCPP
}
// supplyFunctionOneXylem
List supplyFunctionOneXylem(NumericVector psiSoil, NumericVector v, double kstemmax, double stemc, double stemd, double psiCav, int maxNsteps, double dE);
RcppExport SEXP _medfate_supplyFunctionOneXylem(SEXP psiSoilSEXP, SEXP vSEXP, SEXP kstemmaxSEXP, SEXP stemcSEXP, SEXP stemdSEXP, SEXP psiCavSEXP, SEXP maxNstepsSEXP, SEXP dESEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type psiSoil(psiSoilSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type v(vSEXP);
    Rcpp::traits::input_parameter< double >::type kstemmax(kstemmaxSEXP);
    Rcpp::traits::input_parameter< double >::type stemc(stemcSEXP);
    Rcpp::traits::input_parameter< double >::type stemd(stemdSEXP);
    Rcpp::traits::input_parameter< double >::type psiCav(psiCavSEXP);
    Rcpp::traits::input_parameter< int >::type maxNsteps(maxNstepsSEXP);
    Rcpp::traits::input_parameter< double >::type dE(dESEXP);
    rcpp_result_gen = Rcpp::wrap(supplyFunctionOneXylem(psiSoil, v, kstemmax, stemc, stemd, psiCav, maxNsteps, dE));
    return rcpp_result_gen;
END_RCPP
}
// supplyFunctionTwoElements
List supplyFunctionTwoElements(double Emax, double psiSoil, double krhizomax, double kxylemmax, double n, double alpha, double c, double d, double psiCav, double dE, double psiMax);
RcppExport SEXP _medfate_supplyFunctionTwoElements(SEXP EmaxSEXP, SEXP psiSoilSEXP, SEXP krhizomaxSEXP, SEXP kxylemmaxSEXP, SEXP nSEXP, SEXP alphaSEXP, SEXP cSEXP, SEXP dSEXP, SEXP psiCavSEXP, SEXP dESEXP, SEXP psiMaxSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type Emax(EmaxSEXP);
    Rcpp::traits::input_parameter< double >::type psiSoil(psiSoilSEXP);
    Rcpp::traits::input_parameter< double >::type krhizomax(krhizomaxSEXP);
    Rcpp::traits::input_parameter< double >::type kxylemmax(kxylemmaxSEXP);
    Rcpp::traits::input_parameter< double >::type n(nSEXP);
    Rcpp::traits::input_parameter< double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< double >::type c(cSEXP);
    Rcpp::traits::input_parameter< double >::type d(dSEXP);
    Rcpp::traits::input_parameter< double >::type psiCav(psiCavSEXP);
    Rcpp::traits::input_parameter< double >::type dE(dESEXP);
    Rcpp::traits::input_parameter< double >::type psiMax(psiMaxSEXP);
    rcpp_result_gen = Rcpp::wrap(supplyFunctionTwoElements(Emax, psiSoil, krhizomax, kxylemmax, n, alpha, c, d, psiCav, dE, psiMax));
    return rcpp_result_gen;
END_RCPP
}
// supplyFunctionThreeElements
List supplyFunctionThreeElements(double Emax, double psiSoil, double krhizomax, double kxylemmax, double kleafmax, double n, double alpha, double stemc, double stemd, double leafc, double leafd, double psiCav, double dE, double psiMax);
RcppExport SEXP _medfate_supplyFunctionThreeElements(SEXP EmaxSEXP, SEXP psiSoilSEXP, SEXP krhizomaxSEXP, SEXP kxylemmaxSEXP, SEXP kleafmaxSEXP, SEXP nSEXP, SEXP alphaSEXP, SEXP stemcSEXP, SEXP stemdSEXP, SEXP leafcSEXP, SEXP leafdSEXP, SEXP psiCavSEXP, SEXP dESEXP, SEXP psiMaxSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type Emax(EmaxSEXP);
    Rcpp::traits::input_parameter< double >::type psiSoil(psiSoilSEXP);
    Rcpp::traits::input_parameter< double >::type krhizomax(krhizomaxSEXP);
    Rcpp::traits::input_parameter< double >::type kxylemmax(kxylemmaxSEXP);
    Rcpp::traits::input_parameter< double >::type kleafmax(kleafmaxSEXP);
    Rcpp::traits::input_parameter< double >::type n(nSEXP);
    Rcpp::traits::input_parameter< double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< double >::type stemc(stemcSEXP);
    Rcpp::traits::input_parameter< double >::type stemd(stemdSEXP);
    Rcpp::traits::input_parameter< double >::type leafc(leafcSEXP);
    Rcpp::traits::input_parameter< double >::type leafd(leafdSEXP);
    Rcpp::traits::input_parameter< double >::type psiCav(psiCavSEXP);
    Rcpp::traits::input_parameter< double >::type dE(dESEXP);
    Rcpp::traits::input_parameter< double >::type psiMax(psiMaxSEXP);
    rcpp_result_gen = Rcpp::wrap(supplyFunctionThreeElements(Emax, psiSoil, krhizomax, kxylemmax, kleafmax, n, alpha, stemc, stemd, leafc, leafd, psiCav, dE, psiMax));
    return rcpp_result_gen;
END_RCPP
}
// supplyFunctionBelowground
List supplyFunctionBelowground(List hydraulicNetwork, double minFlow, double pCrit);
RcppExport SEXP _medfate_supplyFunctionBelowground(SEXP hydraulicNetworkSEXP, SEXP minFlowSEXP, SEXP pCritSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type hydraulicNetwork(hydraulicNetworkSEXP);
    Rcpp::traits::input_parameter< double >::type minFlow(minFlowSEXP);
    Rcpp::traits::input_parameter< double >::type pCrit(pCritSEXP);
    rcpp_result_gen = Rcpp::wrap(supplyFunctionBelowground(hydraulicNetwork, minFlow, pCrit));
    return rcpp_result_gen;
END_RCPP
}
// supplyFunctionAboveground
List supplyFunctionAboveground(NumericVector Erootcrown, NumericVector psiRootCrown, List hydraulicNetwork);
RcppExport SEXP _medfate_supplyFunctionAboveground(SEXP ErootcrownSEXP, SEXP psiRootCrownSEXP, SEXP hydraulicNetworkSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type Erootcrown(ErootcrownSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type psiRootCrown(psiRootCrownSEXP);
    Rcpp::traits::input_parameter< List >::type hydraulicNetwork(hydraulicNetworkSEXP);
    rcpp_result_gen = Rcpp::wrap(supplyFunctionAboveground(Erootcrown, psiRootCrown, hydraulicNetwork));
    return rcpp_result_gen;
END_RCPP
}
// supplyFunctionNetwork
List supplyFunctionNetwork(List hydraulicNetwork, double minFlow, double pCrit);
RcppExport SEXP _medfate_supplyFunctionNetwork(SEXP hydraulicNetworkSEXP, SEXP minFlowSEXP, SEXP pCritSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type hydraulicNetwork(hydraulicNetworkSEXP);
    Rcpp::traits::input_parameter< double >::type minFlow(minFlowSEXP);
    Rcpp::traits::input_parameter< double >::type pCrit(pCritSEXP);
    rcpp_result_gen = Rcpp::wrap(supplyFunctionNetwork(hydraulicNetwork, minFlow, pCrit));
    return rcpp_result_gen;
END_RCPP
}
// regulatedPsiXylem
NumericVector regulatedPsiXylem(double E, double psiUpstream, double kxylemmax, double c, double d, double psiStep);
RcppExport SEXP _medfate_regulatedPsiXylem(SEXP ESEXP, SEXP psiUpstreamSEXP, SEXP kxylemmaxSEXP, SEXP cSEXP, SEXP dSEXP, SEXP psiStepSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type E(ESEXP);
    Rcpp::traits::input_parameter< double >::type psiUpstream(psiUpstreamSEXP);
    Rcpp::traits::input_parameter< double >::type kxylemmax(kxylemmaxSEXP);
    Rcpp::traits::input_parameter< double >::type c(cSEXP);
    Rcpp::traits::input_parameter< double >::type d(dSEXP);
    Rcpp::traits::input_parameter< double >::type psiStep(psiStepSEXP);
    rcpp_result_gen = Rcpp::wrap(regulatedPsiXylem(E, psiUpstream, kxylemmax, c, d, psiStep));
    return rcpp_result_gen;
END_RCPP
}
// regulatedPsiTwoElements
NumericVector regulatedPsiTwoElements(double Emax, double psiSoil, double krhizomax, double kxylemmax, double n, double alpha, double c, double d, double dE, double psiMax);
RcppExport SEXP _medfate_regulatedPsiTwoElements(SEXP EmaxSEXP, SEXP psiSoilSEXP, SEXP krhizomaxSEXP, SEXP kxylemmaxSEXP, SEXP nSEXP, SEXP alphaSEXP, SEXP cSEXP, SEXP dSEXP, SEXP dESEXP, SEXP psiMaxSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type Emax(EmaxSEXP);
    Rcpp::traits::input_parameter< double >::type psiSoil(psiSoilSEXP);
    Rcpp::traits::input_parameter< double >::type krhizomax(krhizomaxSEXP);
    Rcpp::traits::input_parameter< double >::type kxylemmax(kxylemmaxSEXP);
    Rcpp::traits::input_parameter< double >::type n(nSEXP);
    Rcpp::traits::input_parameter< double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< double >::type c(cSEXP);
    Rcpp::traits::input_parameter< double >::type d(dSEXP);
    Rcpp::traits::input_parameter< double >::type dE(dESEXP);
    Rcpp::traits::input_parameter< double >::type psiMax(psiMaxSEXP);
    rcpp_result_gen = Rcpp::wrap(regulatedPsiTwoElements(Emax, psiSoil, krhizomax, kxylemmax, n, alpha, c, d, dE, psiMax));
    return rcpp_result_gen;
END_RCPP
}
// maximumSoilPlantConductance
double maximumSoilPlantConductance(NumericVector krhizomax, NumericVector krootmax, double kstemmax, double kleafmax);
RcppExport SEXP _medfate_maximumSoilPlantConductance(SEXP krhizomaxSEXP, SEXP krootmaxSEXP, SEXP kstemmaxSEXP, SEXP kleafmaxSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type krhizomax(krhizomaxSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type krootmax(krootmaxSEXP);
    Rcpp::traits::input_parameter< double >::type kstemmax(kstemmaxSEXP);
    Rcpp::traits::input_parameter< double >::type kleafmax(kleafmaxSEXP);
    rcpp_result_gen = Rcpp::wrap(maximumSoilPlantConductance(krhizomax, krootmax, kstemmax, kleafmax));
    return rcpp_result_gen;
END_RCPP
}
// soilPlantResistancesSigmoid
List soilPlantResistancesSigmoid(NumericVector psiSoil, NumericVector psiRhizo, double psiStem, double PLCstem, double psiLeaf, double PLCleaf, NumericVector krhizomax, NumericVector n, NumericVector alpha, NumericVector krootmax, double root_P50, double root_slope, double kstemmax, double stem_P50, double stem_slope, double kleafmax, double leaf_P50, double leaf_slope);
RcppExport SEXP _medfate_soilPlantResistancesSigmoid(SEXP psiSoilSEXP, SEXP psiRhizoSEXP, SEXP psiStemSEXP, SEXP PLCstemSEXP, SEXP psiLeafSEXP, SEXP PLCleafSEXP, SEXP krhizomaxSEXP, SEXP nSEXP, SEXP alphaSEXP, SEXP krootmaxSEXP, SEXP root_P50SEXP, SEXP root_slopeSEXP, SEXP kstemmaxSEXP, SEXP stem_P50SEXP, SEXP stem_slopeSEXP, SEXP kleafmaxSEXP, SEXP leaf_P50SEXP, SEXP leaf_slopeSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type psiSoil(psiSoilSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type psiRhizo(psiRhizoSEXP);
    Rcpp::traits::input_parameter< double >::type psiStem(psiStemSEXP);
    Rcpp::traits::input_parameter< double >::type PLCstem(PLCstemSEXP);
    Rcpp::traits::input_parameter< double >::type psiLeaf(psiLeafSEXP);
    Rcpp::traits::input_parameter< double >::type PLCleaf(PLCleafSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type krhizomax(krhizomaxSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type n(nSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type krootmax(krootmaxSEXP);
    Rcpp::traits::input_parameter< double >::type root_P50(root_P50SEXP);
    Rcpp::traits::input_parameter< double >::type root_slope(root_slopeSEXP);
    Rcpp::traits::input_parameter< double >::type kstemmax(kstemmaxSEXP);
    Rcpp::traits::input_parameter< double >::type stem_P50(stem_P50SEXP);
    Rcpp::traits::input_parameter< double >::type stem_slope(stem_slopeSEXP);
    Rcpp::traits::input_parameter< double >::type kleafmax(kleafmaxSEXP);
    Rcpp::traits::input_parameter< double >::type leaf_P50(leaf_P50SEXP);
    Rcpp::traits::input_parameter< double >::type leaf_slope(leaf_slopeSEXP);
    rcpp_result_gen = Rcpp::wrap(soilPlantResistancesSigmoid(psiSoil, psiRhizo, psiStem, PLCstem, psiLeaf, PLCleaf, krhizomax, n, alpha, krootmax, root_P50, root_slope, kstemmax, stem_P50, stem_slope, kleafmax, leaf_P50, leaf_slope));
    return rcpp_result_gen;
END_RCPP
}
// soilPlantResistancesWeibull
List soilPlantResistancesWeibull(NumericVector psiSoil, NumericVector psiRhizo, double psiStem, double PLCstem, double psiLeaf, double PLCleaf, NumericVector krhizomax, NumericVector n, NumericVector alpha, NumericVector krootmax, double rootc, double rootd, double kstemmax, double stemc, double stemd, double kleafmax, double leafc, double leafd);
RcppExport SEXP _medfate_soilPlantResistancesWeibull(SEXP psiSoilSEXP, SEXP psiRhizoSEXP, SEXP psiStemSEXP, SEXP PLCstemSEXP, SEXP psiLeafSEXP, SEXP PLCleafSEXP, SEXP krhizomaxSEXP, SEXP nSEXP, SEXP alphaSEXP, SEXP krootmaxSEXP, SEXP rootcSEXP, SEXP rootdSEXP, SEXP kstemmaxSEXP, SEXP stemcSEXP, SEXP stemdSEXP, SEXP kleafmaxSEXP, SEXP leafcSEXP, SEXP leafdSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type psiSoil(psiSoilSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type psiRhizo(psiRhizoSEXP);
    Rcpp::traits::input_parameter< double >::type psiStem(psiStemSEXP);
    Rcpp::traits::input_parameter< double >::type PLCstem(PLCstemSEXP);
    Rcpp::traits::input_parameter< double >::type psiLeaf(psiLeafSEXP);
    Rcpp::traits::input_parameter< double >::type PLCleaf(PLCleafSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type krhizomax(krhizomaxSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type n(nSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type krootmax(krootmaxSEXP);
    Rcpp::traits::input_parameter< double >::type rootc(rootcSEXP);
    Rcpp::traits::input_parameter< double >::type rootd(rootdSEXP);
    Rcpp::traits::input_parameter< double >::type kstemmax(kstemmaxSEXP);
    Rcpp::traits::input_parameter< double >::type stemc(stemcSEXP);
    Rcpp::traits::input_parameter< double >::type stemd(stemdSEXP);
    Rcpp::traits::input_parameter< double >::type kleafmax(kleafmaxSEXP);
    Rcpp::traits::input_parameter< double >::type leafc(leafcSEXP);
    Rcpp::traits::input_parameter< double >::type leafd(leafdSEXP);
    rcpp_result_gen = Rcpp::wrap(soilPlantResistancesWeibull(psiSoil, psiRhizo, psiStem, PLCstem, psiLeaf, PLCleaf, krhizomax, n, alpha, krootmax, rootc, rootd, kstemmax, stemc, stemd, kleafmax, leafc, leafd));
    return rcpp_result_gen;
END_RCPP
}
// rootxylemConductanceProportions
NumericVector rootxylemConductanceProportions(NumericVector L, NumericVector V);
RcppExport SEXP _medfate_rootxylemConductanceProportions(SEXP LSEXP, SEXP VSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type L(LSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type V(VSEXP);
    rcpp_result_gen = Rcpp::wrap(rootxylemConductanceProportions(L, V));
    return rcpp_result_gen;
END_RCPP
}
// Psi2K_c
double Psi2K_c(double psi, double psi_extract, double exp_extract);
RcppExport SEXP _medfate_Psi2K_c(SEXP psiSEXP, SEXP psi_extractSEXP, SEXP exp_extractSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type psi(psiSEXP);
    Rcpp::traits::input_parameter< double >::type psi_extract(psi_extractSEXP);
    Rcpp::traits::input_parameter< double >::type exp_extract(exp_extractSEXP);
    rcpp_result_gen = Rcpp::wrap(Psi2K_c(psi, psi_extract, exp_extract));
    return rcpp_result_gen;
END_RCPP
}
// K2Psi_c
double K2Psi_c(double K, double psi_extract, double exp_extract);
RcppExport SEXP _medfate_K2Psi_c(SEXP KSEXP, SEXP psi_extractSEXP, SEXP exp_extractSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type K(KSEXP);
    Rcpp::traits::input_parameter< double >::type psi_extract(psi_extractSEXP);
    Rcpp::traits::input_parameter< double >::type exp_extract(exp_extractSEXP);
    rcpp_result_gen = Rcpp::wrap(K2Psi_c(K, psi_extract, exp_extract));
    return rcpp_result_gen;
END_RCPP
}
// xylemConductance_c
double xylemConductance_c(double psi, double kxylemmax, double c, double d);
RcppExport SEXP _medfate_xylemConductance_c(SEXP psiSEXP, SEXP kxylemmaxSEXP, SEXP cSEXP, SEXP dSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type psi(psiSEXP);
    Rcpp::traits::input_parameter< double >::type kxylemmax(kxylemmaxSEXP);
    Rcpp::traits::input_parameter< double >::type c(cSEXP);
    Rcpp::traits::input_parameter< double >::type d(dSEXP);
    rcpp_result_gen = Rcpp::wrap(xylemConductance_c(psi, kxylemmax, c, d));
    return rcpp_result_gen;
END_RCPP
}
// xylemConductanceSigmoid_c
double xylemConductanceSigmoid_c(double psi, double kxylemmax, double P50, double slope);
RcppExport SEXP _medfate_xylemConductanceSigmoid_c(SEXP psiSEXP, SEXP kxylemmaxSEXP, SEXP P50SEXP, SEXP slopeSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type psi(psiSEXP);
    Rcpp::traits::input_parameter< double >::type kxylemmax(kxylemmaxSEXP);
    Rcpp::traits::input_parameter< double >::type P50(P50SEXP);
    Rcpp::traits::input_parameter< double >::type slope(slopeSEXP);
    rcpp_result_gen = Rcpp::wrap(xylemConductanceSigmoid_c(psi, kxylemmax, P50, slope));
    return rcpp_result_gen;
END_RCPP
}
// xylemPsi_c
double xylemPsi_c(double kxylem, double kxylemmax, double c, double d);
RcppExport SEXP _medfate_xylemPsi_c(SEXP kxylemSEXP, SEXP kxylemmaxSEXP, SEXP cSEXP, SEXP dSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type kxylem(kxylemSEXP);
    Rcpp::traits::input_parameter< double >::type kxylemmax(kxylemmaxSEXP);
    Rcpp::traits::input_parameter< double >::type c(cSEXP);
    Rcpp::traits::input_parameter< double >::type d(dSEXP);
    rcpp_result_gen = Rcpp::wrap(xylemPsi_c(kxylem, kxylemmax, c, d));
    return rcpp_result_gen;
END_RCPP
}
// psiCrit_c
double psiCrit_c(double c, double d, double pCrit);
RcppExport SEXP _medfate_psiCrit_c(SEXP cSEXP, SEXP dSEXP, SEXP pCritSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type c(cSEXP);
    Rcpp::traits::input_parameter< double >::type d(dSEXP);
    Rcpp::traits::input_parameter< double >::type pCrit(pCritSEXP);
    rcpp_result_gen = Rcpp::wrap(psiCrit_c(c, d, pCrit));
    return rcpp_result_gen;
END_RCPP
}
// vanGenuchtenConductance_c
double vanGenuchtenConductance_c(double psi, double krhizomax, double n, double alpha);
RcppExport SEXP _medfate_vanGenuchtenConductance_c(SEXP psiSEXP, SEXP krhizomaxSEXP, SEXP nSEXP, SEXP alphaSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type psi(psiSEXP);
    Rcpp::traits::input_parameter< double >::type krhizomax(krhizomaxSEXP);
    Rcpp::traits::input_parameter< double >::type n(nSEXP);
    Rcpp::traits::input_parameter< double >::type alpha(alphaSEXP);
    rcpp_result_gen = Rcpp::wrap(vanGenuchtenConductance_c(psi, krhizomax, n, alpha));
    return rcpp_result_gen;
END_RCPP
}
// correctConductanceForViscosity_c
double correctConductanceForViscosity_c(double kxylem, double temp);
RcppExport SEXP _medfate_correctConductanceForViscosity_c(SEXP kxylemSEXP, SEXP tempSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type kxylem(kxylemSEXP);
    Rcpp::traits::input_parameter< double >::type temp(tempSEXP);
    rcpp_result_gen = Rcpp::wrap(correctConductanceForViscosity_c(kxylem, temp));
    return rcpp_result_gen;
END_RCPP
}
// Egamma_c
double Egamma_c(double psi, double kxylemmax, double c, double d, double psiCav);
RcppExport SEXP _medfate_Egamma_c(SEXP psiSEXP, SEXP kxylemmaxSEXP, SEXP cSEXP, SEXP dSEXP, SEXP psiCavSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type psi(psiSEXP);
    Rcpp::traits::input_parameter< double >::type kxylemmax(kxylemmaxSEXP);
    Rcpp::traits::input_parameter< double >::type c(cSEXP);
    Rcpp::traits::input_parameter< double >::type d(dSEXP);
    Rcpp::traits::input_parameter< double >::type psiCav(psiCavSEXP);
    rcpp_result_gen = Rcpp::wrap(Egamma_c(psi, kxylemmax, c, d, psiCav));
    return rcpp_result_gen;
END_RCPP
}
// Egammainv_c
double Egammainv_c(double Eg, double kxylemmax, double c, double d, double psiCav);
RcppExport SEXP _medfate_Egammainv_c(SEXP EgSEXP, SEXP kxylemmaxSEXP, SEXP cSEXP, SEXP dSEXP, SEXP psiCavSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type Eg(EgSEXP);
    Rcpp::traits::input_parameter< double >::type kxylemmax(kxylemmaxSEXP);
    Rcpp::traits::input_parameter< double >::type c(cSEXP);
    Rcpp::traits::input_parameter< double >::type d(dSEXP);
    Rcpp::traits::input_parameter< double >::type psiCav(psiCavSEXP);
    rcpp_result_gen = Rcpp::wrap(Egammainv_c(Eg, kxylemmax, c, d, psiCav));
    return rcpp_result_gen;
END_RCPP
}
// EXylem_c
double EXylem_c(double psiPlant, double psiUpstream, double kxylemmax, double c, double d, bool allowNegativeFlux, double psiCav);
RcppExport SEXP _medfate_EXylem_c(SEXP psiPlantSEXP, SEXP psiUpstreamSEXP, SEXP kxylemmaxSEXP, SEXP cSEXP, SEXP dSEXP, SEXP allowNegativeFluxSEXP, SEXP psiCavSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type psiPlant(psiPlantSEXP);
    Rcpp::traits::input_parameter< double >::type psiUpstream(psiUpstreamSEXP);
    Rcpp::traits::input_parameter< double >::type kxylemmax(kxylemmaxSEXP);
    Rcpp::traits::input_parameter< double >::type c(cSEXP);
    Rcpp::traits::input_parameter< double >::type d(dSEXP);
    Rcpp::traits::input_parameter< bool >::type allowNegativeFlux(allowNegativeFluxSEXP);
    Rcpp::traits::input_parameter< double >::type psiCav(psiCavSEXP);
    rcpp_result_gen = Rcpp::wrap(EXylem_c(psiPlant, psiUpstream, kxylemmax, c, d, allowNegativeFlux, psiCav));
    return rcpp_result_gen;
END_RCPP
}
// E2psiXylem_c
double E2psiXylem_c(double E, double psiUpstream, double kxylemmax, double c, double d, double psiCav);
RcppExport SEXP _medfate_E2psiXylem_c(SEXP ESEXP, SEXP psiUpstreamSEXP, SEXP kxylemmaxSEXP, SEXP cSEXP, SEXP dSEXP, SEXP psiCavSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type E(ESEXP);
    Rcpp::traits::input_parameter< double >::type psiUpstream(psiUpstreamSEXP);
    Rcpp::traits::input_parameter< double >::type kxylemmax(kxylemmaxSEXP);
    Rcpp::traits::input_parameter< double >::type c(cSEXP);
    Rcpp::traits::input_parameter< double >::type d(dSEXP);
    Rcpp::traits::input_parameter< double >::type psiCav(psiCavSEXP);
    rcpp_result_gen = Rcpp::wrap(E2psiXylem_c(E, psiUpstream, kxylemmax, c, d, psiCav));
    return rcpp_result_gen;
END_RCPP
}
// E2psiXylemUp_c
double E2psiXylemUp_c(double E, double psiDownstream, double kxylemmax, double c, double d, double psiCav);
RcppExport SEXP _medfate_E2psiXylemUp_c(SEXP ESEXP, SEXP psiDownstreamSEXP, SEXP kxylemmaxSEXP, SEXP cSEXP, SEXP dSEXP, SEXP psiCavSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type E(ESEXP);
    Rcpp::traits::input_parameter< double >::type psiDownstream(psiDownstreamSEXP);
    Rcpp::traits::input_parameter< double >::type kxylemmax(kxylemmaxSEXP);
    Rcpp::traits::input_parameter< double >::type c(cSEXP);
    Rcpp::traits::input_parameter< double >::type d(dSEXP);
    Rcpp::traits::input_parameter< double >::type psiCav(psiCavSEXP);
    rcpp_result_gen = Rcpp::wrap(E2psiXylemUp_c(E, psiDownstream, kxylemmax, c, d, psiCav));
    return rcpp_result_gen;
END_RCPP
}
// EVanGenuchten_c
double EVanGenuchten_c(double psiRhizo, double psiSoil, double krhizomax, double n, double alpha, double l);
RcppExport SEXP _medfate_EVanGenuchten_c(SEXP psiRhizoSEXP, SEXP psiSoilSEXP, SEXP krhizomaxSEXP, SEXP nSEXP, SEXP alphaSEXP, SEXP lSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type psiRhizo(psiRhizoSEXP);
    Rcpp::traits::input_parameter< double >::type psiSoil(psiSoilSEXP);
    Rcpp::traits::input_parameter< double >::type krhizomax(krhizomaxSEXP);
    Rcpp::traits::input_parameter< double >::type n(nSEXP);
    Rcpp::traits::input_parameter< double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< double >::type l(lSEXP);
    rcpp_result_gen = Rcpp::wrap(EVanGenuchten_c(psiRhizo, psiSoil, krhizomax, n, alpha, l));
    return rcpp_result_gen;
END_RCPP
}
// ECrit_c
double ECrit_c(double psiUpstream, double kxylemmax, double c, double d, double pCrit);
RcppExport SEXP _medfate_ECrit_c(SEXP psiUpstreamSEXP, SEXP kxylemmaxSEXP, SEXP cSEXP, SEXP dSEXP, SEXP pCritSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type psiUpstream(psiUpstreamSEXP);
    Rcpp::traits::input_parameter< double >::type kxylemmax(kxylemmaxSEXP);
    Rcpp::traits::input_parameter< double >::type c(cSEXP);
    Rcpp::traits::input_parameter< double >::type d(dSEXP);
    Rcpp::traits::input_parameter< double >::type pCrit(pCritSEXP);
    rcpp_result_gen = Rcpp::wrap(ECrit_c(psiUpstream, kxylemmax, c, d, pCrit));
    return rcpp_result_gen;
END_RCPP
}
// E2psiVanGenuchten_c
double E2psiVanGenuchten_c(double E, double psiSoil, double krhizomax, double n, double alpha, double psiStep, double psiMax);
RcppExport SEXP _medfate_E2psiVanGenuchten_c(SEXP ESEXP, SEXP psiSoilSEXP, SEXP krhizomaxSEXP, SEXP nSEXP, SEXP alphaSEXP, SEXP psiStepSEXP, SEXP psiMaxSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type E(ESEXP);
    Rcpp::traits::input_parameter< double >::type psiSoil(psiSoilSEXP);
    Rcpp::traits::input_parameter< double >::type krhizomax(krhizomaxSEXP);
    Rcpp::traits::input_parameter< double >::type n(nSEXP);
    Rcpp::traits::input_parameter< double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< double >::type psiStep(psiStepSEXP);
    Rcpp::traits::input_parameter< double >::type psiMax(psiMaxSEXP);
    rcpp_result_gen = Rcpp::wrap(E2psiVanGenuchten_c(E, psiSoil, krhizomax, n, alpha, psiStep, psiMax));
    return rcpp_result_gen;
END_RCPP
}
// E2psiTwoElements_c
double E2psiTwoElements_c(double E, double psiSoil, double krhizomax, double kxylemmax, double n, double alpha, double c, double d, double psiCav, double psiStep, double psiMax);
RcppExport SEXP _medfate_E2psiTwoElements_c(SEXP ESEXP, SEXP psiSoilSEXP, SEXP krhizomaxSEXP, SEXP kxylemmaxSEXP, SEXP nSEXP, SEXP alphaSEXP, SEXP cSEXP, SEXP dSEXP, SEXP psiCavSEXP, SEXP psiStepSEXP, SEXP psiMaxSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type E(ESEXP);
    Rcpp::traits::input_parameter< double >::type psiSoil(psiSoilSEXP);
    Rcpp::traits::input_parameter< double >::type krhizomax(krhizomaxSEXP);
    Rcpp::traits::input_parameter< double >::type kxylemmax(kxylemmaxSEXP);
    Rcpp::traits::input_parameter< double >::type n(nSEXP);
    Rcpp::traits::input_parameter< double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< double >::type c(cSEXP);
    Rcpp::traits::input_parameter< double >::type d(dSEXP);
    Rcpp::traits::input_parameter< double >::type psiCav(psiCavSEXP);
    Rcpp::traits::input_parameter< double >::type psiStep(psiStepSEXP);
    Rcpp::traits::input_parameter< double >::type psiMax(psiMaxSEXP);
    rcpp_result_gen = Rcpp::wrap(E2psiTwoElements_c(E, psiSoil, krhizomax, kxylemmax, n, alpha, c, d, psiCav, psiStep, psiMax));
    return rcpp_result_gen;
END_RCPP
}
// proportionDefoliationSigmoid_c
double proportionDefoliationSigmoid_c(double psiLeaf, double P50, double slope, double PLC_crit, double P50_cv);
RcppExport SEXP _medfate_proportionDefoliationSigmoid_c(SEXP psiLeafSEXP, SEXP P50SEXP, SEXP slopeSEXP, SEXP PLC_critSEXP, SEXP P50_cvSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type psiLeaf(psiLeafSEXP);
    Rcpp::traits::input_parameter< double >::type P50(P50SEXP);
    Rcpp::traits::input_parameter< double >::type slope(slopeSEXP);
    Rcpp::traits::input_parameter< double >::type PLC_crit(PLC_critSEXP);
    Rcpp::traits::input_parameter< double >::type P50_cv(P50_cvSEXP);
    rcpp_result_gen = Rcpp::wrap(proportionDefoliationSigmoid_c(psiLeaf, P50, slope, PLC_crit, P50_cv));
    return rcpp_result_gen;
END_RCPP
}
// proportionDefoliationWeibull_c
double proportionDefoliationWeibull_c(double psiLeaf, double c, double d, double PLC_crit, double P50_cv);
RcppExport SEXP _medfate_proportionDefoliationWeibull_c(SEXP psiLeafSEXP, SEXP cSEXP, SEXP dSEXP, SEXP PLC_critSEXP, SEXP P50_cvSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type psiLeaf(psiLeafSEXP);
    Rcpp::traits::input_parameter< double >::type c(cSEXP);
    Rcpp::traits::input_parameter< double >::type d(dSEXP);
    Rcpp::traits::input_parameter< double >::type PLC_crit(PLC_critSEXP);
    Rcpp::traits::input_parameter< double >::type P50_cv(P50_cvSEXP);
    rcpp_result_gen = Rcpp::wrap(proportionDefoliationWeibull_c(psiLeaf, c, d, PLC_crit, P50_cv));
    return rcpp_result_gen;
END_RCPP
}
// averageRhizosphereResistancePercent_c
double averageRhizosphereResistancePercent_c(double krhizomax, double n, double alpha, double krootmax, double rootc, double rootd, double kstemmax, double stemc, double stemd, double kleafmax, double leafc, double leafd, double psiStep);
RcppExport SEXP _medfate_averageRhizosphereResistancePercent_c(SEXP krhizomaxSEXP, SEXP nSEXP, SEXP alphaSEXP, SEXP krootmaxSEXP, SEXP rootcSEXP, SEXP rootdSEXP, SEXP kstemmaxSEXP, SEXP stemcSEXP, SEXP stemdSEXP, SEXP kleafmaxSEXP, SEXP leafcSEXP, SEXP leafdSEXP, SEXP psiStepSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type krhizomax(krhizomaxSEXP);
    Rcpp::traits::input_parameter< double >::type n(nSEXP);
    Rcpp::traits::input_parameter< double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< double >::type krootmax(krootmaxSEXP);
    Rcpp::traits::input_parameter< double >::type rootc(rootcSEXP);
    Rcpp::traits::input_parameter< double >::type rootd(rootdSEXP);
    Rcpp::traits::input_parameter< double >::type kstemmax(kstemmaxSEXP);
    Rcpp::traits::input_parameter< double >::type stemc(stemcSEXP);
    Rcpp::traits::input_parameter< double >::type stemd(stemdSEXP);
    Rcpp::traits::input_parameter< double >::type kleafmax(kleafmaxSEXP);
    Rcpp::traits::input_parameter< double >::type leafc(leafcSEXP);
    Rcpp::traits::input_parameter< double >::type leafd(leafdSEXP);
    Rcpp::traits::input_parameter< double >::type psiStep(psiStepSEXP);
    rcpp_result_gen = Rcpp::wrap(averageRhizosphereResistancePercent_c(krhizomax, n, alpha, krootmax, rootc, rootd, kstemmax, stemc, stemd, kleafmax, leafc, leafd, psiStep));
    return rcpp_result_gen;
END_RCPP
}
// findRhizosphereMaximumConductance_c
double findRhizosphereMaximumConductance_c(double averageResistancePercent, double n, double alpha, double krootmax, double rootc, double rootd, double kstemmax, double stemc, double stemd, double kleafmax, double leafc, double leafd, double initialValue);
RcppExport SEXP _medfate_findRhizosphereMaximumConductance_c(SEXP averageResistancePercentSEXP, SEXP nSEXP, SEXP alphaSEXP, SEXP krootmaxSEXP, SEXP rootcSEXP, SEXP rootdSEXP, SEXP kstemmaxSEXP, SEXP stemcSEXP, SEXP stemdSEXP, SEXP kleafmaxSEXP, SEXP leafcSEXP, SEXP leafdSEXP, SEXP initialValueSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type averageResistancePercent(averageResistancePercentSEXP);
    Rcpp::traits::input_parameter< double >::type n(nSEXP);
    Rcpp::traits::input_parameter< double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< double >::type krootmax(krootmaxSEXP);
    Rcpp::traits::input_parameter< double >::type rootc(rootcSEXP);
    Rcpp::traits::input_parameter< double >::type rootd(rootdSEXP);
    Rcpp::traits::input_parameter< double >::type kstemmax(kstemmaxSEXP);
    Rcpp::traits::input_parameter< double >::type stemc(stemcSEXP);
    Rcpp::traits::input_parameter< double >::type stemd(stemdSEXP);
    Rcpp::traits::input_parameter< double >::type kleafmax(kleafmaxSEXP);
    Rcpp::traits::input_parameter< double >::type leafc(leafcSEXP);
    Rcpp::traits::input_parameter< double >::type leafd(leafdSEXP);
    Rcpp::traits::input_parameter< double >::type initialValue(initialValueSEXP);
    rcpp_result_gen = Rcpp::wrap(findRhizosphereMaximumConductance_c(averageResistancePercent, n, alpha, krootmax, rootc, rootd, kstemmax, stemc, stemd, kleafmax, leafc, leafd, initialValue));
    return rcpp_result_gen;
END_RCPP
}
// taperFactorSavage_c
double taperFactorSavage_c(double height);
RcppExport SEXP _medfate_taperFactorSavage_c(SEXP heightSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type height(heightSEXP);
    rcpp_result_gen = Rcpp::wrap(taperFactorSavage_c(height));
    return rcpp_result_gen;
END_RCPP
}
// terminalConduitRadius_c
double terminalConduitRadius_c(double height);
RcppExport SEXP _medfate_terminalConduitRadius_c(SEXP heightSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type height(heightSEXP);
    rcpp_result_gen = Rcpp::wrap(terminalConduitRadius_c(height));
    return rcpp_result_gen;
END_RCPP
}
// referenceConductivityHeightFactor_c
double referenceConductivityHeightFactor_c(double refheight, double height);
RcppExport SEXP _medfate_referenceConductivityHeightFactor_c(SEXP refheightSEXP, SEXP heightSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type refheight(refheightSEXP);
    Rcpp::traits::input_parameter< double >::type height(heightSEXP);
    rcpp_result_gen = Rcpp::wrap(referenceConductivityHeightFactor_c(refheight, height));
    return rcpp_result_gen;
END_RCPP
}
// maximumStemHydraulicConductance_c
double maximumStemHydraulicConductance_c(double xylemConductivity, double refheight, double Al2As, double height, bool taper);
RcppExport SEXP _medfate_maximumStemHydraulicConductance_c(SEXP xylemConductivitySEXP, SEXP refheightSEXP, SEXP Al2AsSEXP, SEXP heightSEXP, SEXP taperSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type xylemConductivity(xylemConductivitySEXP);
    Rcpp::traits::input_parameter< double >::type refheight(refheightSEXP);
    Rcpp::traits::input_parameter< double >::type Al2As(Al2AsSEXP);
    Rcpp::traits::input_parameter< double >::type height(heightSEXP);
    Rcpp::traits::input_parameter< bool >::type taper(taperSEXP);
    rcpp_result_gen = Rcpp::wrap(maximumStemHydraulicConductance_c(xylemConductivity, refheight, Al2As, height, taper));
    return rcpp_result_gen;
END_RCPP
}
// rainfallIntensity
double rainfallIntensity(int month, double prec, NumericVector rainfallIntensityPerMonth);
static SEXP _medfate_rainfallIntensity_try(SEXP monthSEXP, SEXP precSEXP, SEXP rainfallIntensityPerMonthSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< int >::type month(monthSEXP);
    Rcpp::traits::input_parameter< double >::type prec(precSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type rainfallIntensityPerMonth(rainfallIntensityPerMonthSEXP);
    rcpp_result_gen = Rcpp::wrap(rainfallIntensity(month, prec, rainfallIntensityPerMonth));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_rainfallIntensity(SEXP monthSEXP, SEXP precSEXP, SEXP rainfallIntensityPerMonthSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_rainfallIntensity_try(monthSEXP, precSEXP, rainfallIntensityPerMonthSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// soilEvaporation
double soilEvaporation(DataFrame soil, double snowpack, String soilFunctions, double pet, double LgroundSWR, bool modifySoil);
static SEXP _medfate_soilEvaporation_try(SEXP soilSEXP, SEXP snowpackSEXP, SEXP soilFunctionsSEXP, SEXP petSEXP, SEXP LgroundSWRSEXP, SEXP modifySoilSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< DataFrame >::type soil(soilSEXP);
    Rcpp::traits::input_parameter< double >::type snowpack(snowpackSEXP);
    Rcpp::traits::input_parameter< String >::type soilFunctions(soilFunctionsSEXP);
    Rcpp::traits::input_parameter< double >::type pet(petSEXP);
    Rcpp::traits::input_parameter< double >::type LgroundSWR(LgroundSWRSEXP);
    Rcpp::traits::input_parameter< bool >::type modifySoil(modifySoilSEXP);
    rcpp_result_gen = Rcpp::wrap(soilEvaporation(soil, snowpack, soilFunctions, pet, LgroundSWR, modifySoil));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_soilEvaporation(SEXP soilSEXP, SEXP snowpackSEXP, SEXP soilFunctionsSEXP, SEXP petSEXP, SEXP LgroundSWRSEXP, SEXP modifySoilSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_soilEvaporation_try(soilSEXP, snowpackSEXP, soilFunctionsSEXP, petSEXP, LgroundSWRSEXP, modifySoilSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// herbaceousTranspiration
NumericVector herbaceousTranspiration(double pet, double LherbSWR, double herbLAI, DataFrame soil, String soilFunctions, bool modifySoil);
static SEXP _medfate_herbaceousTranspiration_try(SEXP petSEXP, SEXP LherbSWRSEXP, SEXP herbLAISEXP, SEXP soilSEXP, SEXP soilFunctionsSEXP, SEXP modifySoilSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< double >::type pet(petSEXP);
    Rcpp::traits::input_parameter< double >::type LherbSWR(LherbSWRSEXP);
    Rcpp::traits::input_parameter< double >::type herbLAI(herbLAISEXP);
    Rcpp::traits::input_parameter< DataFrame >::type soil(soilSEXP);
    Rcpp::traits::input_parameter< String >::type soilFunctions(soilFunctionsSEXP);
    Rcpp::traits::input_parameter< bool >::type modifySoil(modifySoilSEXP);
    rcpp_result_gen = Rcpp::wrap(herbaceousTranspiration(pet, LherbSWR, herbLAI, soil, soilFunctions, modifySoil));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_herbaceousTranspiration(SEXP petSEXP, SEXP LherbSWRSEXP, SEXP herbLAISEXP, SEXP soilSEXP, SEXP soilFunctionsSEXP, SEXP modifySoilSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_herbaceousTranspiration_try(petSEXP, LherbSWRSEXP, herbLAISEXP, soilSEXP, soilFunctionsSEXP, modifySoilSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// infiltrationRepartition
NumericVector infiltrationRepartition(double I, NumericVector widths, NumericVector macro, double a, double b);
static SEXP _medfate_infiltrationRepartition_try(SEXP ISEXP, SEXP widthsSEXP, SEXP macroSEXP, SEXP aSEXP, SEXP bSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< double >::type I(ISEXP);
    Rcpp::traits::input_parameter< NumericVector >::type widths(widthsSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type macro(macroSEXP);
    Rcpp::traits::input_parameter< double >::type a(aSEXP);
    Rcpp::traits::input_parameter< double >::type b(bSEXP);
    rcpp_result_gen = Rcpp::wrap(infiltrationRepartition(I, widths, macro, a, b));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_infiltrationRepartition(SEXP ISEXP, SEXP widthsSEXP, SEXP macroSEXP, SEXP aSEXP, SEXP bSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_infiltrationRepartition_try(ISEXP, widthsSEXP, macroSEXP, aSEXP, bSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// infiltrationAmount
double infiltrationAmount(double rainfallInput, double rainfallIntensity, DataFrame soil, String soilFunctions, String model, double K_correction);
static SEXP _medfate_infiltrationAmount_try(SEXP rainfallInputSEXP, SEXP rainfallIntensitySEXP, SEXP soilSEXP, SEXP soilFunctionsSEXP, SEXP modelSEXP, SEXP K_correctionSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< double >::type rainfallInput(rainfallInputSEXP);
    Rcpp::traits::input_parameter< double >::type rainfallIntensity(rainfallIntensitySEXP);
    Rcpp::traits::input_parameter< DataFrame >::type soil(soilSEXP);
    Rcpp::traits::input_parameter< String >::type soilFunctions(soilFunctionsSEXP);
    Rcpp::traits::input_parameter< String >::type model(modelSEXP);
    Rcpp::traits::input_parameter< double >::type K_correction(K_correctionSEXP);
    rcpp_result_gen = Rcpp::wrap(infiltrationAmount(rainfallInput, rainfallIntensity, soil, soilFunctions, model, K_correction));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_infiltrationAmount(SEXP rainfallInputSEXP, SEXP rainfallIntensitySEXP, SEXP soilSEXP, SEXP soilFunctionsSEXP, SEXP modelSEXP, SEXP K_correctionSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_infiltrationAmount_try(rainfallInputSEXP, rainfallIntensitySEXP, soilSEXP, soilFunctionsSEXP, modelSEXP, K_correctionSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// waterInputs
NumericVector waterInputs(List x, double prec, double rainfallIntensity, double pet, double tday, double rad, double elevation, double Cm, double LgroundPAR, double LgroundSWR, bool modifyInput);
static SEXP _medfate_waterInputs_try(SEXP xSEXP, SEXP precSEXP, SEXP rainfallIntensitySEXP, SEXP petSEXP, SEXP tdaySEXP, SEXP radSEXP, SEXP elevationSEXP, SEXP CmSEXP, SEXP LgroundPARSEXP, SEXP LgroundSWRSEXP, SEXP modifyInputSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< double >::type prec(precSEXP);
    Rcpp::traits::input_parameter< double >::type rainfallIntensity(rainfallIntensitySEXP);
    Rcpp::traits::input_parameter< double >::type pet(petSEXP);
    Rcpp::traits::input_parameter< double >::type tday(tdaySEXP);
    Rcpp::traits::input_parameter< double >::type rad(radSEXP);
    Rcpp::traits::input_parameter< double >::type elevation(elevationSEXP);
    Rcpp::traits::input_parameter< double >::type Cm(CmSEXP);
    Rcpp::traits::input_parameter< double >::type LgroundPAR(LgroundPARSEXP);
    Rcpp::traits::input_parameter< double >::type LgroundSWR(LgroundSWRSEXP);
    Rcpp::traits::input_parameter< bool >::type modifyInput(modifyInputSEXP);
    rcpp_result_gen = Rcpp::wrap(waterInputs(x, prec, rainfallIntensity, pet, tday, rad, elevation, Cm, LgroundPAR, LgroundSWR, modifyInput));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_waterInputs(SEXP xSEXP, SEXP precSEXP, SEXP rainfallIntensitySEXP, SEXP petSEXP, SEXP tdaySEXP, SEXP radSEXP, SEXP elevationSEXP, SEXP CmSEXP, SEXP LgroundPARSEXP, SEXP LgroundSWRSEXP, SEXP modifyInputSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_waterInputs_try(xSEXP, precSEXP, rainfallIntensitySEXP, petSEXP, tdaySEXP, radSEXP, elevationSEXP, CmSEXP, LgroundPARSEXP, LgroundSWRSEXP, modifyInputSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// agricultureWaterInputs
NumericVector agricultureWaterInputs(List x, double prec, double tday, double rad, double elevation, double LgroundSWR, bool modifyInput);
static SEXP _medfate_agricultureWaterInputs_try(SEXP xSEXP, SEXP precSEXP, SEXP tdaySEXP, SEXP radSEXP, SEXP elevationSEXP, SEXP LgroundSWRSEXP, SEXP modifyInputSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< double >::type prec(precSEXP);
    Rcpp::traits::input_parameter< double >::type tday(tdaySEXP);
    Rcpp::traits::input_parameter< double >::type rad(radSEXP);
    Rcpp::traits::input_parameter< double >::type elevation(elevationSEXP);
    Rcpp::traits::input_parameter< double >::type LgroundSWR(LgroundSWRSEXP);
    Rcpp::traits::input_parameter< bool >::type modifyInput(modifyInputSEXP);
    rcpp_result_gen = Rcpp::wrap(agricultureWaterInputs(x, prec, tday, rad, elevation, LgroundSWR, modifyInput));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_agricultureWaterInputs(SEXP xSEXP, SEXP precSEXP, SEXP tdaySEXP, SEXP radSEXP, SEXP elevationSEXP, SEXP LgroundSWRSEXP, SEXP modifyInputSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_agricultureWaterInputs_try(xSEXP, precSEXP, tdaySEXP, radSEXP, elevationSEXP, LgroundSWRSEXP, modifyInputSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// soilWaterBalance
NumericVector soilWaterBalance(DataFrame soil, String soilFunctions, double rainfallInput, double rainfallIntensity, double snowmelt, NumericVector sourceSink, double runon, Nullable<NumericVector> lateralFlows, double waterTableDepth, String infiltrationMode, double infiltrationCorrection, String soilDomains, int nsteps, int max_nsubsteps, bool modifySoil);
static SEXP _medfate_soilWaterBalance_try(SEXP soilSEXP, SEXP soilFunctionsSEXP, SEXP rainfallInputSEXP, SEXP rainfallIntensitySEXP, SEXP snowmeltSEXP, SEXP sourceSinkSEXP, SEXP runonSEXP, SEXP lateralFlowsSEXP, SEXP waterTableDepthSEXP, SEXP infiltrationModeSEXP, SEXP infiltrationCorrectionSEXP, SEXP soilDomainsSEXP, SEXP nstepsSEXP, SEXP max_nsubstepsSEXP, SEXP modifySoilSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< DataFrame >::type soil(soilSEXP);
    Rcpp::traits::input_parameter< String >::type soilFunctions(soilFunctionsSEXP);
    Rcpp::traits::input_parameter< double >::type rainfallInput(rainfallInputSEXP);
    Rcpp::traits::input_parameter< double >::type rainfallIntensity(rainfallIntensitySEXP);
    Rcpp::traits::input_parameter< double >::type snowmelt(snowmeltSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type sourceSink(sourceSinkSEXP);
    Rcpp::traits::input_parameter< double >::type runon(runonSEXP);
    Rcpp::traits::input_parameter< Nullable<NumericVector> >::type lateralFlows(lateralFlowsSEXP);
    Rcpp::traits::input_parameter< double >::type waterTableDepth(waterTableDepthSEXP);
    Rcpp::traits::input_parameter< String >::type infiltrationMode(infiltrationModeSEXP);
    Rcpp::traits::input_parameter< double >::type infiltrationCorrection(infiltrationCorrectionSEXP);
    Rcpp::traits::input_parameter< String >::type soilDomains(soilDomainsSEXP);
    Rcpp::traits::input_parameter< int >::type nsteps(nstepsSEXP);
    Rcpp::traits::input_parameter< int >::type max_nsubsteps(max_nsubstepsSEXP);
    Rcpp::traits::input_parameter< bool >::type modifySoil(modifySoilSEXP);
    rcpp_result_gen = Rcpp::wrap(soilWaterBalance(soil, soilFunctions, rainfallInput, rainfallIntensity, snowmelt, sourceSink, runon, lateralFlows, waterTableDepth, infiltrationMode, infiltrationCorrection, soilDomains, nsteps, max_nsubsteps, modifySoil));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_soilWaterBalance(SEXP soilSEXP, SEXP soilFunctionsSEXP, SEXP rainfallInputSEXP, SEXP rainfallIntensitySEXP, SEXP snowmeltSEXP, SEXP sourceSinkSEXP, SEXP runonSEXP, SEXP lateralFlowsSEXP, SEXP waterTableDepthSEXP, SEXP infiltrationModeSEXP, SEXP infiltrationCorrectionSEXP, SEXP soilDomainsSEXP, SEXP nstepsSEXP, SEXP max_nsubstepsSEXP, SEXP modifySoilSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_soilWaterBalance_try(soilSEXP, soilFunctionsSEXP, rainfallInputSEXP, rainfallIntensitySEXP, snowmeltSEXP, sourceSinkSEXP, runonSEXP, lateralFlowsSEXP, waterTableDepthSEXP, infiltrationModeSEXP, infiltrationCorrectionSEXP, soilDomainsSEXP, nstepsSEXP, max_nsubstepsSEXP, modifySoilSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// soilEvaporationAmount_c
double soilEvaporationAmount_c(double DEF, double PETs, double Gsoil);
static SEXP _medfate_soilEvaporationAmount_c_try(SEXP DEFSEXP, SEXP PETsSEXP, SEXP GsoilSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< double >::type DEF(DEFSEXP);
    Rcpp::traits::input_parameter< double >::type PETs(PETsSEXP);
    Rcpp::traits::input_parameter< double >::type Gsoil(GsoilSEXP);
    rcpp_result_gen = Rcpp::wrap(soilEvaporationAmount_c(DEF, PETs, Gsoil));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_soilEvaporationAmount_c(SEXP DEFSEXP, SEXP PETsSEXP, SEXP GsoilSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_soilEvaporationAmount_c_try(DEFSEXP, PETsSEXP, GsoilSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// interceptionGashDay_c
double interceptionGashDay_c(double Rainfall, double Cm, double p, double ER);
static SEXP _medfate_interceptionGashDay_c_try(SEXP RainfallSEXP, SEXP CmSEXP, SEXP pSEXP, SEXP ERSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< double >::type Rainfall(RainfallSEXP);
    Rcpp::traits::input_parameter< double >::type Cm(CmSEXP);
    Rcpp::traits::input_parameter< double >::type p(pSEXP);
    Rcpp::traits::input_parameter< double >::type ER(ERSEXP);
    rcpp_result_gen = Rcpp::wrap(interceptionGashDay_c(Rainfall, Cm, p, ER));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_interceptionGashDay_c(SEXP RainfallSEXP, SEXP CmSEXP, SEXP pSEXP, SEXP ERSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_interceptionGashDay_c_try(RainfallSEXP, CmSEXP, pSEXP, ERSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// interceptionLiuDay_c
double interceptionLiuDay_c(double Rainfall, double Cm, double p, double ER);
static SEXP _medfate_interceptionLiuDay_c_try(SEXP RainfallSEXP, SEXP CmSEXP, SEXP pSEXP, SEXP ERSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< double >::type Rainfall(RainfallSEXP);
    Rcpp::traits::input_parameter< double >::type Cm(CmSEXP);
    Rcpp::traits::input_parameter< double >::type p(pSEXP);
    Rcpp::traits::input_parameter< double >::type ER(ERSEXP);
    rcpp_result_gen = Rcpp::wrap(interceptionLiuDay_c(Rainfall, Cm, p, ER));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_interceptionLiuDay_c(SEXP RainfallSEXP, SEXP CmSEXP, SEXP pSEXP, SEXP ERSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_interceptionLiuDay_c_try(RainfallSEXP, CmSEXP, pSEXP, ERSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// infiltrationBoughton_c
double infiltrationBoughton_c(double input, double Ssoil);
static SEXP _medfate_infiltrationBoughton_c_try(SEXP inputSEXP, SEXP SsoilSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< double >::type input(inputSEXP);
    Rcpp::traits::input_parameter< double >::type Ssoil(SsoilSEXP);
    rcpp_result_gen = Rcpp::wrap(infiltrationBoughton_c(input, Ssoil));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_infiltrationBoughton_c(SEXP inputSEXP, SEXP SsoilSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_infiltrationBoughton_c_try(inputSEXP, SsoilSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// infitrationGreenAmpt_c
double infitrationGreenAmpt_c(double t, double psi_w, double Ksat, double theta_sat, double theta_dry);
static SEXP _medfate_infitrationGreenAmpt_c_try(SEXP tSEXP, SEXP psi_wSEXP, SEXP KsatSEXP, SEXP theta_satSEXP, SEXP theta_drySEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< double >::type t(tSEXP);
    Rcpp::traits::input_parameter< double >::type psi_w(psi_wSEXP);
    Rcpp::traits::input_parameter< double >::type Ksat(KsatSEXP);
    Rcpp::traits::input_parameter< double >::type theta_sat(theta_satSEXP);
    Rcpp::traits::input_parameter< double >::type theta_dry(theta_drySEXP);
    rcpp_result_gen = Rcpp::wrap(infitrationGreenAmpt_c(t, psi_w, Ksat, theta_sat, theta_dry));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_infitrationGreenAmpt_c(SEXP tSEXP, SEXP psi_wSEXP, SEXP KsatSEXP, SEXP theta_satSEXP, SEXP theta_drySEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_infitrationGreenAmpt_c_try(tSEXP, psi_wSEXP, KsatSEXP, theta_satSEXP, theta_drySEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// snowMelt_c
double snowMelt_c(double tday, double rad, double LgroundSWR, double elevation);
static SEXP _medfate_snowMelt_c_try(SEXP tdaySEXP, SEXP radSEXP, SEXP LgroundSWRSEXP, SEXP elevationSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< double >::type tday(tdaySEXP);
    Rcpp::traits::input_parameter< double >::type rad(radSEXP);
    Rcpp::traits::input_parameter< double >::type LgroundSWR(LgroundSWRSEXP);
    Rcpp::traits::input_parameter< double >::type elevation(elevationSEXP);
    rcpp_result_gen = Rcpp::wrap(snowMelt_c(tday, rad, LgroundSWR, elevation));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_snowMelt_c(SEXP tdaySEXP, SEXP radSEXP, SEXP LgroundSWRSEXP, SEXP elevationSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_snowMelt_c_try(tdaySEXP, radSEXP, LgroundSWRSEXP, elevationSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// gammln_c
double gammln_c(double xx);
RcppExport SEXP _medfate_gammln_c(SEXP xxSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type xx(xxSEXP);
    rcpp_result_gen = Rcpp::wrap(gammln_c(xx));
    return rcpp_result_gen;
END_RCPP
}
// betacf_c
double betacf_c(double a, double b, double x);
RcppExport SEXP _medfate_betacf_c(SEXP aSEXP, SEXP bSEXP, SEXP xSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type a(aSEXP);
    Rcpp::traits::input_parameter< double >::type b(bSEXP);
    Rcpp::traits::input_parameter< double >::type x(xSEXP);
    rcpp_result_gen = Rcpp::wrap(betacf_c(a, b, x));
    return rcpp_result_gen;
END_RCPP
}
// incbeta_c
double incbeta_c(double a, double b, double x);
RcppExport SEXP _medfate_incbeta_c(SEXP aSEXP, SEXP bSEXP, SEXP xSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type a(aSEXP);
    Rcpp::traits::input_parameter< double >::type b(bSEXP);
    Rcpp::traits::input_parameter< double >::type x(xSEXP);
    rcpp_result_gen = Rcpp::wrap(incbeta_c(a, b, x));
    return rcpp_result_gen;
END_RCPP
}
// invincgam_c
double invincgam_c(double a, double p, double q);
RcppExport SEXP _medfate_invincgam_c(SEXP aSEXP, SEXP pSEXP, SEXP qSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type a(aSEXP);
    Rcpp::traits::input_parameter< double >::type p(pSEXP);
    Rcpp::traits::input_parameter< double >::type q(qSEXP);
    rcpp_result_gen = Rcpp::wrap(invincgam_c(a, p, q));
    return rcpp_result_gen;
END_RCPP
}
// gammds_c
double gammds_c(double x, double p);
RcppExport SEXP _medfate_gammds_c(SEXP xSEXP, SEXP pSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type x(xSEXP);
    Rcpp::traits::input_parameter< double >::type p(pSEXP);
    rcpp_result_gen = Rcpp::wrap(gammds_c(x, p));
    return rcpp_result_gen;
END_RCPP
}
// initSperryNetworks
List initSperryNetworks(List x);
RcppExport SEXP _medfate_initSperryNetworks(SEXP xSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    rcpp_result_gen = Rcpp::wrap(initSperryNetworks(x));
    return rcpp_result_gen;
END_RCPP
}
// profitMaximization
List profitMaximization(List supplyFunction, DataFrame photosynthesisFunction, double Gswmin, double Gswmax);
RcppExport SEXP _medfate_profitMaximization(SEXP supplyFunctionSEXP, SEXP photosynthesisFunctionSEXP, SEXP GswminSEXP, SEXP GswmaxSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type supplyFunction(supplyFunctionSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type photosynthesisFunction(photosynthesisFunctionSEXP);
    Rcpp::traits::input_parameter< double >::type Gswmin(GswminSEXP);
    Rcpp::traits::input_parameter< double >::type Gswmax(GswmaxSEXP);
    rcpp_result_gen = Rcpp::wrap(profitMaximization(supplyFunction, photosynthesisFunction, Gswmin, Gswmax));
    return rcpp_result_gen;
END_RCPP
}
// initSureauNetworks
List initSureauNetworks(List x);
RcppExport SEXP _medfate_initSureauNetworks(SEXP xSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    rcpp_result_gen = Rcpp::wrap(initSureauNetworks(x));
    return rcpp_result_gen;
END_RCPP
}
// semi_implicit_integration
List semi_implicit_integration(List network, double dt, NumericVector opt, String stemCavitationRecovery, String leafCavitationRecovery);
RcppExport SEXP _medfate_semi_implicit_integration(SEXP networkSEXP, SEXP dtSEXP, SEXP optSEXP, SEXP stemCavitationRecoverySEXP, SEXP leafCavitationRecoverySEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type network(networkSEXP);
    Rcpp::traits::input_parameter< double >::type dt(dtSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type opt(optSEXP);
    Rcpp::traits::input_parameter< String >::type stemCavitationRecovery(stemCavitationRecoverySEXP);
    Rcpp::traits::input_parameter< String >::type leafCavitationRecovery(leafCavitationRecoverySEXP);
    rcpp_result_gen = Rcpp::wrap(semi_implicit_integration(network, dt, opt, stemCavitationRecovery, leafCavitationRecovery));
    return rcpp_result_gen;
END_RCPP
}
// leafAngleBetaParameters
NumericVector leafAngleBetaParameters(double leafAngle, double leafAngleSD);
RcppExport SEXP _medfate_leafAngleBetaParameters(SEXP leafAngleSEXP, SEXP leafAngleSDSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type leafAngle(leafAngleSEXP);
    Rcpp::traits::input_parameter< double >::type leafAngleSD(leafAngleSDSEXP);
    rcpp_result_gen = Rcpp::wrap(leafAngleBetaParameters(leafAngle, leafAngleSD));
    return rcpp_result_gen;
END_RCPP
}
// layerDirectIrradianceFraction
NumericVector layerDirectIrradianceFraction(NumericMatrix LAIme, NumericMatrix LAImd, NumericMatrix LAImx, NumericVector kb, NumericVector ClumpingIndex, NumericVector alpha, NumericVector gamma, double trunkExtinctionFraction);
RcppExport SEXP _medfate_layerDirectIrradianceFraction(SEXP LAImeSEXP, SEXP LAImdSEXP, SEXP LAImxSEXP, SEXP kbSEXP, SEXP ClumpingIndexSEXP, SEXP alphaSEXP, SEXP gammaSEXP, SEXP trunkExtinctionFractionSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericMatrix >::type LAIme(LAImeSEXP);
    Rcpp::traits::input_parameter< NumericMatrix >::type LAImd(LAImdSEXP);
    Rcpp::traits::input_parameter< NumericMatrix >::type LAImx(LAImxSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type kb(kbSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type ClumpingIndex(ClumpingIndexSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type gamma(gammaSEXP);
    Rcpp::traits::input_parameter< double >::type trunkExtinctionFraction(trunkExtinctionFractionSEXP);
    rcpp_result_gen = Rcpp::wrap(layerDirectIrradianceFraction(LAIme, LAImd, LAImx, kb, ClumpingIndex, alpha, gamma, trunkExtinctionFraction));
    return rcpp_result_gen;
END_RCPP
}
// layerDiffuseIrradianceFraction
NumericMatrix layerDiffuseIrradianceFraction(NumericMatrix LAIme, NumericMatrix LAImd, NumericMatrix LAImx, NumericMatrix K, NumericVector ClumpingIndex, NumericVector ZF, NumericVector alpha, NumericVector gamma, double trunkExtinctionFraction);
RcppExport SEXP _medfate_layerDiffuseIrradianceFraction(SEXP LAImeSEXP, SEXP LAImdSEXP, SEXP LAImxSEXP, SEXP KSEXP, SEXP ClumpingIndexSEXP, SEXP ZFSEXP, SEXP alphaSEXP, SEXP gammaSEXP, SEXP trunkExtinctionFractionSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericMatrix >::type LAIme(LAImeSEXP);
    Rcpp::traits::input_parameter< NumericMatrix >::type LAImd(LAImdSEXP);
    Rcpp::traits::input_parameter< NumericMatrix >::type LAImx(LAImxSEXP);
    Rcpp::traits::input_parameter< NumericMatrix >::type K(KSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type ClumpingIndex(ClumpingIndexSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type ZF(ZFSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type gamma(gammaSEXP);
    Rcpp::traits::input_parameter< double >::type trunkExtinctionFraction(trunkExtinctionFractionSEXP);
    rcpp_result_gen = Rcpp::wrap(layerDiffuseIrradianceFraction(LAIme, LAImd, LAImx, K, ClumpingIndex, ZF, alpha, gamma, trunkExtinctionFraction));
    return rcpp_result_gen;
END_RCPP
}
// cohortSunlitShadeAbsorbedRadiation
List cohortSunlitShadeAbsorbedRadiation(double Ib0, double Id0, NumericMatrix LAIme, NumericMatrix LAImd, NumericMatrix LAImx, NumericVector kb, NumericMatrix K, NumericVector ClumpingIndex, NumericVector ZF, NumericVector alpha, NumericVector gamma, double trunkExtinctionFraction);
RcppExport SEXP _medfate_cohortSunlitShadeAbsorbedRadiation(SEXP Ib0SEXP, SEXP Id0SEXP, SEXP LAImeSEXP, SEXP LAImdSEXP, SEXP LAImxSEXP, SEXP kbSEXP, SEXP KSEXP, SEXP ClumpingIndexSEXP, SEXP ZFSEXP, SEXP alphaSEXP, SEXP gammaSEXP, SEXP trunkExtinctionFractionSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type Ib0(Ib0SEXP);
    Rcpp::traits::input_parameter< double >::type Id0(Id0SEXP);
    Rcpp::traits::input_parameter< NumericMatrix >::type LAIme(LAImeSEXP);
    Rcpp::traits::input_parameter< NumericMatrix >::type LAImd(LAImdSEXP);
    Rcpp::traits::input_parameter< NumericMatrix >::type LAImx(LAImxSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type kb(kbSEXP);
    Rcpp::traits::input_parameter< NumericMatrix >::type K(KSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type ClumpingIndex(ClumpingIndexSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type ZF(ZFSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type gamma(gammaSEXP);
    Rcpp::traits::input_parameter< double >::type trunkExtinctionFraction(trunkExtinctionFractionSEXP);
    rcpp_result_gen = Rcpp::wrap(cohortSunlitShadeAbsorbedRadiation(Ib0, Id0, LAIme, LAImd, LAImx, kb, K, ClumpingIndex, ZF, alpha, gamma, trunkExtinctionFraction));
    return rcpp_result_gen;
END_RCPP
}
// layerSunlitFraction
NumericVector layerSunlitFraction(NumericMatrix LAIme, NumericMatrix LAImd, NumericVector kb, NumericVector ClumpingIndex);
RcppExport SEXP _medfate_layerSunlitFraction(SEXP LAImeSEXP, SEXP LAImdSEXP, SEXP kbSEXP, SEXP ClumpingIndexSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericMatrix >::type LAIme(LAImeSEXP);
    Rcpp::traits::input_parameter< NumericMatrix >::type LAImd(LAImdSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type kb(kbSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type ClumpingIndex(ClumpingIndexSEXP);
    rcpp_result_gen = Rcpp::wrap(layerSunlitFraction(LAIme, LAImd, kb, ClumpingIndex));
    return rcpp_result_gen;
END_RCPP
}
// instantaneousLightExtinctionAbsortion
List instantaneousLightExtinctionAbsortion(NumericMatrix LAIme, NumericMatrix LAImd, NumericMatrix LAImx, NumericVector p, NumericVector q, NumericVector ClumpingIndex, NumericVector alphaSWR, NumericVector gammaSWR, DataFrame ddd, int ntimesteps, double trunkExtinctionFraction);
RcppExport SEXP _medfate_instantaneousLightExtinctionAbsortion(SEXP LAImeSEXP, SEXP LAImdSEXP, SEXP LAImxSEXP, SEXP pSEXP, SEXP qSEXP, SEXP ClumpingIndexSEXP, SEXP alphaSWRSEXP, SEXP gammaSWRSEXP, SEXP dddSEXP, SEXP ntimestepsSEXP, SEXP trunkExtinctionFractionSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericMatrix >::type LAIme(LAImeSEXP);
    Rcpp::traits::input_parameter< NumericMatrix >::type LAImd(LAImdSEXP);
    Rcpp::traits::input_parameter< NumericMatrix >::type LAImx(LAImxSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type p(pSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type q(qSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type ClumpingIndex(ClumpingIndexSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type alphaSWR(alphaSWRSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type gammaSWR(gammaSWRSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type ddd(dddSEXP);
    Rcpp::traits::input_parameter< int >::type ntimesteps(ntimestepsSEXP);
    Rcpp::traits::input_parameter< double >::type trunkExtinctionFraction(trunkExtinctionFractionSEXP);
    rcpp_result_gen = Rcpp::wrap(instantaneousLightExtinctionAbsortion(LAIme, LAImd, LAImx, p, q, ClumpingIndex, alphaSWR, gammaSWR, ddd, ntimesteps, trunkExtinctionFraction));
    return rcpp_result_gen;
END_RCPP
}
// longwaveRadiationSHAW
List longwaveRadiationSHAW(NumericMatrix LAIme, NumericMatrix LAImd, NumericMatrix LAImx, double LWRatm, double Tsoil, NumericVector Tair, double trunkExtinctionFraction);
RcppExport SEXP _medfate_longwaveRadiationSHAW(SEXP LAImeSEXP, SEXP LAImdSEXP, SEXP LAImxSEXP, SEXP LWRatmSEXP, SEXP TsoilSEXP, SEXP TairSEXP, SEXP trunkExtinctionFractionSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericMatrix >::type LAIme(LAImeSEXP);
    Rcpp::traits::input_parameter< NumericMatrix >::type LAImd(LAImdSEXP);
    Rcpp::traits::input_parameter< NumericMatrix >::type LAImx(LAImxSEXP);
    Rcpp::traits::input_parameter< double >::type LWRatm(LWRatmSEXP);
    Rcpp::traits::input_parameter< double >::type Tsoil(TsoilSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type Tair(TairSEXP);
    Rcpp::traits::input_parameter< double >::type trunkExtinctionFraction(trunkExtinctionFractionSEXP);
    rcpp_result_gen = Rcpp::wrap(longwaveRadiationSHAW(LAIme, LAImd, LAImx, LWRatm, Tsoil, Tair, trunkExtinctionFraction));
    return rcpp_result_gen;
END_RCPP
}
// leafAngleCDF_c
double leafAngleCDF_c(double leafAngle, double p, double q);
RcppExport SEXP _medfate_leafAngleCDF_c(SEXP leafAngleSEXP, SEXP pSEXP, SEXP qSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type leafAngle(leafAngleSEXP);
    Rcpp::traits::input_parameter< double >::type p(pSEXP);
    Rcpp::traits::input_parameter< double >::type q(qSEXP);
    rcpp_result_gen = Rcpp::wrap(leafAngleCDF_c(leafAngle, p, q));
    return rcpp_result_gen;
END_RCPP
}
// directionalExtinctionCoefficient_c
double directionalExtinctionCoefficient_c(double p, double q, double solarElevation);
RcppExport SEXP _medfate_directionalExtinctionCoefficient_c(SEXP pSEXP, SEXP qSEXP, SEXP solarElevationSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type p(pSEXP);
    Rcpp::traits::input_parameter< double >::type q(qSEXP);
    Rcpp::traits::input_parameter< double >::type solarElevation(solarElevationSEXP);
    rcpp_result_gen = Rcpp::wrap(directionalExtinctionCoefficient_c(p, q, solarElevation));
    return rcpp_result_gen;
END_RCPP
}
// parcohort
NumericVector parcohort(IntegerVector SP, NumericVector H, NumericVector CR, NumericVector LAI, DataFrame SpParams);
RcppExport SEXP _medfate_parcohort(SEXP SPSEXP, SEXP HSEXP, SEXP CRSEXP, SEXP LAISEXP, SEXP SpParamsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< IntegerVector >::type SP(SPSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type H(HSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type CR(CRSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type LAI(LAISEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    rcpp_result_gen = Rcpp::wrap(parcohort(SP, H, CR, LAI, SpParams));
    return rcpp_result_gen;
END_RCPP
}
// PARcohort
NumericVector PARcohort(List x, DataFrame SpParams, double gdd);
RcppExport SEXP _medfate_PARcohort(SEXP xSEXP, SEXP SpParamsSEXP, SEXP gddSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    Rcpp::traits::input_parameter< double >::type gdd(gddSEXP);
    rcpp_result_gen = Rcpp::wrap(PARcohort(x, SpParams, gdd));
    return rcpp_result_gen;
END_RCPP
}
// parheight
NumericVector parheight(NumericVector z, List x, DataFrame SpParams, double gdd);
RcppExport SEXP _medfate_parheight(SEXP zSEXP, SEXP xSEXP, SEXP SpParamsSEXP, SEXP gddSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type z(zSEXP);
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    Rcpp::traits::input_parameter< double >::type gdd(gddSEXP);
    rcpp_result_gen = Rcpp::wrap(parheight(z, x, SpParams, gdd));
    return rcpp_result_gen;
END_RCPP
}
// PARground
double PARground(List x, DataFrame SpParams, double gdd);
RcppExport SEXP _medfate_PARground(SEXP xSEXP, SEXP SpParamsSEXP, SEXP gddSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    Rcpp::traits::input_parameter< double >::type gdd(gddSEXP);
    rcpp_result_gen = Rcpp::wrap(PARground(x, SpParams, gdd));
    return rcpp_result_gen;
END_RCPP
}
// swrheight
NumericVector swrheight(NumericVector z, List x, DataFrame SpParams, double gdd);
RcppExport SEXP _medfate_swrheight(SEXP zSEXP, SEXP xSEXP, SEXP SpParamsSEXP, SEXP gddSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type z(zSEXP);
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    Rcpp::traits::input_parameter< double >::type gdd(gddSEXP);
    rcpp_result_gen = Rcpp::wrap(swrheight(z, x, SpParams, gdd));
    return rcpp_result_gen;
END_RCPP
}
// SWRground
double SWRground(List x, DataFrame SpParams, double gdd);
RcppExport SEXP _medfate_SWRground(SEXP xSEXP, SEXP SpParamsSEXP, SEXP gddSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    Rcpp::traits::input_parameter< double >::type gdd(gddSEXP);
    rcpp_result_gen = Rcpp::wrap(SWRground(x, SpParams, gdd));
    return rcpp_result_gen;
END_RCPP
}
// parExtinctionProfile
NumericVector parExtinctionProfile(NumericVector z, List x, DataFrame SpParams, double gdd, bool includeHerbs);
RcppExport SEXP _medfate_parExtinctionProfile(SEXP zSEXP, SEXP xSEXP, SEXP SpParamsSEXP, SEXP gddSEXP, SEXP includeHerbsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type z(zSEXP);
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    Rcpp::traits::input_parameter< double >::type gdd(gddSEXP);
    Rcpp::traits::input_parameter< bool >::type includeHerbs(includeHerbsSEXP);
    rcpp_result_gen = Rcpp::wrap(parExtinctionProfile(z, x, SpParams, gdd, includeHerbs));
    return rcpp_result_gen;
END_RCPP
}
// swrExtinctionProfile
NumericVector swrExtinctionProfile(NumericVector z, List x, DataFrame SpParams, double gdd, bool includeHerbs);
RcppExport SEXP _medfate_swrExtinctionProfile(SEXP zSEXP, SEXP xSEXP, SEXP SpParamsSEXP, SEXP gddSEXP, SEXP includeHerbsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type z(zSEXP);
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    Rcpp::traits::input_parameter< double >::type gdd(gddSEXP);
    Rcpp::traits::input_parameter< bool >::type includeHerbs(includeHerbsSEXP);
    rcpp_result_gen = Rcpp::wrap(swrExtinctionProfile(z, x, SpParams, gdd, includeHerbs));
    return rcpp_result_gen;
END_RCPP
}
// cohortAbsorbedSWRFraction
NumericVector cohortAbsorbedSWRFraction(NumericVector z, List x, DataFrame SpParams, double gdd);
RcppExport SEXP _medfate_cohortAbsorbedSWRFraction(SEXP zSEXP, SEXP xSEXP, SEXP SpParamsSEXP, SEXP gddSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type z(zSEXP);
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    Rcpp::traits::input_parameter< double >::type gdd(gddSEXP);
    rcpp_result_gen = Rcpp::wrap(cohortAbsorbedSWRFraction(z, x, SpParams, gdd));
    return rcpp_result_gen;
END_RCPP
}
// paramsBelow
List paramsBelow(DataFrame above, NumericVector Z50, NumericVector Z95, NumericVector Z100, DataFrame soil, DataFrame paramsAnatomydf, DataFrame paramsTranspirationdf, List control);
RcppExport SEXP _medfate_paramsBelow(SEXP aboveSEXP, SEXP Z50SEXP, SEXP Z95SEXP, SEXP Z100SEXP, SEXP soilSEXP, SEXP paramsAnatomydfSEXP, SEXP paramsTranspirationdfSEXP, SEXP controlSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< DataFrame >::type above(aboveSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type Z50(Z50SEXP);
    Rcpp::traits::input_parameter< NumericVector >::type Z95(Z95SEXP);
    Rcpp::traits::input_parameter< NumericVector >::type Z100(Z100SEXP);
    Rcpp::traits::input_parameter< DataFrame >::type soil(soilSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type paramsAnatomydf(paramsAnatomydfSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type paramsTranspirationdf(paramsTranspirationdfSEXP);
    Rcpp::traits::input_parameter< List >::type control(controlSEXP);
    rcpp_result_gen = Rcpp::wrap(paramsBelow(above, Z50, Z95, Z100, soil, paramsAnatomydf, paramsTranspirationdf, control));
    return rcpp_result_gen;
END_RCPP
}
// medfateVersionString
String medfateVersionString();
RcppExport SEXP _medfate_medfateVersionString() {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    rcpp_result_gen = Rcpp::wrap(medfateVersionString());
    return rcpp_result_gen;
END_RCPP
}
// isLowerVersion
bool isLowerVersion(List x);
RcppExport SEXP _medfate_isLowerVersion(SEXP xSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    rcpp_result_gen = Rcpp::wrap(isLowerVersion(x));
    return rcpp_result_gen;
END_RCPP
}
// spwbInputVersionUpdate
void spwbInputVersionUpdate(List x);
RcppExport SEXP _medfate_spwbInputVersionUpdate(SEXP xSEXP) {
BEGIN_RCPP
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    spwbInputVersionUpdate(x);
    return R_NilValue;
END_RCPP
}
// growthInputVersionUpdate
void growthInputVersionUpdate(List x);
RcppExport SEXP _medfate_growthInputVersionUpdate(SEXP xSEXP) {
BEGIN_RCPP
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    growthInputVersionUpdate(x);
    return R_NilValue;
END_RCPP
}
// spwbInputInner
List spwbInputInner(DataFrame above, NumericVector Z50, NumericVector Z95, NumericVector Z100, DataFrame soil, DataFrame FCCSprops, DataFrame SpParams, List control);
RcppExport SEXP _medfate_spwbInputInner(SEXP aboveSEXP, SEXP Z50SEXP, SEXP Z95SEXP, SEXP Z100SEXP, SEXP soilSEXP, SEXP FCCSpropsSEXP, SEXP SpParamsSEXP, SEXP controlSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< DataFrame >::type above(aboveSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type Z50(Z50SEXP);
    Rcpp::traits::input_parameter< NumericVector >::type Z95(Z95SEXP);
    Rcpp::traits::input_parameter< NumericVector >::type Z100(Z100SEXP);
    Rcpp::traits::input_parameter< DataFrame >::type soil(soilSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type FCCSprops(FCCSpropsSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    Rcpp::traits::input_parameter< List >::type control(controlSEXP);
    rcpp_result_gen = Rcpp::wrap(spwbInputInner(above, Z50, Z95, Z100, soil, FCCSprops, SpParams, control));
    return rcpp_result_gen;
END_RCPP
}
// growthInputInner
List growthInputInner(DataFrame above, NumericVector Z50, NumericVector Z95, NumericVector Z100, DataFrame soil, DataFrame snagData, DataFrame litterData, NumericVector SOCData, DataFrame FCCSprops, DataFrame SpParams, List control);
RcppExport SEXP _medfate_growthInputInner(SEXP aboveSEXP, SEXP Z50SEXP, SEXP Z95SEXP, SEXP Z100SEXP, SEXP soilSEXP, SEXP snagDataSEXP, SEXP litterDataSEXP, SEXP SOCDataSEXP, SEXP FCCSpropsSEXP, SEXP SpParamsSEXP, SEXP controlSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< DataFrame >::type above(aboveSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type Z50(Z50SEXP);
    Rcpp::traits::input_parameter< NumericVector >::type Z95(Z95SEXP);
    Rcpp::traits::input_parameter< NumericVector >::type Z100(Z100SEXP);
    Rcpp::traits::input_parameter< DataFrame >::type soil(soilSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type snagData(snagDataSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type litterData(litterDataSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type SOCData(SOCDataSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type FCCSprops(FCCSpropsSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    Rcpp::traits::input_parameter< List >::type control(controlSEXP);
    rcpp_result_gen = Rcpp::wrap(growthInputInner(above, Z50, Z95, Z100, soil, snagData, litterData, SOCData, FCCSprops, SpParams, control));
    return rcpp_result_gen;
END_RCPP
}
// cloneInput
List cloneInput(List input);
RcppExport SEXP _medfate_cloneInput(SEXP inputSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type input(inputSEXP);
    rcpp_result_gen = Rcpp::wrap(cloneInput(input));
    return rcpp_result_gen;
END_RCPP
}
// rootDistributionComplete
DataFrame rootDistributionComplete(List x, DataFrame SpParams, bool fillMissingRootParams, bool truncateRootDistribution);
RcppExport SEXP _medfate_rootDistributionComplete(SEXP xSEXP, SEXP SpParamsSEXP, SEXP fillMissingRootParamsSEXP, SEXP truncateRootDistributionSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    Rcpp::traits::input_parameter< bool >::type fillMissingRootParams(fillMissingRootParamsSEXP);
    Rcpp::traits::input_parameter< bool >::type truncateRootDistribution(truncateRootDistributionSEXP);
    rcpp_result_gen = Rcpp::wrap(rootDistributionComplete(x, SpParams, fillMissingRootParams, truncateRootDistribution));
    return rcpp_result_gen;
END_RCPP
}
// spwbInput
List spwbInput(List x, DataFrame soil, DataFrame SpParams, List control);
RcppExport SEXP _medfate_spwbInput(SEXP xSEXP, SEXP soilSEXP, SEXP SpParamsSEXP, SEXP controlSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type soil(soilSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    Rcpp::traits::input_parameter< List >::type control(controlSEXP);
    rcpp_result_gen = Rcpp::wrap(spwbInput(x, soil, SpParams, control));
    return rcpp_result_gen;
END_RCPP
}
// growthInput
List growthInput(List x, DataFrame soil, DataFrame SpParams, List control);
RcppExport SEXP _medfate_growthInput(SEXP xSEXP, SEXP soilSEXP, SEXP SpParamsSEXP, SEXP controlSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type soil(soilSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    Rcpp::traits::input_parameter< List >::type control(controlSEXP);
    rcpp_result_gen = Rcpp::wrap(growthInput(x, soil, SpParams, control));
    return rcpp_result_gen;
END_RCPP
}
// forest2spwbInput
List forest2spwbInput(List x, DataFrame soil, DataFrame SpParams, List control);
RcppExport SEXP _medfate_forest2spwbInput(SEXP xSEXP, SEXP soilSEXP, SEXP SpParamsSEXP, SEXP controlSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type soil(soilSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    Rcpp::traits::input_parameter< List >::type control(controlSEXP);
    rcpp_result_gen = Rcpp::wrap(forest2spwbInput(x, soil, SpParams, control));
    return rcpp_result_gen;
END_RCPP
}
// forest2growthInput
List forest2growthInput(List x, DataFrame soil, DataFrame SpParams, List control);
RcppExport SEXP _medfate_forest2growthInput(SEXP xSEXP, SEXP soilSEXP, SEXP SpParamsSEXP, SEXP controlSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type soil(soilSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    Rcpp::traits::input_parameter< List >::type control(controlSEXP);
    rcpp_result_gen = Rcpp::wrap(forest2growthInput(x, soil, SpParams, control));
    return rcpp_result_gen;
END_RCPP
}
// resetInputs
void resetInputs(List x);
RcppExport SEXP _medfate_resetInputs(SEXP xSEXP) {
BEGIN_RCPP
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    resetInputs(x);
    return R_NilValue;
END_RCPP
}
// updateBelow
void updateBelow(List x);
RcppExport SEXP _medfate_updateBelow(SEXP xSEXP) {
BEGIN_RCPP
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    updateBelow(x);
    return R_NilValue;
END_RCPP
}
// multiplyInputParam
void multiplyInputParam(List x, String paramType, String paramName, int cohort, double f, bool message);
RcppExport SEXP _medfate_multiplyInputParam(SEXP xSEXP, SEXP paramTypeSEXP, SEXP paramNameSEXP, SEXP cohortSEXP, SEXP fSEXP, SEXP messageSEXP) {
BEGIN_RCPP
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< String >::type paramType(paramTypeSEXP);
    Rcpp::traits::input_parameter< String >::type paramName(paramNameSEXP);
    Rcpp::traits::input_parameter< int >::type cohort(cohortSEXP);
    Rcpp::traits::input_parameter< double >::type f(fSEXP);
    Rcpp::traits::input_parameter< bool >::type message(messageSEXP);
    multiplyInputParam(x, paramType, paramName, cohort, f, message);
    return R_NilValue;
END_RCPP
}
// modifyInputParam
void modifyInputParam(List x, String paramType, String paramName, int cohort, double newValue, bool message);
RcppExport SEXP _medfate_modifyInputParam(SEXP xSEXP, SEXP paramTypeSEXP, SEXP paramNameSEXP, SEXP cohortSEXP, SEXP newValueSEXP, SEXP messageSEXP) {
BEGIN_RCPP
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< String >::type paramType(paramTypeSEXP);
    Rcpp::traits::input_parameter< String >::type paramName(paramNameSEXP);
    Rcpp::traits::input_parameter< int >::type cohort(cohortSEXP);
    Rcpp::traits::input_parameter< double >::type newValue(newValueSEXP);
    Rcpp::traits::input_parameter< bool >::type message(messageSEXP);
    modifyInputParam(x, paramType, paramName, cohort, newValue, message);
    return R_NilValue;
END_RCPP
}
// testModelInputToStructure
NumericVector testModelInputToStructure(List x);
RcppExport SEXP _medfate_testModelInputToStructure(SEXP xSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    rcpp_result_gen = Rcpp::wrap(testModelInputToStructure(x));
    return rcpp_result_gen;
END_RCPP
}
// checkSpeciesParameters
void checkSpeciesParameters(DataFrame SpParams, CharacterVector params);
RcppExport SEXP _medfate_checkSpeciesParameters(SEXP SpParamsSEXP, SEXP paramsSEXP) {
BEGIN_RCPP
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    Rcpp::traits::input_parameter< CharacterVector >::type params(paramsSEXP);
    checkSpeciesParameters(SpParams, params);
    return R_NilValue;
END_RCPP
}
// speciesNumericParameterFromIndex
NumericVector speciesNumericParameterFromIndex(IntegerVector SP, DataFrame SpParams, String parName);
RcppExport SEXP _medfate_speciesNumericParameterFromIndex(SEXP SPSEXP, SEXP SpParamsSEXP, SEXP parNameSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< IntegerVector >::type SP(SPSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    Rcpp::traits::input_parameter< String >::type parName(parNameSEXP);
    rcpp_result_gen = Rcpp::wrap(speciesNumericParameterFromIndex(SP, SpParams, parName));
    return rcpp_result_gen;
END_RCPP
}
// speciesCharacterParameterFromIndex
CharacterVector speciesCharacterParameterFromIndex(IntegerVector SP, DataFrame SpParams, String parName);
RcppExport SEXP _medfate_speciesCharacterParameterFromIndex(SEXP SPSEXP, SEXP SpParamsSEXP, SEXP parNameSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< IntegerVector >::type SP(SPSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    Rcpp::traits::input_parameter< String >::type parName(parNameSEXP);
    rcpp_result_gen = Rcpp::wrap(speciesCharacterParameterFromIndex(SP, SpParams, parName));
    return rcpp_result_gen;
END_RCPP
}
// speciesCharacterParameter
CharacterVector speciesCharacterParameter(CharacterVector species, DataFrame SpParams, String parName);
RcppExport SEXP _medfate_speciesCharacterParameter(SEXP speciesSEXP, SEXP SpParamsSEXP, SEXP parNameSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< CharacterVector >::type species(speciesSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    Rcpp::traits::input_parameter< String >::type parName(parNameSEXP);
    rcpp_result_gen = Rcpp::wrap(speciesCharacterParameter(species, SpParams, parName));
    return rcpp_result_gen;
END_RCPP
}
// cohortCharacterParameter
CharacterVector cohortCharacterParameter(List x, DataFrame SpParams, String parName);
RcppExport SEXP _medfate_cohortCharacterParameter(SEXP xSEXP, SEXP SpParamsSEXP, SEXP parNameSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    Rcpp::traits::input_parameter< String >::type parName(parNameSEXP);
    rcpp_result_gen = Rcpp::wrap(cohortCharacterParameter(x, SpParams, parName));
    return rcpp_result_gen;
END_RCPP
}
// speciesNumericParameterWithImputation
NumericVector speciesNumericParameterWithImputation(CharacterVector species, DataFrame SpParams, String parName, bool fillMissing, bool fillWithGenus);
RcppExport SEXP _medfate_speciesNumericParameterWithImputation(SEXP speciesSEXP, SEXP SpParamsSEXP, SEXP parNameSEXP, SEXP fillMissingSEXP, SEXP fillWithGenusSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< CharacterVector >::type species(speciesSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    Rcpp::traits::input_parameter< String >::type parName(parNameSEXP);
    Rcpp::traits::input_parameter< bool >::type fillMissing(fillMissingSEXP);
    Rcpp::traits::input_parameter< bool >::type fillWithGenus(fillWithGenusSEXP);
    rcpp_result_gen = Rcpp::wrap(speciesNumericParameterWithImputation(species, SpParams, parName, fillMissing, fillWithGenus));
    return rcpp_result_gen;
END_RCPP
}
// cohortNumericParameterWithImputation
NumericVector cohortNumericParameterWithImputation(List x, DataFrame SpParams, String parName, bool fillMissing, bool fillWithGenus);
RcppExport SEXP _medfate_cohortNumericParameterWithImputation(SEXP xSEXP, SEXP SpParamsSEXP, SEXP parNameSEXP, SEXP fillMissingSEXP, SEXP fillWithGenusSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type SpParams(SpParamsSEXP);
    Rcpp::traits::input_parameter< String >::type parName(parNameSEXP);
    Rcpp::traits::input_parameter< bool >::type fillMissing(fillMissingSEXP);
    Rcpp::traits::input_parameter< bool >::type fillWithGenus(fillWithGenusSEXP);
    rcpp_result_gen = Rcpp::wrap(cohortNumericParameterWithImputation(x, SpParams, parName, fillMissing, fillWithGenus));
    return rcpp_result_gen;
END_RCPP
}
// gdd
NumericVector gdd(IntegerVector DOY, NumericVector Temp, double Tbase, double cum);
RcppExport SEXP _medfate_gdd(SEXP DOYSEXP, SEXP TempSEXP, SEXP TbaseSEXP, SEXP cumSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< IntegerVector >::type DOY(DOYSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type Temp(TempSEXP);
    Rcpp::traits::input_parameter< double >::type Tbase(TbaseSEXP);
    Rcpp::traits::input_parameter< double >::type cum(cumSEXP);
    rcpp_result_gen = Rcpp::wrap(gdd(DOY, Temp, Tbase, cum));
    return rcpp_result_gen;
END_RCPP
}
// leafDevelopmentStatus
NumericVector leafDevelopmentStatus(NumericVector Sgdd, NumericVector gdd, double unfoldingDD);
RcppExport SEXP _medfate_leafDevelopmentStatus(SEXP SgddSEXP, SEXP gddSEXP, SEXP unfoldingDDSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type Sgdd(SgddSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type gdd(gddSEXP);
    Rcpp::traits::input_parameter< double >::type unfoldingDD(unfoldingDDSEXP);
    rcpp_result_gen = Rcpp::wrap(leafDevelopmentStatus(Sgdd, gdd, unfoldingDD));
    return rcpp_result_gen;
END_RCPP
}
// leafSenescenceStatus
LogicalVector leafSenescenceStatus(NumericVector Ssen, NumericVector sen);
RcppExport SEXP _medfate_leafSenescenceStatus(SEXP SsenSEXP, SEXP senSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type Ssen(SsenSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type sen(senSEXP);
    rcpp_result_gen = Rcpp::wrap(leafSenescenceStatus(Ssen, sen));
    return rcpp_result_gen;
END_RCPP
}
// updatePhenology
void updatePhenology(List x, int doy, double photoperiod, double tmean);
RcppExport SEXP _medfate_updatePhenology(SEXP xSEXP, SEXP doySEXP, SEXP photoperiodSEXP, SEXP tmeanSEXP) {
BEGIN_RCPP
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< int >::type doy(doySEXP);
    Rcpp::traits::input_parameter< double >::type photoperiod(photoperiodSEXP);
    Rcpp::traits::input_parameter< double >::type tmean(tmeanSEXP);
    updatePhenology(x, doy, photoperiod, tmean);
    return R_NilValue;
END_RCPP
}
// updateLeaves
void updateLeaves(List x, double wind, bool fromGrowthModel);
RcppExport SEXP _medfate_updateLeaves(SEXP xSEXP, SEXP windSEXP, SEXP fromGrowthModelSEXP) {
BEGIN_RCPP
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< double >::type wind(windSEXP);
    Rcpp::traits::input_parameter< bool >::type fromGrowthModel(fromGrowthModelSEXP);
    updateLeaves(x, wind, fromGrowthModel);
    return R_NilValue;
END_RCPP
}
// leafphotosynthesis
NumericVector leafphotosynthesis(double Q, double Catm, double Gc, double Tleaf, double Vmax298, double Jmax298, bool verbose);
RcppExport SEXP _medfate_leafphotosynthesis(SEXP QSEXP, SEXP CatmSEXP, SEXP GcSEXP, SEXP TleafSEXP, SEXP Vmax298SEXP, SEXP Jmax298SEXP, SEXP verboseSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type Q(QSEXP);
    Rcpp::traits::input_parameter< double >::type Catm(CatmSEXP);
    Rcpp::traits::input_parameter< double >::type Gc(GcSEXP);
    Rcpp::traits::input_parameter< double >::type Tleaf(TleafSEXP);
    Rcpp::traits::input_parameter< double >::type Vmax298(Vmax298SEXP);
    Rcpp::traits::input_parameter< double >::type Jmax298(Jmax298SEXP);
    Rcpp::traits::input_parameter< bool >::type verbose(verboseSEXP);
    rcpp_result_gen = Rcpp::wrap(leafphotosynthesis(Q, Catm, Gc, Tleaf, Vmax298, Jmax298, verbose));
    return rcpp_result_gen;
END_RCPP
}
// photosynthesisBaldocchi
NumericVector photosynthesisBaldocchi(double Q, double Catm, double Tleaf, double u, double Vmax298, double Jmax298, double leafWidth, double Gsw_AC_slope, double Gsw_AC_intercept);
RcppExport SEXP _medfate_photosynthesisBaldocchi(SEXP QSEXP, SEXP CatmSEXP, SEXP TleafSEXP, SEXP uSEXP, SEXP Vmax298SEXP, SEXP Jmax298SEXP, SEXP leafWidthSEXP, SEXP Gsw_AC_slopeSEXP, SEXP Gsw_AC_interceptSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type Q(QSEXP);
    Rcpp::traits::input_parameter< double >::type Catm(CatmSEXP);
    Rcpp::traits::input_parameter< double >::type Tleaf(TleafSEXP);
    Rcpp::traits::input_parameter< double >::type u(uSEXP);
    Rcpp::traits::input_parameter< double >::type Vmax298(Vmax298SEXP);
    Rcpp::traits::input_parameter< double >::type Jmax298(Jmax298SEXP);
    Rcpp::traits::input_parameter< double >::type leafWidth(leafWidthSEXP);
    Rcpp::traits::input_parameter< double >::type Gsw_AC_slope(Gsw_AC_slopeSEXP);
    Rcpp::traits::input_parameter< double >::type Gsw_AC_intercept(Gsw_AC_interceptSEXP);
    rcpp_result_gen = Rcpp::wrap(photosynthesisBaldocchi(Q, Catm, Tleaf, u, Vmax298, Jmax298, leafWidth, Gsw_AC_slope, Gsw_AC_intercept));
    return rcpp_result_gen;
END_RCPP
}
// leafPhotosynthesisFunction
DataFrame leafPhotosynthesisFunction(NumericVector E, NumericVector psiLeaf, double Catm, double Patm, double Tair, double vpa, double u, double absRad, double Q, double Vmax298, double Jmax298, double leafWidth, double refLeafArea, bool verbose);
RcppExport SEXP _medfate_leafPhotosynthesisFunction(SEXP ESEXP, SEXP psiLeafSEXP, SEXP CatmSEXP, SEXP PatmSEXP, SEXP TairSEXP, SEXP vpaSEXP, SEXP uSEXP, SEXP absRadSEXP, SEXP QSEXP, SEXP Vmax298SEXP, SEXP Jmax298SEXP, SEXP leafWidthSEXP, SEXP refLeafAreaSEXP, SEXP verboseSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type E(ESEXP);
    Rcpp::traits::input_parameter< NumericVector >::type psiLeaf(psiLeafSEXP);
    Rcpp::traits::input_parameter< double >::type Catm(CatmSEXP);
    Rcpp::traits::input_parameter< double >::type Patm(PatmSEXP);
    Rcpp::traits::input_parameter< double >::type Tair(TairSEXP);
    Rcpp::traits::input_parameter< double >::type vpa(vpaSEXP);
    Rcpp::traits::input_parameter< double >::type u(uSEXP);
    Rcpp::traits::input_parameter< double >::type absRad(absRadSEXP);
    Rcpp::traits::input_parameter< double >::type Q(QSEXP);
    Rcpp::traits::input_parameter< double >::type Vmax298(Vmax298SEXP);
    Rcpp::traits::input_parameter< double >::type Jmax298(Jmax298SEXP);
    Rcpp::traits::input_parameter< double >::type leafWidth(leafWidthSEXP);
    Rcpp::traits::input_parameter< double >::type refLeafArea(refLeafAreaSEXP);
    Rcpp::traits::input_parameter< bool >::type verbose(verboseSEXP);
    rcpp_result_gen = Rcpp::wrap(leafPhotosynthesisFunction(E, psiLeaf, Catm, Patm, Tair, vpa, u, absRad, Q, Vmax298, Jmax298, leafWidth, refLeafArea, verbose));
    return rcpp_result_gen;
END_RCPP
}
// leafPhotosynthesisFunction2
DataFrame leafPhotosynthesisFunction2(NumericVector E, NumericVector psiLeaf, double Catm, double Patm, double Tair, double vpa, double u, double SWRabs, double LWRnet, double Q, double Vmax298, double Jmax298, double leafWidth, double refLeafArea, bool verbose);
RcppExport SEXP _medfate_leafPhotosynthesisFunction2(SEXP ESEXP, SEXP psiLeafSEXP, SEXP CatmSEXP, SEXP PatmSEXP, SEXP TairSEXP, SEXP vpaSEXP, SEXP uSEXP, SEXP SWRabsSEXP, SEXP LWRnetSEXP, SEXP QSEXP, SEXP Vmax298SEXP, SEXP Jmax298SEXP, SEXP leafWidthSEXP, SEXP refLeafAreaSEXP, SEXP verboseSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type E(ESEXP);
    Rcpp::traits::input_parameter< NumericVector >::type psiLeaf(psiLeafSEXP);
    Rcpp::traits::input_parameter< double >::type Catm(CatmSEXP);
    Rcpp::traits::input_parameter< double >::type Patm(PatmSEXP);
    Rcpp::traits::input_parameter< double >::type Tair(TairSEXP);
    Rcpp::traits::input_parameter< double >::type vpa(vpaSEXP);
    Rcpp::traits::input_parameter< double >::type u(uSEXP);
    Rcpp::traits::input_parameter< double >::type SWRabs(SWRabsSEXP);
    Rcpp::traits::input_parameter< double >::type LWRnet(LWRnetSEXP);
    Rcpp::traits::input_parameter< double >::type Q(QSEXP);
    Rcpp::traits::input_parameter< double >::type Vmax298(Vmax298SEXP);
    Rcpp::traits::input_parameter< double >::type Jmax298(Jmax298SEXP);
    Rcpp::traits::input_parameter< double >::type leafWidth(leafWidthSEXP);
    Rcpp::traits::input_parameter< double >::type refLeafArea(refLeafAreaSEXP);
    Rcpp::traits::input_parameter< bool >::type verbose(verboseSEXP);
    rcpp_result_gen = Rcpp::wrap(leafPhotosynthesisFunction2(E, psiLeaf, Catm, Patm, Tair, vpa, u, SWRabs, LWRnet, Q, Vmax298, Jmax298, leafWidth, refLeafArea, verbose));
    return rcpp_result_gen;
END_RCPP
}
// sunshadePhotosynthesisFunction
DataFrame sunshadePhotosynthesisFunction(NumericVector E, NumericVector psiLeaf, double Catm, double Patm, double Tair, double vpa, double SLarea, double SHarea, double u, double absRadSL, double absRadSH, double QSL, double QSH, double Vmax298SL, double Vmax298SH, double Jmax298SL, double Jmax298SH, double leafWidth, bool verbose);
RcppExport SEXP _medfate_sunshadePhotosynthesisFunction(SEXP ESEXP, SEXP psiLeafSEXP, SEXP CatmSEXP, SEXP PatmSEXP, SEXP TairSEXP, SEXP vpaSEXP, SEXP SLareaSEXP, SEXP SHareaSEXP, SEXP uSEXP, SEXP absRadSLSEXP, SEXP absRadSHSEXP, SEXP QSLSEXP, SEXP QSHSEXP, SEXP Vmax298SLSEXP, SEXP Vmax298SHSEXP, SEXP Jmax298SLSEXP, SEXP Jmax298SHSEXP, SEXP leafWidthSEXP, SEXP verboseSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type E(ESEXP);
    Rcpp::traits::input_parameter< NumericVector >::type psiLeaf(psiLeafSEXP);
    Rcpp::traits::input_parameter< double >::type Catm(CatmSEXP);
    Rcpp::traits::input_parameter< double >::type Patm(PatmSEXP);
    Rcpp::traits::input_parameter< double >::type Tair(TairSEXP);
    Rcpp::traits::input_parameter< double >::type vpa(vpaSEXP);
    Rcpp::traits::input_parameter< double >::type SLarea(SLareaSEXP);
    Rcpp::traits::input_parameter< double >::type SHarea(SHareaSEXP);
    Rcpp::traits::input_parameter< double >::type u(uSEXP);
    Rcpp::traits::input_parameter< double >::type absRadSL(absRadSLSEXP);
    Rcpp::traits::input_parameter< double >::type absRadSH(absRadSHSEXP);
    Rcpp::traits::input_parameter< double >::type QSL(QSLSEXP);
    Rcpp::traits::input_parameter< double >::type QSH(QSHSEXP);
    Rcpp::traits::input_parameter< double >::type Vmax298SL(Vmax298SLSEXP);
    Rcpp::traits::input_parameter< double >::type Vmax298SH(Vmax298SHSEXP);
    Rcpp::traits::input_parameter< double >::type Jmax298SL(Jmax298SLSEXP);
    Rcpp::traits::input_parameter< double >::type Jmax298SH(Jmax298SHSEXP);
    Rcpp::traits::input_parameter< double >::type leafWidth(leafWidthSEXP);
    Rcpp::traits::input_parameter< bool >::type verbose(verboseSEXP);
    rcpp_result_gen = Rcpp::wrap(sunshadePhotosynthesisFunction(E, psiLeaf, Catm, Patm, Tair, vpa, SLarea, SHarea, u, absRadSL, absRadSH, QSL, QSH, Vmax298SL, Vmax298SH, Jmax298SL, Jmax298SH, leafWidth, verbose));
    return rcpp_result_gen;
END_RCPP
}
// multilayerPhotosynthesisFunction
DataFrame multilayerPhotosynthesisFunction(NumericVector E, NumericVector psiLeaf, double Catm, double Patm, double Tair, double vpa, NumericVector SLarea, NumericVector SHarea, NumericVector u, NumericVector absRadSL, NumericVector absRadSH, NumericVector QSL, NumericVector QSH, NumericVector Vmax298, NumericVector Jmax298, double leafWidth, bool verbose);
RcppExport SEXP _medfate_multilayerPhotosynthesisFunction(SEXP ESEXP, SEXP psiLeafSEXP, SEXP CatmSEXP, SEXP PatmSEXP, SEXP TairSEXP, SEXP vpaSEXP, SEXP SLareaSEXP, SEXP SHareaSEXP, SEXP uSEXP, SEXP absRadSLSEXP, SEXP absRadSHSEXP, SEXP QSLSEXP, SEXP QSHSEXP, SEXP Vmax298SEXP, SEXP Jmax298SEXP, SEXP leafWidthSEXP, SEXP verboseSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type E(ESEXP);
    Rcpp::traits::input_parameter< NumericVector >::type psiLeaf(psiLeafSEXP);
    Rcpp::traits::input_parameter< double >::type Catm(CatmSEXP);
    Rcpp::traits::input_parameter< double >::type Patm(PatmSEXP);
    Rcpp::traits::input_parameter< double >::type Tair(TairSEXP);
    Rcpp::traits::input_parameter< double >::type vpa(vpaSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type SLarea(SLareaSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type SHarea(SHareaSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type u(uSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type absRadSL(absRadSLSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type absRadSH(absRadSHSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type QSL(QSLSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type QSH(QSHSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type Vmax298(Vmax298SEXP);
    Rcpp::traits::input_parameter< NumericVector >::type Jmax298(Jmax298SEXP);
    Rcpp::traits::input_parameter< double >::type leafWidth(leafWidthSEXP);
    Rcpp::traits::input_parameter< bool >::type verbose(verboseSEXP);
    rcpp_result_gen = Rcpp::wrap(multilayerPhotosynthesisFunction(E, psiLeaf, Catm, Patm, Tair, vpa, SLarea, SHarea, u, absRadSL, absRadSH, QSL, QSH, Vmax298, Jmax298, leafWidth, verbose));
    return rcpp_result_gen;
END_RCPP
}
// gammaTemp_c
double gammaTemp_c(double Tleaf);
RcppExport SEXP _medfate_gammaTemp_c(SEXP TleafSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type Tleaf(TleafSEXP);
    rcpp_result_gen = Rcpp::wrap(gammaTemp_c(Tleaf));
    return rcpp_result_gen;
END_RCPP
}
// KmTemp_c
double KmTemp_c(double Tleaf, double Oi);
RcppExport SEXP _medfate_KmTemp_c(SEXP TleafSEXP, SEXP OiSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type Tleaf(TleafSEXP);
    Rcpp::traits::input_parameter< double >::type Oi(OiSEXP);
    rcpp_result_gen = Rcpp::wrap(KmTemp_c(Tleaf, Oi));
    return rcpp_result_gen;
END_RCPP
}
// VmaxTemp_c
double VmaxTemp_c(double Vmax298, double Tleaf);
RcppExport SEXP _medfate_VmaxTemp_c(SEXP Vmax298SEXP, SEXP TleafSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type Vmax298(Vmax298SEXP);
    Rcpp::traits::input_parameter< double >::type Tleaf(TleafSEXP);
    rcpp_result_gen = Rcpp::wrap(VmaxTemp_c(Vmax298, Tleaf));
    return rcpp_result_gen;
END_RCPP
}
// JmaxTemp_c
double JmaxTemp_c(double Jmax298, double Tleaf);
RcppExport SEXP _medfate_JmaxTemp_c(SEXP Jmax298SEXP, SEXP TleafSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type Jmax298(Jmax298SEXP);
    Rcpp::traits::input_parameter< double >::type Tleaf(TleafSEXP);
    rcpp_result_gen = Rcpp::wrap(JmaxTemp_c(Jmax298, Tleaf));
    return rcpp_result_gen;
END_RCPP
}
// electronLimitedPhotosynthesis_c
double electronLimitedPhotosynthesis_c(double Q, double Ci, double GT, double Jmax);
RcppExport SEXP _medfate_electronLimitedPhotosynthesis_c(SEXP QSEXP, SEXP CiSEXP, SEXP GTSEXP, SEXP JmaxSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type Q(QSEXP);
    Rcpp::traits::input_parameter< double >::type Ci(CiSEXP);
    Rcpp::traits::input_parameter< double >::type GT(GTSEXP);
    Rcpp::traits::input_parameter< double >::type Jmax(JmaxSEXP);
    rcpp_result_gen = Rcpp::wrap(electronLimitedPhotosynthesis_c(Q, Ci, GT, Jmax));
    return rcpp_result_gen;
END_RCPP
}
// rubiscoLimitedPhotosynthesis_c
double rubiscoLimitedPhotosynthesis_c(double Ci, double GT, double Km, double Vmax);
RcppExport SEXP _medfate_rubiscoLimitedPhotosynthesis_c(SEXP CiSEXP, SEXP GTSEXP, SEXP KmSEXP, SEXP VmaxSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type Ci(CiSEXP);
    Rcpp::traits::input_parameter< double >::type GT(GTSEXP);
    Rcpp::traits::input_parameter< double >::type Km(KmSEXP);
    Rcpp::traits::input_parameter< double >::type Vmax(VmaxSEXP);
    rcpp_result_gen = Rcpp::wrap(rubiscoLimitedPhotosynthesis_c(Ci, GT, Km, Vmax));
    return rcpp_result_gen;
END_RCPP
}
// conicDistribution
NumericMatrix conicDistribution(NumericVector Zcone, NumericVector d);
RcppExport SEXP _medfate_conicDistribution(SEXP ZconeSEXP, SEXP dSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type Zcone(ZconeSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type d(dSEXP);
    rcpp_result_gen = Rcpp::wrap(conicDistribution(Zcone, d));
    return rcpp_result_gen;
END_RCPP
}
// ldrDistribution
NumericMatrix ldrDistribution(NumericVector Z50, NumericVector Z95, NumericVector Z100, NumericVector d);
RcppExport SEXP _medfate_ldrDistribution(SEXP Z50SEXP, SEXP Z95SEXP, SEXP Z100SEXP, SEXP dSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type Z50(Z50SEXP);
    Rcpp::traits::input_parameter< NumericVector >::type Z95(Z95SEXP);
    Rcpp::traits::input_parameter< NumericVector >::type Z100(Z100SEXP);
    Rcpp::traits::input_parameter< NumericVector >::type d(dSEXP);
    rcpp_result_gen = Rcpp::wrap(ldrDistribution(Z50, Z95, Z100, d));
    return rcpp_result_gen;
END_RCPP
}
// rootDistribution
NumericMatrix rootDistribution(NumericVector z, List x);
RcppExport SEXP _medfate_rootDistribution(SEXP zSEXP, SEXP xSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type z(zSEXP);
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    rcpp_result_gen = Rcpp::wrap(rootDistribution(z, x));
    return rcpp_result_gen;
END_RCPP
}
// individualRootedGroundArea
NumericMatrix individualRootedGroundArea(NumericVector VolInd, NumericMatrix V, NumericVector d, NumericVector rfc);
RcppExport SEXP _medfate_individualRootedGroundArea(SEXP VolIndSEXP, SEXP VSEXP, SEXP dSEXP, SEXP rfcSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type VolInd(VolIndSEXP);
    Rcpp::traits::input_parameter< NumericMatrix >::type V(VSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type d(dSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type rfc(rfcSEXP);
    rcpp_result_gen = Rcpp::wrap(individualRootedGroundArea(VolInd, V, d, rfc));
    return rcpp_result_gen;
END_RCPP
}
// fineRootAreaIndex
double fineRootAreaIndex(NumericVector Ksoil, NumericVector krhizo, double lai, double specificRootLength, double rootTissueDensity, double rootLengthDensity);
RcppExport SEXP _medfate_fineRootAreaIndex(SEXP KsoilSEXP, SEXP krhizoSEXP, SEXP laiSEXP, SEXP specificRootLengthSEXP, SEXP rootTissueDensitySEXP, SEXP rootLengthDensitySEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type Ksoil(KsoilSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type krhizo(krhizoSEXP);
    Rcpp::traits::input_parameter< double >::type lai(laiSEXP);
    Rcpp::traits::input_parameter< double >::type specificRootLength(specificRootLengthSEXP);
    Rcpp::traits::input_parameter< double >::type rootTissueDensity(rootTissueDensitySEXP);
    Rcpp::traits::input_parameter< double >::type rootLengthDensity(rootLengthDensitySEXP);
    rcpp_result_gen = Rcpp::wrap(fineRootAreaIndex(Ksoil, krhizo, lai, specificRootLength, rootTissueDensity, rootLengthDensity));
    return rcpp_result_gen;
END_RCPP
}
// fineRootBiomassPerIndividual
double fineRootBiomassPerIndividual(NumericVector Ksoil, NumericVector krhizo, double lai, double N, double specificRootLength, double rootTissueDensity, double rootLengthDensity);
RcppExport SEXP _medfate_fineRootBiomassPerIndividual(SEXP KsoilSEXP, SEXP krhizoSEXP, SEXP laiSEXP, SEXP NSEXP, SEXP specificRootLengthSEXP, SEXP rootTissueDensitySEXP, SEXP rootLengthDensitySEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type Ksoil(KsoilSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type krhizo(krhizoSEXP);
    Rcpp::traits::input_parameter< double >::type lai(laiSEXP);
    Rcpp::traits::input_parameter< double >::type N(NSEXP);
    Rcpp::traits::input_parameter< double >::type specificRootLength(specificRootLengthSEXP);
    Rcpp::traits::input_parameter< double >::type rootTissueDensity(rootTissueDensitySEXP);
    Rcpp::traits::input_parameter< double >::type rootLengthDensity(rootLengthDensitySEXP);
    rcpp_result_gen = Rcpp::wrap(fineRootBiomassPerIndividual(Ksoil, krhizo, lai, N, specificRootLength, rootTissueDensity, rootLengthDensity));
    return rcpp_result_gen;
END_RCPP
}
// rhizosphereMaximumConductance
NumericVector rhizosphereMaximumConductance(NumericVector Ksoil, NumericVector fineRootBiomass, double lai, double N, double specificRootLength, double rootTissueDensity, double rootLengthDensity);
RcppExport SEXP _medfate_rhizosphereMaximumConductance(SEXP KsoilSEXP, SEXP fineRootBiomassSEXP, SEXP laiSEXP, SEXP NSEXP, SEXP specificRootLengthSEXP, SEXP rootTissueDensitySEXP, SEXP rootLengthDensitySEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type Ksoil(KsoilSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type fineRootBiomass(fineRootBiomassSEXP);
    Rcpp::traits::input_parameter< double >::type lai(laiSEXP);
    Rcpp::traits::input_parameter< double >::type N(NSEXP);
    Rcpp::traits::input_parameter< double >::type specificRootLength(specificRootLengthSEXP);
    Rcpp::traits::input_parameter< double >::type rootTissueDensity(rootTissueDensitySEXP);
    Rcpp::traits::input_parameter< double >::type rootLengthDensity(rootLengthDensitySEXP);
    rcpp_result_gen = Rcpp::wrap(rhizosphereMaximumConductance(Ksoil, fineRootBiomass, lai, N, specificRootLength, rootTissueDensity, rootLengthDensity));
    return rcpp_result_gen;
END_RCPP
}
// coarseRootSoilVolumeFromConductance
double coarseRootSoilVolumeFromConductance(double Kmax_rootxylem, double VCroot_kmax, double Al2As, NumericVector v, NumericVector d, NumericVector rfc);
RcppExport SEXP _medfate_coarseRootSoilVolumeFromConductance(SEXP Kmax_rootxylemSEXP, SEXP VCroot_kmaxSEXP, SEXP Al2AsSEXP, SEXP vSEXP, SEXP dSEXP, SEXP rfcSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type Kmax_rootxylem(Kmax_rootxylemSEXP);
    Rcpp::traits::input_parameter< double >::type VCroot_kmax(VCroot_kmaxSEXP);
    Rcpp::traits::input_parameter< double >::type Al2As(Al2AsSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type v(vSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type d(dSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type rfc(rfcSEXP);
    rcpp_result_gen = Rcpp::wrap(coarseRootSoilVolumeFromConductance(Kmax_rootxylem, VCroot_kmax, Al2As, v, d, rfc));
    return rcpp_result_gen;
END_RCPP
}
// coarseRootLengthsFromVolume
NumericVector coarseRootLengthsFromVolume(double VolInd, NumericVector v, NumericVector d, NumericVector rfc);
RcppExport SEXP _medfate_coarseRootLengthsFromVolume(SEXP VolIndSEXP, SEXP vSEXP, SEXP dSEXP, SEXP rfcSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type VolInd(VolIndSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type v(vSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type d(dSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type rfc(rfcSEXP);
    rcpp_result_gen = Rcpp::wrap(coarseRootLengthsFromVolume(VolInd, v, d, rfc));
    return rcpp_result_gen;
END_RCPP
}
// coarseRootLengths
NumericVector coarseRootLengths(NumericVector v, NumericVector d, double depthWidthRatio);
RcppExport SEXP _medfate_coarseRootLengths(SEXP vSEXP, SEXP dSEXP, SEXP depthWidthRatioSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type v(vSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type d(dSEXP);
    Rcpp::traits::input_parameter< double >::type depthWidthRatio(depthWidthRatioSEXP);
    rcpp_result_gen = Rcpp::wrap(coarseRootLengths(v, d, depthWidthRatio));
    return rcpp_result_gen;
END_RCPP
}
// coarseRootSoilVolume
double coarseRootSoilVolume(NumericVector v, NumericVector d, double depthWidthRatio);
RcppExport SEXP _medfate_coarseRootSoilVolume(SEXP vSEXP, SEXP dSEXP, SEXP depthWidthRatioSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type v(vSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type d(dSEXP);
    Rcpp::traits::input_parameter< double >::type depthWidthRatio(depthWidthRatioSEXP);
    rcpp_result_gen = Rcpp::wrap(coarseRootSoilVolume(v, d, depthWidthRatio));
    return rcpp_result_gen;
END_RCPP
}
// horizontalProportions
List horizontalProportions(NumericVector poolProportions, NumericVector VolInd, NumericVector N, NumericMatrix V, NumericVector d, NumericVector rfc);
RcppExport SEXP _medfate_horizontalProportions(SEXP poolProportionsSEXP, SEXP VolIndSEXP, SEXP NSEXP, SEXP VSEXP, SEXP dSEXP, SEXP rfcSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type poolProportions(poolProportionsSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type VolInd(VolIndSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type N(NSEXP);
    Rcpp::traits::input_parameter< NumericMatrix >::type V(VSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type d(dSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type rfc(rfcSEXP);
    rcpp_result_gen = Rcpp::wrap(horizontalProportions(poolProportions, VolInd, N, V, d, rfc));
    return rcpp_result_gen;
END_RCPP
}
// fineRootRadius_c
double fineRootRadius_c(double specificRootLength, double rootTissueDensity);
RcppExport SEXP _medfate_fineRootRadius_c(SEXP specificRootLengthSEXP, SEXP rootTissueDensitySEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type specificRootLength(specificRootLengthSEXP);
    Rcpp::traits::input_parameter< double >::type rootTissueDensity(rootTissueDensitySEXP);
    rcpp_result_gen = Rcpp::wrap(fineRootRadius_c(specificRootLength, rootTissueDensity));
    return rcpp_result_gen;
END_RCPP
}
// specificRootSurfaceArea_c
double specificRootSurfaceArea_c(double specificRootLength, double rootTissueDensity);
RcppExport SEXP _medfate_specificRootSurfaceArea_c(SEXP specificRootLengthSEXP, SEXP rootTissueDensitySEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type specificRootLength(specificRootLengthSEXP);
    Rcpp::traits::input_parameter< double >::type rootTissueDensity(rootTissueDensitySEXP);
    rcpp_result_gen = Rcpp::wrap(specificRootSurfaceArea_c(specificRootLength, rootTissueDensity));
    return rcpp_result_gen;
END_RCPP
}
// fineRootSoilVolume_c
double fineRootSoilVolume_c(double fineRootBiomass, double specificRootLength, double rootLengthDensity);
RcppExport SEXP _medfate_fineRootSoilVolume_c(SEXP fineRootBiomassSEXP, SEXP specificRootLengthSEXP, SEXP rootLengthDensitySEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type fineRootBiomass(fineRootBiomassSEXP);
    Rcpp::traits::input_parameter< double >::type specificRootLength(specificRootLengthSEXP);
    Rcpp::traits::input_parameter< double >::type rootLengthDensity(rootLengthDensitySEXP);
    rcpp_result_gen = Rcpp::wrap(fineRootSoilVolume_c(fineRootBiomass, specificRootLength, rootLengthDensity));
    return rcpp_result_gen;
END_RCPP
}
// fineRootHalfDistance_c
double fineRootHalfDistance_c(double rootLengthDensity);
RcppExport SEXP _medfate_fineRootHalfDistance_c(SEXP rootLengthDensitySEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type rootLengthDensity(rootLengthDensitySEXP);
    rcpp_result_gen = Rcpp::wrap(fineRootHalfDistance_c(rootLengthDensity));
    return rcpp_result_gen;
END_RCPP
}
// rhizosphereMaximumConductance_c
std::vector<double> rhizosphereMaximumConductance_c(const std::vector<double>& Ksoil, const std::vector<double>& fineRootBiomass, double lai, double N, double specificRootLength, double rootTissueDensity, double rootLengthDensity);
RcppExport SEXP _medfate_rhizosphereMaximumConductance_c(SEXP KsoilSEXP, SEXP fineRootBiomassSEXP, SEXP laiSEXP, SEXP NSEXP, SEXP specificRootLengthSEXP, SEXP rootTissueDensitySEXP, SEXP rootLengthDensitySEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const std::vector<double>& >::type Ksoil(KsoilSEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type fineRootBiomass(fineRootBiomassSEXP);
    Rcpp::traits::input_parameter< double >::type lai(laiSEXP);
    Rcpp::traits::input_parameter< double >::type N(NSEXP);
    Rcpp::traits::input_parameter< double >::type specificRootLength(specificRootLengthSEXP);
    Rcpp::traits::input_parameter< double >::type rootTissueDensity(rootTissueDensitySEXP);
    Rcpp::traits::input_parameter< double >::type rootLengthDensity(rootLengthDensitySEXP);
    rcpp_result_gen = Rcpp::wrap(rhizosphereMaximumConductance_c(Ksoil, fineRootBiomass, lai, N, specificRootLength, rootTissueDensity, rootLengthDensity));
    return rcpp_result_gen;
END_RCPP
}
// USDAType
String USDAType(double clay, double sand);
static SEXP _medfate_USDAType_try(SEXP claySEXP, SEXP sandSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< double >::type clay(claySEXP);
    Rcpp::traits::input_parameter< double >::type sand(sandSEXP);
    rcpp_result_gen = Rcpp::wrap(USDAType(clay, sand));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_USDAType(SEXP claySEXP, SEXP sandSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_USDAType_try(claySEXP, sandSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// thetaFC
NumericVector thetaFC(DataFrame soil, String model);
static SEXP _medfate_thetaFC_try(SEXP soilSEXP, SEXP modelSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< DataFrame >::type soil(soilSEXP);
    Rcpp::traits::input_parameter< String >::type model(modelSEXP);
    rcpp_result_gen = Rcpp::wrap(thetaFC(soil, model));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_thetaFC(SEXP soilSEXP, SEXP modelSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_thetaFC_try(soilSEXP, modelSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// thetaWP
NumericVector thetaWP(DataFrame soil, String model);
static SEXP _medfate_thetaWP_try(SEXP soilSEXP, SEXP modelSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< DataFrame >::type soil(soilSEXP);
    Rcpp::traits::input_parameter< String >::type model(modelSEXP);
    rcpp_result_gen = Rcpp::wrap(thetaWP(soil, model));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_thetaWP(SEXP soilSEXP, SEXP modelSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_thetaWP_try(soilSEXP, modelSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// thetaSAT
NumericVector thetaSAT(DataFrame soil, String model);
static SEXP _medfate_thetaSAT_try(SEXP soilSEXP, SEXP modelSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< DataFrame >::type soil(soilSEXP);
    Rcpp::traits::input_parameter< String >::type model(modelSEXP);
    rcpp_result_gen = Rcpp::wrap(thetaSAT(soil, model));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_thetaSAT(SEXP soilSEXP, SEXP modelSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_thetaSAT_try(soilSEXP, modelSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// waterFC
NumericVector waterFC(DataFrame soil, String model);
static SEXP _medfate_waterFC_try(SEXP soilSEXP, SEXP modelSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< DataFrame >::type soil(soilSEXP);
    Rcpp::traits::input_parameter< String >::type model(modelSEXP);
    rcpp_result_gen = Rcpp::wrap(waterFC(soil, model));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_waterFC(SEXP soilSEXP, SEXP modelSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_waterFC_try(soilSEXP, modelSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// waterSAT
NumericVector waterSAT(DataFrame soil, String model);
static SEXP _medfate_waterSAT_try(SEXP soilSEXP, SEXP modelSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< DataFrame >::type soil(soilSEXP);
    Rcpp::traits::input_parameter< String >::type model(modelSEXP);
    rcpp_result_gen = Rcpp::wrap(waterSAT(soil, model));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_waterSAT(SEXP soilSEXP, SEXP modelSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_waterSAT_try(soilSEXP, modelSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// waterWP
NumericVector waterWP(DataFrame soil, String model);
static SEXP _medfate_waterWP_try(SEXP soilSEXP, SEXP modelSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< DataFrame >::type soil(soilSEXP);
    Rcpp::traits::input_parameter< String >::type model(modelSEXP);
    rcpp_result_gen = Rcpp::wrap(waterWP(soil, model));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_waterWP(SEXP soilSEXP, SEXP modelSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_waterWP_try(soilSEXP, modelSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// waterPsi
NumericVector waterPsi(DataFrame soil, double psi, String model);
static SEXP _medfate_waterPsi_try(SEXP soilSEXP, SEXP psiSEXP, SEXP modelSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< DataFrame >::type soil(soilSEXP);
    Rcpp::traits::input_parameter< double >::type psi(psiSEXP);
    Rcpp::traits::input_parameter< String >::type model(modelSEXP);
    rcpp_result_gen = Rcpp::wrap(waterPsi(soil, psi, model));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_waterPsi(SEXP soilSEXP, SEXP psiSEXP, SEXP modelSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_waterPsi_try(soilSEXP, psiSEXP, modelSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// waterExtractable
NumericVector waterExtractable(DataFrame soil, String model, double minPsi);
static SEXP _medfate_waterExtractable_try(SEXP soilSEXP, SEXP modelSEXP, SEXP minPsiSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< DataFrame >::type soil(soilSEXP);
    Rcpp::traits::input_parameter< String >::type model(modelSEXP);
    Rcpp::traits::input_parameter< double >::type minPsi(minPsiSEXP);
    rcpp_result_gen = Rcpp::wrap(waterExtractable(soil, model, minPsi));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_waterExtractable(SEXP soilSEXP, SEXP modelSEXP, SEXP minPsiSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_waterExtractable_try(soilSEXP, modelSEXP, minPsiSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// theta
NumericVector theta(DataFrame soil, String model);
static SEXP _medfate_theta_try(SEXP soilSEXP, SEXP modelSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< DataFrame >::type soil(soilSEXP);
    Rcpp::traits::input_parameter< String >::type model(modelSEXP);
    rcpp_result_gen = Rcpp::wrap(theta(soil, model));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_theta(SEXP soilSEXP, SEXP modelSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_theta_try(soilSEXP, modelSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// water
NumericVector water(DataFrame soil, String model);
static SEXP _medfate_water_try(SEXP soilSEXP, SEXP modelSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< DataFrame >::type soil(soilSEXP);
    Rcpp::traits::input_parameter< String >::type model(modelSEXP);
    rcpp_result_gen = Rcpp::wrap(water(soil, model));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_water(SEXP soilSEXP, SEXP modelSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_water_try(soilSEXP, modelSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// rockWeight2Volume
double rockWeight2Volume(double pWeight, double bulkDensity, double rockDensity);
static SEXP _medfate_rockWeight2Volume_try(SEXP pWeightSEXP, SEXP bulkDensitySEXP, SEXP rockDensitySEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< double >::type pWeight(pWeightSEXP);
    Rcpp::traits::input_parameter< double >::type bulkDensity(bulkDensitySEXP);
    Rcpp::traits::input_parameter< double >::type rockDensity(rockDensitySEXP);
    rcpp_result_gen = Rcpp::wrap(rockWeight2Volume(pWeight, bulkDensity, rockDensity));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_rockWeight2Volume(SEXP pWeightSEXP, SEXP bulkDensitySEXP, SEXP rockDensitySEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_rockWeight2Volume_try(pWeightSEXP, bulkDensitySEXP, rockDensitySEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// psi
NumericVector psi(DataFrame soil, String model);
static SEXP _medfate_psi_try(SEXP soilSEXP, SEXP modelSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< DataFrame >::type soil(soilSEXP);
    Rcpp::traits::input_parameter< String >::type model(modelSEXP);
    rcpp_result_gen = Rcpp::wrap(psi(soil, model));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_psi(SEXP soilSEXP, SEXP modelSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_psi_try(soilSEXP, modelSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// conductivity
NumericVector conductivity(DataFrame soil, String model, bool mmol);
static SEXP _medfate_conductivity_try(SEXP soilSEXP, SEXP modelSEXP, SEXP mmolSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< DataFrame >::type soil(soilSEXP);
    Rcpp::traits::input_parameter< String >::type model(modelSEXP);
    Rcpp::traits::input_parameter< bool >::type mmol(mmolSEXP);
    rcpp_result_gen = Rcpp::wrap(conductivity(soil, model, mmol));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_conductivity(SEXP soilSEXP, SEXP modelSEXP, SEXP mmolSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_conductivity_try(soilSEXP, modelSEXP, mmolSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// capacitance
NumericVector capacitance(DataFrame soil, String model);
static SEXP _medfate_capacitance_try(SEXP soilSEXP, SEXP modelSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< DataFrame >::type soil(soilSEXP);
    Rcpp::traits::input_parameter< String >::type model(modelSEXP);
    rcpp_result_gen = Rcpp::wrap(capacitance(soil, model));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_capacitance(SEXP soilSEXP, SEXP modelSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_capacitance_try(soilSEXP, modelSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// saturatedWaterDepth
double saturatedWaterDepth(DataFrame soil, String model);
static SEXP _medfate_saturatedWaterDepth_try(SEXP soilSEXP, SEXP modelSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< DataFrame >::type soil(soilSEXP);
    Rcpp::traits::input_parameter< String >::type model(modelSEXP);
    rcpp_result_gen = Rcpp::wrap(saturatedWaterDepth(soil, model));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_saturatedWaterDepth(SEXP soilSEXP, SEXP modelSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_saturatedWaterDepth_try(soilSEXP, modelSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// vanGenuchtenParamsCarsel
NumericVector vanGenuchtenParamsCarsel(String soilType);
static SEXP _medfate_vanGenuchtenParamsCarsel_try(SEXP soilTypeSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< String >::type soilType(soilTypeSEXP);
    rcpp_result_gen = Rcpp::wrap(vanGenuchtenParamsCarsel(soilType));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_vanGenuchtenParamsCarsel(SEXP soilTypeSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_vanGenuchtenParamsCarsel_try(soilTypeSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// campbellParamsClappHornberger
NumericVector campbellParamsClappHornberger(String soilType);
static SEXP _medfate_campbellParamsClappHornberger_try(SEXP soilTypeSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< String >::type soilType(soilTypeSEXP);
    rcpp_result_gen = Rcpp::wrap(campbellParamsClappHornberger(soilType));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_campbellParamsClappHornberger(SEXP soilTypeSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_campbellParamsClappHornberger_try(soilTypeSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// vanGenuchtenParamsToth
NumericVector vanGenuchtenParamsToth(double clay, double sand, double om, double bd, bool topsoil);
static SEXP _medfate_vanGenuchtenParamsToth_try(SEXP claySEXP, SEXP sandSEXP, SEXP omSEXP, SEXP bdSEXP, SEXP topsoilSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< double >::type clay(claySEXP);
    Rcpp::traits::input_parameter< double >::type sand(sandSEXP);
    Rcpp::traits::input_parameter< double >::type om(omSEXP);
    Rcpp::traits::input_parameter< double >::type bd(bdSEXP);
    Rcpp::traits::input_parameter< bool >::type topsoil(topsoilSEXP);
    rcpp_result_gen = Rcpp::wrap(vanGenuchtenParamsToth(clay, sand, om, bd, topsoil));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_vanGenuchtenParamsToth(SEXP claySEXP, SEXP sandSEXP, SEXP omSEXP, SEXP bdSEXP, SEXP topsoilSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_vanGenuchtenParamsToth_try(claySEXP, sandSEXP, omSEXP, bdSEXP, topsoilSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// soilInit
DataFrame soilInit(DataFrame x, String VG_PTF);
static SEXP _medfate_soilInit_try(SEXP xSEXP, SEXP VG_PTFSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< DataFrame >::type x(xSEXP);
    Rcpp::traits::input_parameter< String >::type VG_PTF(VG_PTFSEXP);
    rcpp_result_gen = Rcpp::wrap(soilInit(x, VG_PTF));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_soilInit(SEXP xSEXP, SEXP VG_PTFSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_soilInit_try(xSEXP, VG_PTFSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// modifySoilLayerParam
void modifySoilLayerParam(DataFrame soil, String paramName, int layer, double newValue, String VG_PTF);
static SEXP _medfate_modifySoilLayerParam_try(SEXP soilSEXP, SEXP paramNameSEXP, SEXP layerSEXP, SEXP newValueSEXP, SEXP VG_PTFSEXP) {
BEGIN_RCPP
    Rcpp::traits::input_parameter< DataFrame >::type soil(soilSEXP);
    Rcpp::traits::input_parameter< String >::type paramName(paramNameSEXP);
    Rcpp::traits::input_parameter< int >::type layer(layerSEXP);
    Rcpp::traits::input_parameter< double >::type newValue(newValueSEXP);
    Rcpp::traits::input_parameter< String >::type VG_PTF(VG_PTFSEXP);
    modifySoilLayerParam(soil, paramName, layer, newValue, VG_PTF);
    return R_NilValue;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_modifySoilLayerParam(SEXP soilSEXP, SEXP paramNameSEXP, SEXP layerSEXP, SEXP newValueSEXP, SEXP VG_PTFSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_modifySoilLayerParam_try(soilSEXP, paramNameSEXP, layerSEXP, newValueSEXP, VG_PTFSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// testSoilDataFrameToStructure
NumericVector testSoilDataFrameToStructure(DataFrame x, String model);
static SEXP _medfate_testSoilDataFrameToStructure_try(SEXP xSEXP, SEXP modelSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< DataFrame >::type x(xSEXP);
    Rcpp::traits::input_parameter< String >::type model(modelSEXP);
    rcpp_result_gen = Rcpp::wrap(testSoilDataFrameToStructure(x, model));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_testSoilDataFrameToStructure(SEXP xSEXP, SEXP modelSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_testSoilDataFrameToStructure_try(xSEXP, modelSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// saturatedConductivitySaxton_c
double saturatedConductivitySaxton_c(double clay, double sand, double bd, double om, bool mmol);
RcppExport SEXP _medfate_saturatedConductivitySaxton_c(SEXP claySEXP, SEXP sandSEXP, SEXP bdSEXP, SEXP omSEXP, SEXP mmolSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type clay(claySEXP);
    Rcpp::traits::input_parameter< double >::type sand(sandSEXP);
    Rcpp::traits::input_parameter< double >::type bd(bdSEXP);
    Rcpp::traits::input_parameter< double >::type om(omSEXP);
    Rcpp::traits::input_parameter< bool >::type mmol(mmolSEXP);
    rcpp_result_gen = Rcpp::wrap(saturatedConductivitySaxton_c(clay, sand, bd, om, mmol));
    return rcpp_result_gen;
END_RCPP
}
// unsaturatedConductivitySaxton_c
double unsaturatedConductivitySaxton_c(double theta, double clay, double sand, double bd, double om, bool mmol);
RcppExport SEXP _medfate_unsaturatedConductivitySaxton_c(SEXP thetaSEXP, SEXP claySEXP, SEXP sandSEXP, SEXP bdSEXP, SEXP omSEXP, SEXP mmolSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type theta(thetaSEXP);
    Rcpp::traits::input_parameter< double >::type clay(claySEXP);
    Rcpp::traits::input_parameter< double >::type sand(sandSEXP);
    Rcpp::traits::input_parameter< double >::type bd(bdSEXP);
    Rcpp::traits::input_parameter< double >::type om(omSEXP);
    Rcpp::traits::input_parameter< bool >::type mmol(mmolSEXP);
    rcpp_result_gen = Rcpp::wrap(unsaturatedConductivitySaxton_c(theta, clay, sand, bd, om, mmol));
    return rcpp_result_gen;
END_RCPP
}
// thetaSATSaxton_c
double thetaSATSaxton_c(double clay, double sand, double om);
RcppExport SEXP _medfate_thetaSATSaxton_c(SEXP claySEXP, SEXP sandSEXP, SEXP omSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type clay(claySEXP);
    Rcpp::traits::input_parameter< double >::type sand(sandSEXP);
    Rcpp::traits::input_parameter< double >::type om(omSEXP);
    rcpp_result_gen = Rcpp::wrap(thetaSATSaxton_c(clay, sand, om));
    return rcpp_result_gen;
END_RCPP
}
// theta2psiSaxton_c
double theta2psiSaxton_c(double clay, double sand, double theta, double om);
RcppExport SEXP _medfate_theta2psiSaxton_c(SEXP claySEXP, SEXP sandSEXP, SEXP thetaSEXP, SEXP omSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type clay(claySEXP);
    Rcpp::traits::input_parameter< double >::type sand(sandSEXP);
    Rcpp::traits::input_parameter< double >::type theta(thetaSEXP);
    Rcpp::traits::input_parameter< double >::type om(omSEXP);
    rcpp_result_gen = Rcpp::wrap(theta2psiSaxton_c(clay, sand, theta, om));
    return rcpp_result_gen;
END_RCPP
}
// psi2thetaSaxton_c
double psi2thetaSaxton_c(double clay, double sand, double psi, double om);
RcppExport SEXP _medfate_psi2thetaSaxton_c(SEXP claySEXP, SEXP sandSEXP, SEXP psiSEXP, SEXP omSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type clay(claySEXP);
    Rcpp::traits::input_parameter< double >::type sand(sandSEXP);
    Rcpp::traits::input_parameter< double >::type psi(psiSEXP);
    Rcpp::traits::input_parameter< double >::type om(omSEXP);
    rcpp_result_gen = Rcpp::wrap(psi2thetaSaxton_c(clay, sand, psi, om));
    return rcpp_result_gen;
END_RCPP
}
// psi2kVanGenuchten_c
double psi2kVanGenuchten_c(double ksat, double n, double alpha, double theta_res, double theta_sat, double psi);
RcppExport SEXP _medfate_psi2kVanGenuchten_c(SEXP ksatSEXP, SEXP nSEXP, SEXP alphaSEXP, SEXP theta_resSEXP, SEXP theta_satSEXP, SEXP psiSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type ksat(ksatSEXP);
    Rcpp::traits::input_parameter< double >::type n(nSEXP);
    Rcpp::traits::input_parameter< double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< double >::type theta_res(theta_resSEXP);
    Rcpp::traits::input_parameter< double >::type theta_sat(theta_satSEXP);
    Rcpp::traits::input_parameter< double >::type psi(psiSEXP);
    rcpp_result_gen = Rcpp::wrap(psi2kVanGenuchten_c(ksat, n, alpha, theta_res, theta_sat, psi));
    return rcpp_result_gen;
END_RCPP
}
// psi2cVanGenuchten_c
double psi2cVanGenuchten_c(double n, double alpha, double theta_res, double theta_sat, double psi);
RcppExport SEXP _medfate_psi2cVanGenuchten_c(SEXP nSEXP, SEXP alphaSEXP, SEXP theta_resSEXP, SEXP theta_satSEXP, SEXP psiSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type n(nSEXP);
    Rcpp::traits::input_parameter< double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< double >::type theta_res(theta_resSEXP);
    Rcpp::traits::input_parameter< double >::type theta_sat(theta_satSEXP);
    Rcpp::traits::input_parameter< double >::type psi(psiSEXP);
    rcpp_result_gen = Rcpp::wrap(psi2cVanGenuchten_c(n, alpha, theta_res, theta_sat, psi));
    return rcpp_result_gen;
END_RCPP
}
// psi2thetaVanGenuchten_c
double psi2thetaVanGenuchten_c(double n, double alpha, double theta_res, double theta_sat, double psi);
RcppExport SEXP _medfate_psi2thetaVanGenuchten_c(SEXP nSEXP, SEXP alphaSEXP, SEXP theta_resSEXP, SEXP theta_satSEXP, SEXP psiSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type n(nSEXP);
    Rcpp::traits::input_parameter< double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< double >::type theta_res(theta_resSEXP);
    Rcpp::traits::input_parameter< double >::type theta_sat(theta_satSEXP);
    Rcpp::traits::input_parameter< double >::type psi(psiSEXP);
    rcpp_result_gen = Rcpp::wrap(psi2thetaVanGenuchten_c(n, alpha, theta_res, theta_sat, psi));
    return rcpp_result_gen;
END_RCPP
}
// theta2psiVanGenuchten_c
double theta2psiVanGenuchten_c(double n, double alpha, double theta_res, double theta_sat, double theta);
RcppExport SEXP _medfate_theta2psiVanGenuchten_c(SEXP nSEXP, SEXP alphaSEXP, SEXP theta_resSEXP, SEXP theta_satSEXP, SEXP thetaSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type n(nSEXP);
    Rcpp::traits::input_parameter< double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< double >::type theta_res(theta_resSEXP);
    Rcpp::traits::input_parameter< double >::type theta_sat(theta_satSEXP);
    Rcpp::traits::input_parameter< double >::type theta(thetaSEXP);
    rcpp_result_gen = Rcpp::wrap(theta2psiVanGenuchten_c(n, alpha, theta_res, theta_sat, theta));
    return rcpp_result_gen;
END_RCPP
}
// thermalCapacity
NumericVector thermalCapacity(DataFrame soil, String model);
static SEXP _medfate_thermalCapacity_try(SEXP soilSEXP, SEXP modelSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< DataFrame >::type soil(soilSEXP);
    Rcpp::traits::input_parameter< String >::type model(modelSEXP);
    rcpp_result_gen = Rcpp::wrap(thermalCapacity(soil, model));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_thermalCapacity(SEXP soilSEXP, SEXP modelSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_thermalCapacity_try(soilSEXP, modelSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// thermalConductivity
NumericVector thermalConductivity(DataFrame soil, String model);
static SEXP _medfate_thermalConductivity_try(SEXP soilSEXP, SEXP modelSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< DataFrame >::type soil(soilSEXP);
    Rcpp::traits::input_parameter< String >::type model(modelSEXP);
    rcpp_result_gen = Rcpp::wrap(thermalConductivity(soil, model));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_thermalConductivity(SEXP soilSEXP, SEXP modelSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_thermalConductivity_try(soilSEXP, modelSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// temperatureGradient
NumericVector temperatureGradient(NumericVector widths, NumericVector Temp);
static SEXP _medfate_temperatureGradient_try(SEXP widthsSEXP, SEXP TempSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< NumericVector >::type widths(widthsSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type Temp(TempSEXP);
    rcpp_result_gen = Rcpp::wrap(temperatureGradient(widths, Temp));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_temperatureGradient(SEXP widthsSEXP, SEXP TempSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_temperatureGradient_try(widthsSEXP, TempSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// temperatureChange
NumericVector temperatureChange(NumericVector widths, NumericVector Temp, NumericVector sand, NumericVector clay, NumericVector W, NumericVector Theta_SAT, NumericVector Theta_FC, double Gdown, double tstep);
static SEXP _medfate_temperatureChange_try(SEXP widthsSEXP, SEXP TempSEXP, SEXP sandSEXP, SEXP claySEXP, SEXP WSEXP, SEXP Theta_SATSEXP, SEXP Theta_FCSEXP, SEXP GdownSEXP, SEXP tstepSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< NumericVector >::type widths(widthsSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type Temp(TempSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type sand(sandSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type clay(claySEXP);
    Rcpp::traits::input_parameter< NumericVector >::type W(WSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type Theta_SAT(Theta_SATSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type Theta_FC(Theta_FCSEXP);
    Rcpp::traits::input_parameter< double >::type Gdown(GdownSEXP);
    Rcpp::traits::input_parameter< double >::type tstep(tstepSEXP);
    rcpp_result_gen = Rcpp::wrap(temperatureChange(widths, Temp, sand, clay, W, Theta_SAT, Theta_FC, Gdown, tstep));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_temperatureChange(SEXP widthsSEXP, SEXP TempSEXP, SEXP sandSEXP, SEXP claySEXP, SEXP WSEXP, SEXP Theta_SATSEXP, SEXP Theta_FCSEXP, SEXP GdownSEXP, SEXP tstepSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_temperatureChange_try(widthsSEXP, TempSEXP, sandSEXP, claySEXP, WSEXP, Theta_SATSEXP, Theta_FCSEXP, GdownSEXP, tstepSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// temperatureGradient_c
void temperatureGradient_c(std::vector<double>& gradTemp, const std::vector<double>& widths, const std::vector<double>& Temp);
static SEXP _medfate_temperatureGradient_c_try(SEXP gradTempSEXP, SEXP widthsSEXP, SEXP TempSEXP) {
BEGIN_RCPP
    Rcpp::traits::input_parameter< std::vector<double>& >::type gradTemp(gradTempSEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type widths(widthsSEXP);
    Rcpp::traits::input_parameter< const std::vector<double>& >::type Temp(TempSEXP);
    temperatureGradient_c(gradTemp, widths, Temp);
    return R_NilValue;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_temperatureGradient_c(SEXP gradTempSEXP, SEXP widthsSEXP, SEXP TempSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_temperatureGradient_c_try(gradTempSEXP, widthsSEXP, TempSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// getWeatherDates
CharacterVector getWeatherDates(DataFrame meteo);
static SEXP _medfate_getWeatherDates_try(SEXP meteoSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< DataFrame >::type meteo(meteoSEXP);
    rcpp_result_gen = Rcpp::wrap(getWeatherDates(meteo));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_getWeatherDates(SEXP meteoSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_getWeatherDates_try(meteoSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// defineSPWBDailyOutput
List defineSPWBDailyOutput(double latitude, double elevation, double slope, double aspect, CharacterVector dateStrings, List x);
static SEXP _medfate_defineSPWBDailyOutput_try(SEXP latitudeSEXP, SEXP elevationSEXP, SEXP slopeSEXP, SEXP aspectSEXP, SEXP dateStringsSEXP, SEXP xSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< double >::type latitude(latitudeSEXP);
    Rcpp::traits::input_parameter< double >::type elevation(elevationSEXP);
    Rcpp::traits::input_parameter< double >::type slope(slopeSEXP);
    Rcpp::traits::input_parameter< double >::type aspect(aspectSEXP);
    Rcpp::traits::input_parameter< CharacterVector >::type dateStrings(dateStringsSEXP);
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    rcpp_result_gen = Rcpp::wrap(defineSPWBDailyOutput(latitude, elevation, slope, aspect, dateStrings, x));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_defineSPWBDailyOutput(SEXP latitudeSEXP, SEXP elevationSEXP, SEXP slopeSEXP, SEXP aspectSEXP, SEXP dateStringsSEXP, SEXP xSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_defineSPWBDailyOutput_try(latitudeSEXP, elevationSEXP, slopeSEXP, aspectSEXP, dateStringsSEXP, xSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// fillSPWBDailyOutput
void fillSPWBDailyOutput(List l, List x, List sDay, int iday);
static SEXP _medfate_fillSPWBDailyOutput_try(SEXP lSEXP, SEXP xSEXP, SEXP sDaySEXP, SEXP idaySEXP) {
BEGIN_RCPP
    Rcpp::traits::input_parameter< List >::type l(lSEXP);
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< List >::type sDay(sDaySEXP);
    Rcpp::traits::input_parameter< int >::type iday(idaySEXP);
    fillSPWBDailyOutput(l, x, sDay, iday);
    return R_NilValue;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_fillSPWBDailyOutput(SEXP lSEXP, SEXP xSEXP, SEXP sDaySEXP, SEXP idaySEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_fillSPWBDailyOutput_try(lSEXP, xSEXP, sDaySEXP, idaySEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// spwb
List spwb(List x, DataFrame meteo, double latitude, double elevation, double slope, double aspect, NumericVector CO2ByYear, double waterTableDepth);
static SEXP _medfate_spwb_try(SEXP xSEXP, SEXP meteoSEXP, SEXP latitudeSEXP, SEXP elevationSEXP, SEXP slopeSEXP, SEXP aspectSEXP, SEXP CO2ByYearSEXP, SEXP waterTableDepthSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type meteo(meteoSEXP);
    Rcpp::traits::input_parameter< double >::type latitude(latitudeSEXP);
    Rcpp::traits::input_parameter< double >::type elevation(elevationSEXP);
    Rcpp::traits::input_parameter< double >::type slope(slopeSEXP);
    Rcpp::traits::input_parameter< double >::type aspect(aspectSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type CO2ByYear(CO2ByYearSEXP);
    Rcpp::traits::input_parameter< double >::type waterTableDepth(waterTableDepthSEXP);
    rcpp_result_gen = Rcpp::wrap(spwb(x, meteo, latitude, elevation, slope, aspect, CO2ByYear, waterTableDepth));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_spwb(SEXP xSEXP, SEXP meteoSEXP, SEXP latitudeSEXP, SEXP elevationSEXP, SEXP slopeSEXP, SEXP aspectSEXP, SEXP CO2ByYearSEXP, SEXP waterTableDepthSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_spwb_try(xSEXP, meteoSEXP, latitudeSEXP, elevationSEXP, slopeSEXP, aspectSEXP, CO2ByYearSEXP, waterTableDepthSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// pwb
List pwb(List x, DataFrame meteo, NumericMatrix W, double latitude, double elevation, double slope, double aspect, NumericVector canopyEvaporation, NumericVector snowMelt, NumericVector soilEvaporation, NumericVector herbTranspiration, NumericVector CO2ByYear);
static SEXP _medfate_pwb_try(SEXP xSEXP, SEXP meteoSEXP, SEXP WSEXP, SEXP latitudeSEXP, SEXP elevationSEXP, SEXP slopeSEXP, SEXP aspectSEXP, SEXP canopyEvaporationSEXP, SEXP snowMeltSEXP, SEXP soilEvaporationSEXP, SEXP herbTranspirationSEXP, SEXP CO2ByYearSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type meteo(meteoSEXP);
    Rcpp::traits::input_parameter< NumericMatrix >::type W(WSEXP);
    Rcpp::traits::input_parameter< double >::type latitude(latitudeSEXP);
    Rcpp::traits::input_parameter< double >::type elevation(elevationSEXP);
    Rcpp::traits::input_parameter< double >::type slope(slopeSEXP);
    Rcpp::traits::input_parameter< double >::type aspect(aspectSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type canopyEvaporation(canopyEvaporationSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type snowMelt(snowMeltSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type soilEvaporation(soilEvaporationSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type herbTranspiration(herbTranspirationSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type CO2ByYear(CO2ByYearSEXP);
    rcpp_result_gen = Rcpp::wrap(pwb(x, meteo, W, latitude, elevation, slope, aspect, canopyEvaporation, snowMelt, soilEvaporation, herbTranspiration, CO2ByYear));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_pwb(SEXP xSEXP, SEXP meteoSEXP, SEXP WSEXP, SEXP latitudeSEXP, SEXP elevationSEXP, SEXP slopeSEXP, SEXP aspectSEXP, SEXP canopyEvaporationSEXP, SEXP snowMeltSEXP, SEXP soilEvaporationSEXP, SEXP herbTranspirationSEXP, SEXP CO2ByYearSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_pwb_try(xSEXP, meteoSEXP, WSEXP, latitudeSEXP, elevationSEXP, slopeSEXP, aspectSEXP, canopyEvaporationSEXP, snowMeltSEXP, soilEvaporationSEXP, herbTranspirationSEXP, CO2ByYearSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// spwbDay
List spwbDay(List x, CharacterVector date, NumericVector meteovec, double latitude, double elevation, double slope, double aspect, double runon, Nullable<NumericVector> lateralFlows, double waterTableDepth, bool modifyInput);
static SEXP _medfate_spwbDay_try(SEXP xSEXP, SEXP dateSEXP, SEXP meteovecSEXP, SEXP latitudeSEXP, SEXP elevationSEXP, SEXP slopeSEXP, SEXP aspectSEXP, SEXP runonSEXP, SEXP lateralFlowsSEXP, SEXP waterTableDepthSEXP, SEXP modifyInputSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< CharacterVector >::type date(dateSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type meteovec(meteovecSEXP);
    Rcpp::traits::input_parameter< double >::type latitude(latitudeSEXP);
    Rcpp::traits::input_parameter< double >::type elevation(elevationSEXP);
    Rcpp::traits::input_parameter< double >::type slope(slopeSEXP);
    Rcpp::traits::input_parameter< double >::type aspect(aspectSEXP);
    Rcpp::traits::input_parameter< double >::type runon(runonSEXP);
    Rcpp::traits::input_parameter< Nullable<NumericVector> >::type lateralFlows(lateralFlowsSEXP);
    Rcpp::traits::input_parameter< double >::type waterTableDepth(waterTableDepthSEXP);
    Rcpp::traits::input_parameter< bool >::type modifyInput(modifyInputSEXP);
    rcpp_result_gen = Rcpp::wrap(spwbDay(x, date, meteovec, latitude, elevation, slope, aspect, runon, lateralFlows, waterTableDepth, modifyInput));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_spwbDay(SEXP xSEXP, SEXP dateSEXP, SEXP meteovecSEXP, SEXP latitudeSEXP, SEXP elevationSEXP, SEXP slopeSEXP, SEXP aspectSEXP, SEXP runonSEXP, SEXP lateralFlowsSEXP, SEXP waterTableDepthSEXP, SEXP modifyInputSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_spwbDay_try(xSEXP, dateSEXP, meteovecSEXP, latitudeSEXP, elevationSEXP, slopeSEXP, aspectSEXP, runonSEXP, lateralFlowsSEXP, waterTableDepthSEXP, modifyInputSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// aspwbDay
List aspwbDay(List x, CharacterVector date, NumericVector meteovec, double latitude, double elevation, double slope, double aspect, double runon, Nullable<NumericVector> lateralFlows, double waterTableDepth, bool modifyInput);
static SEXP _medfate_aspwbDay_try(SEXP xSEXP, SEXP dateSEXP, SEXP meteovecSEXP, SEXP latitudeSEXP, SEXP elevationSEXP, SEXP slopeSEXP, SEXP aspectSEXP, SEXP runonSEXP, SEXP lateralFlowsSEXP, SEXP waterTableDepthSEXP, SEXP modifyInputSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< CharacterVector >::type date(dateSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type meteovec(meteovecSEXP);
    Rcpp::traits::input_parameter< double >::type latitude(latitudeSEXP);
    Rcpp::traits::input_parameter< double >::type elevation(elevationSEXP);
    Rcpp::traits::input_parameter< double >::type slope(slopeSEXP);
    Rcpp::traits::input_parameter< double >::type aspect(aspectSEXP);
    Rcpp::traits::input_parameter< double >::type runon(runonSEXP);
    Rcpp::traits::input_parameter< Nullable<NumericVector> >::type lateralFlows(lateralFlowsSEXP);
    Rcpp::traits::input_parameter< double >::type waterTableDepth(waterTableDepthSEXP);
    Rcpp::traits::input_parameter< bool >::type modifyInput(modifyInputSEXP);
    rcpp_result_gen = Rcpp::wrap(aspwbDay(x, date, meteovec, latitude, elevation, slope, aspect, runon, lateralFlows, waterTableDepth, modifyInput));
    return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _medfate_aspwbDay(SEXP xSEXP, SEXP dateSEXP, SEXP meteovecSEXP, SEXP latitudeSEXP, SEXP elevationSEXP, SEXP slopeSEXP, SEXP aspectSEXP, SEXP runonSEXP, SEXP lateralFlowsSEXP, SEXP waterTableDepthSEXP, SEXP modifyInputSEXP) {
    SEXP rcpp_result_gen;
    {
        Rcpp::RNGScope rcpp_rngScope_gen;
        rcpp_result_gen = PROTECT(_medfate_aspwbDay_try(xSEXP, dateSEXP, meteovecSEXP, latitudeSEXP, elevationSEXP, slopeSEXP, aspectSEXP, runonSEXP, lateralFlowsSEXP, waterTableDepthSEXP, modifyInputSEXP));
    }
    Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
    if (rcpp_isInterrupt_gen) {
        UNPROTECT(1);
        Rf_onintr();
    }
    bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
    if (rcpp_isLongjump_gen) {
        Rcpp::internal::resumeJump(rcpp_result_gen);
    }
    Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
    if (rcpp_isError_gen) {
        SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
        UNPROTECT(1);
        (Rf_error)("%s", CHAR(rcpp_msgSEXP_gen));
    }
    UNPROTECT(1);
    return rcpp_result_gen;
}
// sapwoodWaterCapacity
double sapwoodWaterCapacity(double Al2As, double height, NumericVector V, NumericVector L, double wd);
RcppExport SEXP _medfate_sapwoodWaterCapacity(SEXP Al2AsSEXP, SEXP heightSEXP, SEXP VSEXP, SEXP LSEXP, SEXP wdSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type Al2As(Al2AsSEXP);
    Rcpp::traits::input_parameter< double >::type height(heightSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type V(VSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type L(LSEXP);
    Rcpp::traits::input_parameter< double >::type wd(wdSEXP);
    rcpp_result_gen = Rcpp::wrap(sapwoodWaterCapacity(Al2As, height, V, L, wd));
    return rcpp_result_gen;
END_RCPP
}
// plantWaterContent
NumericVector plantWaterContent(List x);
RcppExport SEXP _medfate_plantWaterContent(SEXP xSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    rcpp_result_gen = Rcpp::wrap(plantWaterContent(x));
    return rcpp_result_gen;
END_RCPP
}
// leafWaterCapacity_c
double leafWaterCapacity_c(double SLA, double ld);
RcppExport SEXP _medfate_leafWaterCapacity_c(SEXP SLASEXP, SEXP ldSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type SLA(SLASEXP);
    Rcpp::traits::input_parameter< double >::type ld(ldSEXP);
    rcpp_result_gen = Rcpp::wrap(leafWaterCapacity_c(SLA, ld));
    return rcpp_result_gen;
END_RCPP
}
// turgorLossPoint_c
double turgorLossPoint_c(double pi0, double epsilon);
RcppExport SEXP _medfate_turgorLossPoint_c(SEXP pi0SEXP, SEXP epsilonSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type pi0(pi0SEXP);
    Rcpp::traits::input_parameter< double >::type epsilon(epsilonSEXP);
    rcpp_result_gen = Rcpp::wrap(turgorLossPoint_c(pi0, epsilon));
    return rcpp_result_gen;
END_RCPP
}
// symplasticRelativeWaterContent_c
double symplasticRelativeWaterContent_c(double psiSym, double pi0, double epsilon);
RcppExport SEXP _medfate_symplasticRelativeWaterContent_c(SEXP psiSymSEXP, SEXP pi0SEXP, SEXP epsilonSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type psiSym(psiSymSEXP);
    Rcpp::traits::input_parameter< double >::type pi0(pi0SEXP);
    Rcpp::traits::input_parameter< double >::type epsilon(epsilonSEXP);
    rcpp_result_gen = Rcpp::wrap(symplasticRelativeWaterContent_c(psiSym, pi0, epsilon));
    return rcpp_result_gen;
END_RCPP
}
// symplasticWaterPotential_c
double symplasticWaterPotential_c(double RWC, double pi0, double epsilon);
RcppExport SEXP _medfate_symplasticWaterPotential_c(SEXP RWCSEXP, SEXP pi0SEXP, SEXP epsilonSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type RWC(RWCSEXP);
    Rcpp::traits::input_parameter< double >::type pi0(pi0SEXP);
    Rcpp::traits::input_parameter< double >::type epsilon(epsilonSEXP);
    rcpp_result_gen = Rcpp::wrap(symplasticWaterPotential_c(RWC, pi0, epsilon));
    return rcpp_result_gen;
END_RCPP
}
// apoplasticRelativeWaterContent_c
double apoplasticRelativeWaterContent_c(double psiApo, double c, double d);
RcppExport SEXP _medfate_apoplasticRelativeWaterContent_c(SEXP psiApoSEXP, SEXP cSEXP, SEXP dSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type psiApo(psiApoSEXP);
    Rcpp::traits::input_parameter< double >::type c(cSEXP);
    Rcpp::traits::input_parameter< double >::type d(dSEXP);
    rcpp_result_gen = Rcpp::wrap(apoplasticRelativeWaterContent_c(psiApo, c, d));
    return rcpp_result_gen;
END_RCPP
}
// apoplasticWaterPotential_c
double apoplasticWaterPotential_c(double RWC, double c, double d);
RcppExport SEXP _medfate_apoplasticWaterPotential_c(SEXP RWCSEXP, SEXP cSEXP, SEXP dSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type RWC(RWCSEXP);
    Rcpp::traits::input_parameter< double >::type c(cSEXP);
    Rcpp::traits::input_parameter< double >::type d(dSEXP);
    rcpp_result_gen = Rcpp::wrap(apoplasticWaterPotential_c(RWC, c, d));
    return rcpp_result_gen;
END_RCPP
}
// tissueRelativeWaterContent_c
double tissueRelativeWaterContent_c(double psiSym, double pi0, double epsilon, double psiApo, double c, double d, double af);
RcppExport SEXP _medfate_tissueRelativeWaterContent_c(SEXP psiSymSEXP, SEXP pi0SEXP, SEXP epsilonSEXP, SEXP psiApoSEXP, SEXP cSEXP, SEXP dSEXP, SEXP afSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type psiSym(psiSymSEXP);
    Rcpp::traits::input_parameter< double >::type pi0(pi0SEXP);
    Rcpp::traits::input_parameter< double >::type epsilon(epsilonSEXP);
    Rcpp::traits::input_parameter< double >::type psiApo(psiApoSEXP);
    Rcpp::traits::input_parameter< double >::type c(cSEXP);
    Rcpp::traits::input_parameter< double >::type d(dSEXP);
    Rcpp::traits::input_parameter< double >::type af(afSEXP);
    rcpp_result_gen = Rcpp::wrap(tissueRelativeWaterContent_c(psiSym, pi0, epsilon, psiApo, c, d, af));
    return rcpp_result_gen;
END_RCPP
}
// transpirationSperry
List transpirationSperry(List x, DataFrame meteo, int day, double latitude, double elevation, double slope, double aspect, double canopyEvaporation, double snowMelt, double soilEvaporation, double herbTranspiration, int stepFunctions, bool modifyInput);
RcppExport SEXP _medfate_transpirationSperry(SEXP xSEXP, SEXP meteoSEXP, SEXP daySEXP, SEXP latitudeSEXP, SEXP elevationSEXP, SEXP slopeSEXP, SEXP aspectSEXP, SEXP canopyEvaporationSEXP, SEXP snowMeltSEXP, SEXP soilEvaporationSEXP, SEXP herbTranspirationSEXP, SEXP stepFunctionsSEXP, SEXP modifyInputSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type meteo(meteoSEXP);
    Rcpp::traits::input_parameter< int >::type day(daySEXP);
    Rcpp::traits::input_parameter< double >::type latitude(latitudeSEXP);
    Rcpp::traits::input_parameter< double >::type elevation(elevationSEXP);
    Rcpp::traits::input_parameter< double >::type slope(slopeSEXP);
    Rcpp::traits::input_parameter< double >::type aspect(aspectSEXP);
    Rcpp::traits::input_parameter< double >::type canopyEvaporation(canopyEvaporationSEXP);
    Rcpp::traits::input_parameter< double >::type snowMelt(snowMeltSEXP);
    Rcpp::traits::input_parameter< double >::type soilEvaporation(soilEvaporationSEXP);
    Rcpp::traits::input_parameter< double >::type herbTranspiration(herbTranspirationSEXP);
    Rcpp::traits::input_parameter< int >::type stepFunctions(stepFunctionsSEXP);
    Rcpp::traits::input_parameter< bool >::type modifyInput(modifyInputSEXP);
    rcpp_result_gen = Rcpp::wrap(transpirationSperry(x, meteo, day, latitude, elevation, slope, aspect, canopyEvaporation, snowMelt, soilEvaporation, herbTranspiration, stepFunctions, modifyInput));
    return rcpp_result_gen;
END_RCPP
}
// transpirationSureau
List transpirationSureau(List x, DataFrame meteo, int day, double latitude, double elevation, double slope, double aspect, double canopyEvaporation, double snowMelt, double soilEvaporation, double herbTranspiration, bool modifyInput);
RcppExport SEXP _medfate_transpirationSureau(SEXP xSEXP, SEXP meteoSEXP, SEXP daySEXP, SEXP latitudeSEXP, SEXP elevationSEXP, SEXP slopeSEXP, SEXP aspectSEXP, SEXP canopyEvaporationSEXP, SEXP snowMeltSEXP, SEXP soilEvaporationSEXP, SEXP herbTranspirationSEXP, SEXP modifyInputSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type meteo(meteoSEXP);
    Rcpp::traits::input_parameter< int >::type day(daySEXP);
    Rcpp::traits::input_parameter< double >::type latitude(latitudeSEXP);
    Rcpp::traits::input_parameter< double >::type elevation(elevationSEXP);
    Rcpp::traits::input_parameter< double >::type slope(slopeSEXP);
    Rcpp::traits::input_parameter< double >::type aspect(aspectSEXP);
    Rcpp::traits::input_parameter< double >::type canopyEvaporation(canopyEvaporationSEXP);
    Rcpp::traits::input_parameter< double >::type snowMelt(snowMeltSEXP);
    Rcpp::traits::input_parameter< double >::type soilEvaporation(soilEvaporationSEXP);
    Rcpp::traits::input_parameter< double >::type herbTranspiration(herbTranspirationSEXP);
    Rcpp::traits::input_parameter< bool >::type modifyInput(modifyInputSEXP);
    rcpp_result_gen = Rcpp::wrap(transpirationSureau(x, meteo, day, latitude, elevation, slope, aspect, canopyEvaporation, snowMelt, soilEvaporation, herbTranspiration, modifyInput));
    return rcpp_result_gen;
END_RCPP
}
// transpirationGranier
List transpirationGranier(List x, DataFrame meteo, int day, double latitude, double elevation, double slope, double aspect, bool modifyInput);
RcppExport SEXP _medfate_transpirationGranier(SEXP xSEXP, SEXP meteoSEXP, SEXP daySEXP, SEXP latitudeSEXP, SEXP elevationSEXP, SEXP slopeSEXP, SEXP aspectSEXP, SEXP modifyInputSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< DataFrame >::type meteo(meteoSEXP);
    Rcpp::traits::input_parameter< int >::type day(daySEXP);
    Rcpp::traits::input_parameter< double >::type latitude(latitudeSEXP);
    Rcpp::traits::input_parameter< double >::type elevation(elevationSEXP);
    Rcpp::traits::input_parameter< double >::type slope(slopeSEXP);
    Rcpp::traits::input_parameter< double >::type aspect(aspectSEXP);
    Rcpp::traits::input_parameter< bool >::type modifyInput(modifyInputSEXP);
    rcpp_result_gen = Rcpp::wrap(transpirationGranier(x, meteo, day, latitude, elevation, slope, aspect, modifyInput));
    return rcpp_result_gen;
END_RCPP
}
// windCanopyTurbulenceModel
DataFrame windCanopyTurbulenceModel(NumericVector zm, NumericVector Cx, double hm, double d0, double z0, String model);
RcppExport SEXP _medfate_windCanopyTurbulenceModel(SEXP zmSEXP, SEXP CxSEXP, SEXP hmSEXP, SEXP d0SEXP, SEXP z0SEXP, SEXP modelSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type zm(zmSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type Cx(CxSEXP);
    Rcpp::traits::input_parameter< double >::type hm(hmSEXP);
    Rcpp::traits::input_parameter< double >::type d0(d0SEXP);
    Rcpp::traits::input_parameter< double >::type z0(z0SEXP);
    Rcpp::traits::input_parameter< String >::type model(modelSEXP);
    rcpp_result_gen = Rcpp::wrap(windCanopyTurbulenceModel(zm, Cx, hm, d0, z0, model));
    return rcpp_result_gen;
END_RCPP
}
// windCanopyTurbulence
DataFrame windCanopyTurbulence(NumericVector zmid, NumericVector LAD, double canopyHeight, double u, double windMeasurementHeight, String model);
RcppExport SEXP _medfate_windCanopyTurbulence(SEXP zmidSEXP, SEXP LADSEXP, SEXP canopyHeightSEXP, SEXP uSEXP, SEXP windMeasurementHeightSEXP, SEXP modelSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type zmid(zmidSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type LAD(LADSEXP);
    Rcpp::traits::input_parameter< double >::type canopyHeight(canopyHeightSEXP);
    Rcpp::traits::input_parameter< double >::type u(uSEXP);
    Rcpp::traits::input_parameter< double >::type windMeasurementHeight(windMeasurementHeightSEXP);
    Rcpp::traits::input_parameter< String >::type model(modelSEXP);
    rcpp_result_gen = Rcpp::wrap(windCanopyTurbulence(zmid, LAD, canopyHeight, u, windMeasurementHeight, model));
    return rcpp_result_gen;
END_RCPP
}
// windSpeedAtCanopyHeight_c
double windSpeedAtCanopyHeight_c(double wind20H, double canopyHeight);
RcppExport SEXP _medfate_windSpeedAtCanopyHeight_c(SEXP wind20HSEXP, SEXP canopyHeightSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type wind20H(wind20HSEXP);
    Rcpp::traits::input_parameter< double >::type canopyHeight(canopyHeightSEXP);
    rcpp_result_gen = Rcpp::wrap(windSpeedAtCanopyHeight_c(wind20H, canopyHeight));
    return rcpp_result_gen;
END_RCPP
}
// unshelteredMidflameWindSpeed_c
double unshelteredMidflameWindSpeed_c(double wind20H, double fuelBedHeight);
RcppExport SEXP _medfate_unshelteredMidflameWindSpeed_c(SEXP wind20HSEXP, SEXP fuelBedHeightSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type wind20H(wind20HSEXP);
    Rcpp::traits::input_parameter< double >::type fuelBedHeight(fuelBedHeightSEXP);
    rcpp_result_gen = Rcpp::wrap(unshelteredMidflameWindSpeed_c(wind20H, fuelBedHeight));
    return rcpp_result_gen;
END_RCPP
}
// shelteredMidflameWindSpeed_c
double shelteredMidflameWindSpeed_c(double wind20H, double crownFillProportion, double topCanopyHeight);
RcppExport SEXP _medfate_shelteredMidflameWindSpeed_c(SEXP wind20HSEXP, SEXP crownFillProportionSEXP, SEXP topCanopyHeightSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type wind20H(wind20HSEXP);
    Rcpp::traits::input_parameter< double >::type crownFillProportion(crownFillProportionSEXP);
    Rcpp::traits::input_parameter< double >::type topCanopyHeight(topCanopyHeightSEXP);
    rcpp_result_gen = Rcpp::wrap(shelteredMidflameWindSpeed_c(wind20H, crownFillProportion, topCanopyHeight));
    return rcpp_result_gen;
END_RCPP
}
// windAdjustmentFactor_c
double windAdjustmentFactor_c(double topShrubHeight, double bottomCanopyHeight, double topCanopyHeight, double canopyCover);
RcppExport SEXP _medfate_windAdjustmentFactor_c(SEXP topShrubHeightSEXP, SEXP bottomCanopyHeightSEXP, SEXP topCanopyHeightSEXP, SEXP canopyCoverSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type topShrubHeight(topShrubHeightSEXP);
    Rcpp::traits::input_parameter< double >::type bottomCanopyHeight(bottomCanopyHeightSEXP);
    Rcpp::traits::input_parameter< double >::type topCanopyHeight(topCanopyHeightSEXP);
    Rcpp::traits::input_parameter< double >::type canopyCover(canopyCoverSEXP);
    rcpp_result_gen = Rcpp::wrap(windAdjustmentFactor_c(topShrubHeight, bottomCanopyHeight, topCanopyHeight, canopyCover));
    return rcpp_result_gen;
END_RCPP
}
// windSpeedAtHeightOverCanopy_c
double windSpeedAtHeightOverCanopy_c(double z, double wind20H, double canopyHeight);
RcppExport SEXP _medfate_windSpeedAtHeightOverCanopy_c(SEXP zSEXP, SEXP wind20HSEXP, SEXP canopyHeightSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type z(zSEXP);
    Rcpp::traits::input_parameter< double >::type wind20H(wind20HSEXP);
    Rcpp::traits::input_parameter< double >::type canopyHeight(canopyHeightSEXP);
    rcpp_result_gen = Rcpp::wrap(windSpeedAtHeightOverCanopy_c(z, wind20H, canopyHeight));
    return rcpp_result_gen;
END_RCPP
}
// initialize_ring
List initialize_ring();
RcppExport SEXP _medfate_initialize_ring() {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    rcpp_result_gen = Rcpp::wrap(initialize_ring());
    return rcpp_result_gen;
END_RCPP
}
// grow_ring
void grow_ring(List ring, double psi, double Tc, double Nc, double phi0, double pi0, double CRD0, double Y_P, double Y_T, double h, double s);
RcppExport SEXP _medfate_grow_ring(SEXP ringSEXP, SEXP psiSEXP, SEXP TcSEXP, SEXP NcSEXP, SEXP phi0SEXP, SEXP pi0SEXP, SEXP CRD0SEXP, SEXP Y_PSEXP, SEXP Y_TSEXP, SEXP hSEXP, SEXP sSEXP) {
BEGIN_RCPP
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type ring(ringSEXP);
    Rcpp::traits::input_parameter< double >::type psi(psiSEXP);
    Rcpp::traits::input_parameter< double >::type Tc(TcSEXP);
    Rcpp::traits::input_parameter< double >::type Nc(NcSEXP);
    Rcpp::traits::input_parameter< double >::type phi0(phi0SEXP);
    Rcpp::traits::input_parameter< double >::type pi0(pi0SEXP);
    Rcpp::traits::input_parameter< double >::type CRD0(CRD0SEXP);
    Rcpp::traits::input_parameter< double >::type Y_P(Y_PSEXP);
    Rcpp::traits::input_parameter< double >::type Y_T(Y_TSEXP);
    Rcpp::traits::input_parameter< double >::type h(hSEXP);
    Rcpp::traits::input_parameter< double >::type s(sSEXP);
    grow_ring(ring, psi, Tc, Nc, phi0, pi0, CRD0, Y_P, Y_T, h, s);
    return R_NilValue;
END_RCPP
}
// temperature_function_c
double temperature_function_c(double Tc, double Y_T, double DHa, double DSd, double DHd);
RcppExport SEXP _medfate_temperature_function_c(SEXP TcSEXP, SEXP Y_TSEXP, SEXP DHaSEXP, SEXP DSdSEXP, SEXP DHdSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type Tc(TcSEXP);
    Rcpp::traits::input_parameter< double >::type Y_T(Y_TSEXP);
    Rcpp::traits::input_parameter< double >::type DHa(DHaSEXP);
    Rcpp::traits::input_parameter< double >::type DSd(DSdSEXP);
    Rcpp::traits::input_parameter< double >::type DHd(DHdSEXP);
    rcpp_result_gen = Rcpp::wrap(temperature_function_c(Tc, Y_T, DHa, DSd, DHd));
    return rcpp_result_gen;
END_RCPP
}
// relative_expansion_rate_c
double relative_expansion_rate_c(double psi, double Tc, double pi, double phi, double Y_P, double Y_T);
RcppExport SEXP _medfate_relative_expansion_rate_c(SEXP psiSEXP, SEXP TcSEXP, SEXP piSEXP, SEXP phiSEXP, SEXP Y_PSEXP, SEXP Y_TSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type psi(psiSEXP);
    Rcpp::traits::input_parameter< double >::type Tc(TcSEXP);
    Rcpp::traits::input_parameter< double >::type pi(piSEXP);
    Rcpp::traits::input_parameter< double >::type phi(phiSEXP);
    Rcpp::traits::input_parameter< double >::type Y_P(Y_PSEXP);
    Rcpp::traits::input_parameter< double >::type Y_T(Y_TSEXP);
    rcpp_result_gen = Rcpp::wrap(relative_expansion_rate_c(psi, Tc, pi, phi, Y_P, Y_T));
    return rcpp_result_gen;
END_RCPP
}

// validate (ensure exported C++ functions exist before calling them)
static int _medfate_RcppExport_validate(const char* sig) { 
    static std::set<std::string> signatures;
    if (signatures.empty()) {
        signatures.insert("List(*.nswbInput)(String,double)");
        signatures.insert("List(*aspwbInput)(double,List,DataFrame)");
        signatures.insert("List(*.defineASPWBDailyOutput)(double,double,double,double,CharacterVector,List)");
        signatures.insert("void(*.fillASPWBDailyOutput)(List,List,List,int)");
        signatures.insert("List(*aspwb)(List,DataFrame,double,double,double,double,double)");
        signatures.insert("List(*.copy_model_output)(List,List,String)");
        signatures.insert("List(*.defineGrowthDailyOutput)(double,double,double,double,CharacterVector,List)");
        signatures.insert("void(*.fillGrowthDailyOutput)(List,List,List,int)");
        signatures.insert("List(*growth)(List,DataFrame,double,double,double,double,NumericVector,double)");
        signatures.insert("List(*growth_day)(List,CharacterVector,NumericVector,double,double,double,double,double,Nullable<NumericVector>,double,bool)");
        signatures.insert("double(*hydrology_rainfallIntensity)(int,double,NumericVector)");
        signatures.insert("double(*hydrology_soilEvaporation)(DataFrame,double,String,double,double,bool)");
        signatures.insert("NumericVector(*hydrology_herbaceousTranspiration)(double,double,double,DataFrame,String,bool)");
        signatures.insert("NumericVector(*hydrology_infiltrationRepartition)(double,NumericVector,NumericVector,double,double)");
        signatures.insert("double(*hydrology_infiltrationAmount)(double,double,DataFrame,String,String,double)");
        signatures.insert("NumericVector(*hydrology_waterInputs)(List,double,double,double,double,double,double,double,double,double,bool)");
        signatures.insert("NumericVector(*hydrology_agricultureWaterInputs)(List,double,double,double,double,double,bool)");
        signatures.insert("NumericVector(*hydrology_soilWaterBalance)(DataFrame,String,double,double,double,NumericVector,double,Nullable<NumericVector>,double,String,double,String,int,int,bool)");
        signatures.insert("double(*hydrology_soilEvaporationAmount)(double,double,double)");
        signatures.insert("double(*.hydrology_interceptionGashDay)(double,double,double,double)");
        signatures.insert("double(*.hydrology_interceptionLiuDay)(double,double,double,double)");
        signatures.insert("double(*hydrology_infiltrationBoughton)(double,double)");
        signatures.insert("double(*hydrology_infiltrationGreenAmpt)(double,double,double,double,double)");
        signatures.insert("double(*hydrology_snowMelt)(double,double,double,double)");
        signatures.insert("String(*soil_USDAType)(double,double)");
        signatures.insert("NumericVector(*soil_thetaFC)(DataFrame,String)");
        signatures.insert("NumericVector(*soil_thetaWP)(DataFrame,String)");
        signatures.insert("NumericVector(*soil_thetaSAT)(DataFrame,String)");
        signatures.insert("NumericVector(*soil_waterFC)(DataFrame,String)");
        signatures.insert("NumericVector(*soil_waterSAT)(DataFrame,String)");
        signatures.insert("NumericVector(*soil_waterWP)(DataFrame,String)");
        signatures.insert("NumericVector(*soil_waterPsi)(DataFrame,double,String)");
        signatures.insert("NumericVector(*soil_waterExtractable)(DataFrame,String,double)");
        signatures.insert("NumericVector(*soil_theta)(DataFrame,String)");
        signatures.insert("NumericVector(*soil_water)(DataFrame,String)");
        signatures.insert("double(*soil_rockWeight2Volume)(double,double,double)");
        signatures.insert("NumericVector(*soil_psi)(DataFrame,String)");
        signatures.insert("NumericVector(*soil_conductivity)(DataFrame,String,bool)");
        signatures.insert("NumericVector(*soil_capacitance)(DataFrame,String)");
        signatures.insert("double(*soil_saturatedWaterDepth)(DataFrame,String)");
        signatures.insert("NumericVector(*soil_vanGenuchtenParamsCarsel)(String)");
        signatures.insert("NumericVector(*soil_campbellParamsClappHornberger)(String)");
        signatures.insert("NumericVector(*soil_vanGenuchtenParamsToth)(double,double,double,double,bool)");
        signatures.insert("DataFrame(*soil)(DataFrame,String)");
        signatures.insert("void(*.modifySoilLayerParam)(DataFrame,String,int,double,String)");
        signatures.insert("NumericVector(*.testSoilDataFrameToStructure)(DataFrame,String)");
        signatures.insert("NumericVector(*soil_thermalCapacity)(DataFrame,String)");
        signatures.insert("NumericVector(*soil_thermalConductivity)(DataFrame,String)");
        signatures.insert("NumericVector(*soil_temperatureGradient)(NumericVector,NumericVector)");
        signatures.insert("NumericVector(*soil_temperatureChange)(NumericVector,NumericVector,NumericVector,NumericVector,NumericVector,NumericVector,NumericVector,double,double)");
        signatures.insert("void(*soil_temperatureGradient)(std::vector<double>&,const std::vector<double>&,const std::vector<double>&)");
        signatures.insert("CharacterVector(*.getWeatherDates)(DataFrame)");
        signatures.insert("List(*.defineSPWBDailyOutput)(double,double,double,double,CharacterVector,List)");
        signatures.insert("void(*.fillSPWBDailyOutput)(List,List,List,int)");
        signatures.insert("List(*spwb)(List,DataFrame,double,double,double,double,NumericVector,double)");
        signatures.insert("List(*pwb)(List,DataFrame,NumericMatrix,double,double,double,double,NumericVector,NumericVector,NumericVector,NumericVector,NumericVector)");
        signatures.insert("List(*spwb_day)(List,CharacterVector,NumericVector,double,double,double,double,double,Nullable<NumericVector>,double,bool)");
        signatures.insert("List(*aspwb_day)(List,CharacterVector,NumericVector,double,double,double,double,double,Nullable<NumericVector>,double,bool)");
    }
    return signatures.find(sig) != signatures.end();
}

// registerCCallable (register entry points for exported C++ functions)
RcppExport SEXP _medfate_RcppExport_registerCCallable() { 
    R_RegisterCCallable("medfate", "_medfate_.nswbInput", (DL_FUNC)_medfate_nswbInput_try);
    R_RegisterCCallable("medfate", "_medfate_aspwbInput", (DL_FUNC)_medfate_aspwbInput_try);
    R_RegisterCCallable("medfate", "_medfate_.defineASPWBDailyOutput", (DL_FUNC)_medfate_defineASPWBDailyOutput_try);
    R_RegisterCCallable("medfate", "_medfate_.fillASPWBDailyOutput", (DL_FUNC)_medfate_fillASPWBDailyOutput_try);
    R_RegisterCCallable("medfate", "_medfate_aspwb", (DL_FUNC)_medfate_aspwb_try);
    R_RegisterCCallable("medfate", "_medfate_.copy_model_output", (DL_FUNC)_medfate_copyModelOutput_try);
    R_RegisterCCallable("medfate", "_medfate_.defineGrowthDailyOutput", (DL_FUNC)_medfate_defineGrowthDailyOutput_try);
    R_RegisterCCallable("medfate", "_medfate_.fillGrowthDailyOutput", (DL_FUNC)_medfate_fillGrowthDailyOutput_try);
    R_RegisterCCallable("medfate", "_medfate_growth", (DL_FUNC)_medfate_growth_try);
    R_RegisterCCallable("medfate", "_medfate_growth_day", (DL_FUNC)_medfate_growthDay_try);
    R_RegisterCCallable("medfate", "_medfate_hydrology_rainfallIntensity", (DL_FUNC)_medfate_rainfallIntensity_try);
    R_RegisterCCallable("medfate", "_medfate_hydrology_soilEvaporation", (DL_FUNC)_medfate_soilEvaporation_try);
    R_RegisterCCallable("medfate", "_medfate_hydrology_herbaceousTranspiration", (DL_FUNC)_medfate_herbaceousTranspiration_try);
    R_RegisterCCallable("medfate", "_medfate_hydrology_infiltrationRepartition", (DL_FUNC)_medfate_infiltrationRepartition_try);
    R_RegisterCCallable("medfate", "_medfate_hydrology_infiltrationAmount", (DL_FUNC)_medfate_infiltrationAmount_try);
    R_RegisterCCallable("medfate", "_medfate_hydrology_waterInputs", (DL_FUNC)_medfate_waterInputs_try);
    R_RegisterCCallable("medfate", "_medfate_hydrology_agricultureWaterInputs", (DL_FUNC)_medfate_agricultureWaterInputs_try);
    R_RegisterCCallable("medfate", "_medfate_hydrology_soilWaterBalance", (DL_FUNC)_medfate_soilWaterBalance_try);
    R_RegisterCCallable("medfate", "_medfate_hydrology_soilEvaporationAmount", (DL_FUNC)_medfate_soilEvaporationAmount_c_try);
    R_RegisterCCallable("medfate", "_medfate_.hydrology_interceptionGashDay", (DL_FUNC)_medfate_interceptionGashDay_c_try);
    R_RegisterCCallable("medfate", "_medfate_.hydrology_interceptionLiuDay", (DL_FUNC)_medfate_interceptionLiuDay_c_try);
    R_RegisterCCallable("medfate", "_medfate_hydrology_infiltrationBoughton", (DL_FUNC)_medfate_infiltrationBoughton_c_try);
    R_RegisterCCallable("medfate", "_medfate_hydrology_infiltrationGreenAmpt", (DL_FUNC)_medfate_infitrationGreenAmpt_c_try);
    R_RegisterCCallable("medfate", "_medfate_hydrology_snowMelt", (DL_FUNC)_medfate_snowMelt_c_try);
    R_RegisterCCallable("medfate", "_medfate_soil_USDAType", (DL_FUNC)_medfate_USDAType_try);
    R_RegisterCCallable("medfate", "_medfate_soil_thetaFC", (DL_FUNC)_medfate_thetaFC_try);
    R_RegisterCCallable("medfate", "_medfate_soil_thetaWP", (DL_FUNC)_medfate_thetaWP_try);
    R_RegisterCCallable("medfate", "_medfate_soil_thetaSAT", (DL_FUNC)_medfate_thetaSAT_try);
    R_RegisterCCallable("medfate", "_medfate_soil_waterFC", (DL_FUNC)_medfate_waterFC_try);
    R_RegisterCCallable("medfate", "_medfate_soil_waterSAT", (DL_FUNC)_medfate_waterSAT_try);
    R_RegisterCCallable("medfate", "_medfate_soil_waterWP", (DL_FUNC)_medfate_waterWP_try);
    R_RegisterCCallable("medfate", "_medfate_soil_waterPsi", (DL_FUNC)_medfate_waterPsi_try);
    R_RegisterCCallable("medfate", "_medfate_soil_waterExtractable", (DL_FUNC)_medfate_waterExtractable_try);
    R_RegisterCCallable("medfate", "_medfate_soil_theta", (DL_FUNC)_medfate_theta_try);
    R_RegisterCCallable("medfate", "_medfate_soil_water", (DL_FUNC)_medfate_water_try);
    R_RegisterCCallable("medfate", "_medfate_soil_rockWeight2Volume", (DL_FUNC)_medfate_rockWeight2Volume_try);
    R_RegisterCCallable("medfate", "_medfate_soil_psi", (DL_FUNC)_medfate_psi_try);
    R_RegisterCCallable("medfate", "_medfate_soil_conductivity", (DL_FUNC)_medfate_conductivity_try);
    R_RegisterCCallable("medfate", "_medfate_soil_capacitance", (DL_FUNC)_medfate_capacitance_try);
    R_RegisterCCallable("medfate", "_medfate_soil_saturatedWaterDepth", (DL_FUNC)_medfate_saturatedWaterDepth_try);
    R_RegisterCCallable("medfate", "_medfate_soil_vanGenuchtenParamsCarsel", (DL_FUNC)_medfate_vanGenuchtenParamsCarsel_try);
    R_RegisterCCallable("medfate", "_medfate_soil_campbellParamsClappHornberger", (DL_FUNC)_medfate_campbellParamsClappHornberger_try);
    R_RegisterCCallable("medfate", "_medfate_soil_vanGenuchtenParamsToth", (DL_FUNC)_medfate_vanGenuchtenParamsToth_try);
    R_RegisterCCallable("medfate", "_medfate_soil", (DL_FUNC)_medfate_soilInit_try);
    R_RegisterCCallable("medfate", "_medfate_.modifySoilLayerParam", (DL_FUNC)_medfate_modifySoilLayerParam_try);
    R_RegisterCCallable("medfate", "_medfate_.testSoilDataFrameToStructure", (DL_FUNC)_medfate_testSoilDataFrameToStructure_try);
    R_RegisterCCallable("medfate", "_medfate_soil_thermalCapacity", (DL_FUNC)_medfate_thermalCapacity_try);
    R_RegisterCCallable("medfate", "_medfate_soil_thermalConductivity", (DL_FUNC)_medfate_thermalConductivity_try);
    R_RegisterCCallable("medfate", "_medfate_soil_temperatureGradient", (DL_FUNC)_medfate_temperatureGradient_try);
    R_RegisterCCallable("medfate", "_medfate_soil_temperatureChange", (DL_FUNC)_medfate_temperatureChange_try);
    R_RegisterCCallable("medfate", "_medfate_soil_temperatureGradient", (DL_FUNC)_medfate_temperatureGradient_c_try);
    R_RegisterCCallable("medfate", "_medfate_.getWeatherDates", (DL_FUNC)_medfate_getWeatherDates_try);
    R_RegisterCCallable("medfate", "_medfate_.defineSPWBDailyOutput", (DL_FUNC)_medfate_defineSPWBDailyOutput_try);
    R_RegisterCCallable("medfate", "_medfate_.fillSPWBDailyOutput", (DL_FUNC)_medfate_fillSPWBDailyOutput_try);
    R_RegisterCCallable("medfate", "_medfate_spwb", (DL_FUNC)_medfate_spwb_try);
    R_RegisterCCallable("medfate", "_medfate_pwb", (DL_FUNC)_medfate_pwb_try);
    R_RegisterCCallable("medfate", "_medfate_spwb_day", (DL_FUNC)_medfate_spwbDay_try);
    R_RegisterCCallable("medfate", "_medfate_aspwb_day", (DL_FUNC)_medfate_aspwbDay_try);
    R_RegisterCCallable("medfate", "_medfate_RcppExport_validate", (DL_FUNC)_medfate_RcppExport_validate);
    return R_NilValue;
}

RcppExport SEXP _rcpp_module_boot_runners();

static const R_CallMethodDef CallEntries[] = {
    {"_medfate_nswbInput", (DL_FUNC) &_medfate_nswbInput, 2},
    {"_medfate_aspwbInput", (DL_FUNC) &_medfate_aspwbInput, 3},
    {"_medfate_defineASPWBDailyOutput", (DL_FUNC) &_medfate_defineASPWBDailyOutput, 6},
    {"_medfate_fillASPWBDailyOutput", (DL_FUNC) &_medfate_fillASPWBDailyOutput, 4},
    {"_medfate_aspwb", (DL_FUNC) &_medfate_aspwb, 7},
    {"_medfate_radiationDiurnalPattern_c", (DL_FUNC) &_medfate_radiationDiurnalPattern_c, 2},
    {"_medfate_temperatureDiurnalPattern_c", (DL_FUNC) &_medfate_temperatureDiurnalPattern_c, 7},
    {"_medfate_leafTemperature_c", (DL_FUNC) &_medfate_leafTemperature_c, 5},
    {"_medfate_leafTemperature2_c", (DL_FUNC) &_medfate_leafTemperature2_c, 6},
    {"_medfate_leafVapourPressure_c", (DL_FUNC) &_medfate_leafVapourPressure_c, 2},
    {"_medfate_irradianceToPhotonFlux_c", (DL_FUNC) &_medfate_irradianceToPhotonFlux_c, 2},
    {"_medfate_waterDynamicViscosity_c", (DL_FUNC) &_medfate_waterDynamicViscosity_c, 1},
    {"_medfate_belowgroundSapwoodStructuralBiomass", (DL_FUNC) &_medfate_belowgroundSapwoodStructuralBiomass, 4},
    {"_medfate_sapwoodStructuralBiomass", (DL_FUNC) &_medfate_sapwoodStructuralBiomass, 5},
    {"_medfate_belowgroundHeartwoodStructuralBiomass", (DL_FUNC) &_medfate_belowgroundHeartwoodStructuralBiomass, 5},
    {"_medfate_heartwoodStructuralBiomass", (DL_FUNC) &_medfate_heartwoodStructuralBiomass, 6},
    {"_medfate_sapwoodStarchCapacity", (DL_FUNC) &_medfate_sapwoodStarchCapacity, 6},
    {"_medfate_carbonCompartments", (DL_FUNC) &_medfate_carbonCompartments, 2},
    {"_medfate_sugarStarchDynamicsLeaf_c", (DL_FUNC) &_medfate_sugarStarchDynamicsLeaf_c, 3},
    {"_medfate_sugarStarchDynamicsStem_c", (DL_FUNC) &_medfate_sugarStarchDynamicsStem_c, 3},
    {"_medfate_osmoticWaterPotential_c", (DL_FUNC) &_medfate_osmoticWaterPotential_c, 3},
    {"_medfate_sugarConcentration_c", (DL_FUNC) &_medfate_sugarConcentration_c, 3},
    {"_medfate_relativeSapViscosity_c", (DL_FUNC) &_medfate_relativeSapViscosity_c, 2},
    {"_medfate_leafStructuralBiomass_c", (DL_FUNC) &_medfate_leafStructuralBiomass_c, 3},
    {"_medfate_twigStructuralBiomass_c", (DL_FUNC) &_medfate_twigStructuralBiomass_c, 4},
    {"_medfate_leafStarchCapacity_c", (DL_FUNC) &_medfate_leafStarchCapacity_c, 4},
    {"_medfate_abovegroundSapwoodStructuralBiomass_c", (DL_FUNC) &_medfate_abovegroundSapwoodStructuralBiomass_c, 3},
    {"_medfate_abovegroundHeartwoodStructuralBiomass_c", (DL_FUNC) &_medfate_abovegroundHeartwoodStructuralBiomass_c, 4},
    {"_medfate_copyModelOutput", (DL_FUNC) &_medfate_copyModelOutput, 3},
    {"_medfate_testControlListToStructure", (DL_FUNC) &_medfate_testControlListToStructure, 1},
    {"_medfate_pHEffect", (DL_FUNC) &_medfate_pHEffect, 2},
    {"_medfate_DAYCENTsnags", (DL_FUNC) &_medfate_DAYCENTsnags, 7},
    {"_medfate_DAYCENTlitter", (DL_FUNC) &_medfate_DAYCENTlitter, 11},
    {"_medfate_DAYCENT", (DL_FUNC) &_medfate_DAYCENT, 16},
    {"_medfate_annualLitterDecompositionRate_c", (DL_FUNC) &_medfate_annualLitterDecompositionRate_c, 2},
    {"_medfate_snagFallProbability_c", (DL_FUNC) &_medfate_snagFallProbability_c, 3},
    {"_medfate_litterMetabolicFraction_c", (DL_FUNC) &_medfate_litterMetabolicFraction_c, 2},
    {"_medfate_moistureEffect_c", (DL_FUNC) &_medfate_moistureEffect_c, 3},
    {"_medfate_temperatureEffect_c", (DL_FUNC) &_medfate_temperatureEffect_c, 1},
    {"_medfate_FCCSbehaviour", (DL_FUNC) &_medfate_FCCSbehaviour, 5},
    {"_medfate_rothermel", (DL_FUNC) &_medfate_rothermel, 11},
    {"_medfate_criticalFirelineIntensity_c", (DL_FUNC) &_medfate_criticalFirelineIntensity_c, 2},
    {"_medfate_plumeTemperature_c", (DL_FUNC) &_medfate_plumeTemperature_c, 4},
    {"_medfate_barkThermalDiffusivity_c", (DL_FUNC) &_medfate_barkThermalDiffusivity_c, 3},
    {"_medfate_radialBoleNecrosis_c", (DL_FUNC) &_medfate_radialBoleNecrosis_c, 5},
    {"_medfate_leafThermalFactor_c", (DL_FUNC) &_medfate_leafThermalFactor_c, 3},
    {"_medfate_necrosisCriticalTemperature_c", (DL_FUNC) &_medfate_necrosisCriticalTemperature_c, 3},
    {"_medfate_necrosisHeight_c", (DL_FUNC) &_medfate_necrosisHeight_c, 5},
    {"_medfate_treeBasalArea", (DL_FUNC) &_medfate_treeBasalArea, 2},
    {"_medfate_shrubCrownRatioAllometric", (DL_FUNC) &_medfate_shrubCrownRatioAllometric, 2},
    {"_medfate_shrubCover", (DL_FUNC) &_medfate_shrubCover, 2},
    {"_medfate_herbCover", (DL_FUNC) &_medfate_herbCover, 2},
    {"_medfate_shrubPhytovolumeAllometric", (DL_FUNC) &_medfate_shrubPhytovolumeAllometric, 4},
    {"_medfate_cohortIDs", (DL_FUNC) &_medfate_cohortIDs, 5},
    {"_medfate_cohortType", (DL_FUNC) &_medfate_cohortType, 1},
    {"_medfate_cohortBasalArea", (DL_FUNC) &_medfate_cohortBasalArea, 2},
    {"_medfate_cohortLargerTreeBasalArea", (DL_FUNC) &_medfate_cohortLargerTreeBasalArea, 3},
    {"_medfate_cohortCover", (DL_FUNC) &_medfate_cohortCover, 2},
    {"_medfate_cohortSpecies", (DL_FUNC) &_medfate_cohortSpecies, 2},
    {"_medfate_cohortSpeciesName", (DL_FUNC) &_medfate_cohortSpeciesName, 2},
    {"_medfate_cohortDensity", (DL_FUNC) &_medfate_cohortDensity, 2},
    {"_medfate_cohortHeight", (DL_FUNC) &_medfate_cohortHeight, 2},
    {"_medfate_cohortIndividualArea", (DL_FUNC) &_medfate_cohortIndividualArea, 2},
    {"_medfate_cohortCrownRatio", (DL_FUNC) &_medfate_cohortCrownRatio, 2},
    {"_medfate_cohortCrownBaseHeight", (DL_FUNC) &_medfate_cohortCrownBaseHeight, 2},
    {"_medfate_cohortCrownLength", (DL_FUNC) &_medfate_cohortCrownLength, 2},
    {"_medfate_cohortFoliarBiomass", (DL_FUNC) &_medfate_cohortFoliarBiomass, 4},
    {"_medfate_cohortFuelLoading", (DL_FUNC) &_medfate_cohortFuelLoading, 4},
    {"_medfate_cohortEquilibriumLeafLitter", (DL_FUNC) &_medfate_cohortEquilibriumLeafLitter, 3},
    {"_medfate_cohortEquilibriumSmallBranchLitter", (DL_FUNC) &_medfate_cohortEquilibriumSmallBranchLitter, 3},
    {"_medfate_cohortPhytovolume", (DL_FUNC) &_medfate_cohortPhytovolume, 2},
    {"_medfate_cohortLAI", (DL_FUNC) &_medfate_cohortLAI, 5},
    {"_medfate_herbFoliarBiomass", (DL_FUNC) &_medfate_herbFoliarBiomass, 2},
    {"_medfate_herbFuelLoading", (DL_FUNC) &_medfate_herbFuelLoading, 2},
    {"_medfate_herbLAI", (DL_FUNC) &_medfate_herbLAI, 2},
    {"_medfate_speciesBasalArea", (DL_FUNC) &_medfate_speciesBasalArea, 2},
    {"_medfate_speciesCover", (DL_FUNC) &_medfate_speciesCover, 2},
    {"_medfate_speciesDensity", (DL_FUNC) &_medfate_speciesDensity, 2},
    {"_medfate_speciesFoliarBiomass", (DL_FUNC) &_medfate_speciesFoliarBiomass, 3},
    {"_medfate_speciesFuelLoading", (DL_FUNC) &_medfate_speciesFuelLoading, 4},
    {"_medfate_speciesLAI", (DL_FUNC) &_medfate_speciesLAI, 4},
    {"_medfate_standBasalArea", (DL_FUNC) &_medfate_standBasalArea, 2},
    {"_medfate_standFoliarBiomass", (DL_FUNC) &_medfate_standFoliarBiomass, 3},
    {"_medfate_standFuelLoading", (DL_FUNC) &_medfate_standFuelLoading, 4},
    {"_medfate_standShrubVolume", (DL_FUNC) &_medfate_standShrubVolume, 2},
    {"_medfate_standLAI", (DL_FUNC) &_medfate_standLAI, 4},
    {"_medfate_LAIdistributionVectors", (DL_FUNC) &_medfate_LAIdistributionVectors, 4},
    {"_medfate_LAIdistribution", (DL_FUNC) &_medfate_LAIdistribution, 5},
    {"_medfate_LAIprofileVectors", (DL_FUNC) &_medfate_LAIprofileVectors, 4},
    {"_medfate_LAIprofile", (DL_FUNC) &_medfate_LAIprofile, 5},
    {"_medfate_forest2aboveground", (DL_FUNC) &_medfate_forest2aboveground, 4},
    {"_medfate_forest2belowground", (DL_FUNC) &_medfate_forest2belowground, 3},
    {"_medfate_EMCdesorption_c", (DL_FUNC) &_medfate_EMCdesorption_c, 2},
    {"_medfate_EMCadsorption_c", (DL_FUNC) &_medfate_EMCadsorption_c, 2},
    {"_medfate_EMCSimard_c", (DL_FUNC) &_medfate_EMCSimard_c, 2},
    {"_medfate_woodyFuelProfile", (DL_FUNC) &_medfate_woodyFuelProfile, 4},
    {"_medfate_layerCohortFuelLoading", (DL_FUNC) &_medfate_layerCohortFuelLoading, 5},
    {"_medfate_layerFuelLoading", (DL_FUNC) &_medfate_layerFuelLoading, 5},
    {"_medfate_layerLAI", (DL_FUNC) &_medfate_layerLAI, 5},
    {"_medfate_layerFuelAverageSpeciesParameter", (DL_FUNC) &_medfate_layerFuelAverageSpeciesParameter, 6},
    {"_medfate_layerFuelAverageParameter", (DL_FUNC) &_medfate_layerFuelAverageParameter, 6},
    {"_medfate_layerFuelAverageCrownLength", (DL_FUNC) &_medfate_layerFuelAverageCrownLength, 6},
    {"_medfate_fuelLiveStratification", (DL_FUNC) &_medfate_fuelLiveStratification, 6},
    {"_medfate_FCCSproperties", (DL_FUNC) &_medfate_FCCSproperties, 9},
    {"_medfate_defineGrowthDailyOutput", (DL_FUNC) &_medfate_defineGrowthDailyOutput, 6},
    {"_medfate_fillGrowthDailyOutput", (DL_FUNC) &_medfate_fillGrowthDailyOutput, 4},
    {"_medfate_growth", (DL_FUNC) &_medfate_growth, 8},
    {"_medfate_growthDay", (DL_FUNC) &_medfate_growthDay, 11},
    {"_medfate_dailyMortalityProbability_c", (DL_FUNC) &_medfate_dailyMortalityProbability_c, 2},
    {"_medfate_averagePsi", (DL_FUNC) &_medfate_averagePsi, 4},
    {"_medfate_psi2Weibull", (DL_FUNC) &_medfate_psi2Weibull, 3},
    {"_medfate_E2psiBelowground", (DL_FUNC) &_medfate_E2psiBelowground, 3},
    {"_medfate_E2psiAboveground", (DL_FUNC) &_medfate_E2psiAboveground, 3},
    {"_medfate_E2psiNetwork", (DL_FUNC) &_medfate_E2psiNetwork, 3},
    {"_medfate_supplyFunctionOneXylem", (DL_FUNC) &_medfate_supplyFunctionOneXylem, 8},
    {"_medfate_supplyFunctionTwoElements", (DL_FUNC) &_medfate_supplyFunctionTwoElements, 11},
    {"_medfate_supplyFunctionThreeElements", (DL_FUNC) &_medfate_supplyFunctionThreeElements, 14},
    {"_medfate_supplyFunctionBelowground", (DL_FUNC) &_medfate_supplyFunctionBelowground, 3},
    {"_medfate_supplyFunctionAboveground", (DL_FUNC) &_medfate_supplyFunctionAboveground, 3},
    {"_medfate_supplyFunctionNetwork", (DL_FUNC) &_medfate_supplyFunctionNetwork, 3},
    {"_medfate_regulatedPsiXylem", (DL_FUNC) &_medfate_regulatedPsiXylem, 6},
    {"_medfate_regulatedPsiTwoElements", (DL_FUNC) &_medfate_regulatedPsiTwoElements, 10},
    {"_medfate_maximumSoilPlantConductance", (DL_FUNC) &_medfate_maximumSoilPlantConductance, 4},
    {"_medfate_soilPlantResistancesSigmoid", (DL_FUNC) &_medfate_soilPlantResistancesSigmoid, 18},
    {"_medfate_soilPlantResistancesWeibull", (DL_FUNC) &_medfate_soilPlantResistancesWeibull, 18},
    {"_medfate_rootxylemConductanceProportions", (DL_FUNC) &_medfate_rootxylemConductanceProportions, 2},
    {"_medfate_Psi2K_c", (DL_FUNC) &_medfate_Psi2K_c, 3},
    {"_medfate_K2Psi_c", (DL_FUNC) &_medfate_K2Psi_c, 3},
    {"_medfate_xylemConductance_c", (DL_FUNC) &_medfate_xylemConductance_c, 4},
    {"_medfate_xylemConductanceSigmoid_c", (DL_FUNC) &_medfate_xylemConductanceSigmoid_c, 4},
    {"_medfate_xylemPsi_c", (DL_FUNC) &_medfate_xylemPsi_c, 4},
    {"_medfate_psiCrit_c", (DL_FUNC) &_medfate_psiCrit_c, 3},
    {"_medfate_vanGenuchtenConductance_c", (DL_FUNC) &_medfate_vanGenuchtenConductance_c, 4},
    {"_medfate_correctConductanceForViscosity_c", (DL_FUNC) &_medfate_correctConductanceForViscosity_c, 2},
    {"_medfate_Egamma_c", (DL_FUNC) &_medfate_Egamma_c, 5},
    {"_medfate_Egammainv_c", (DL_FUNC) &_medfate_Egammainv_c, 5},
    {"_medfate_EXylem_c", (DL_FUNC) &_medfate_EXylem_c, 7},
    {"_medfate_E2psiXylem_c", (DL_FUNC) &_medfate_E2psiXylem_c, 6},
    {"_medfate_E2psiXylemUp_c", (DL_FUNC) &_medfate_E2psiXylemUp_c, 6},
    {"_medfate_EVanGenuchten_c", (DL_FUNC) &_medfate_EVanGenuchten_c, 6},
    {"_medfate_ECrit_c", (DL_FUNC) &_medfate_ECrit_c, 5},
    {"_medfate_E2psiVanGenuchten_c", (DL_FUNC) &_medfate_E2psiVanGenuchten_c, 7},
    {"_medfate_E2psiTwoElements_c", (DL_FUNC) &_medfate_E2psiTwoElements_c, 11},
    {"_medfate_proportionDefoliationSigmoid_c", (DL_FUNC) &_medfate_proportionDefoliationSigmoid_c, 5},
    {"_medfate_proportionDefoliationWeibull_c", (DL_FUNC) &_medfate_proportionDefoliationWeibull_c, 5},
    {"_medfate_averageRhizosphereResistancePercent_c", (DL_FUNC) &_medfate_averageRhizosphereResistancePercent_c, 13},
    {"_medfate_findRhizosphereMaximumConductance_c", (DL_FUNC) &_medfate_findRhizosphereMaximumConductance_c, 13},
    {"_medfate_taperFactorSavage_c", (DL_FUNC) &_medfate_taperFactorSavage_c, 1},
    {"_medfate_terminalConduitRadius_c", (DL_FUNC) &_medfate_terminalConduitRadius_c, 1},
    {"_medfate_referenceConductivityHeightFactor_c", (DL_FUNC) &_medfate_referenceConductivityHeightFactor_c, 2},
    {"_medfate_maximumStemHydraulicConductance_c", (DL_FUNC) &_medfate_maximumStemHydraulicConductance_c, 5},
    {"_medfate_rainfallIntensity", (DL_FUNC) &_medfate_rainfallIntensity, 3},
    {"_medfate_soilEvaporation", (DL_FUNC) &_medfate_soilEvaporation, 6},
    {"_medfate_herbaceousTranspiration", (DL_FUNC) &_medfate_herbaceousTranspiration, 6},
    {"_medfate_infiltrationRepartition", (DL_FUNC) &_medfate_infiltrationRepartition, 5},
    {"_medfate_infiltrationAmount", (DL_FUNC) &_medfate_infiltrationAmount, 6},
    {"_medfate_waterInputs", (DL_FUNC) &_medfate_waterInputs, 11},
    {"_medfate_agricultureWaterInputs", (DL_FUNC) &_medfate_agricultureWaterInputs, 7},
    {"_medfate_soilWaterBalance", (DL_FUNC) &_medfate_soilWaterBalance, 15},
    {"_medfate_soilEvaporationAmount_c", (DL_FUNC) &_medfate_soilEvaporationAmount_c, 3},
    {"_medfate_interceptionGashDay_c", (DL_FUNC) &_medfate_interceptionGashDay_c, 4},
    {"_medfate_interceptionLiuDay_c", (DL_FUNC) &_medfate_interceptionLiuDay_c, 4},
    {"_medfate_infiltrationBoughton_c", (DL_FUNC) &_medfate_infiltrationBoughton_c, 2},
    {"_medfate_infitrationGreenAmpt_c", (DL_FUNC) &_medfate_infitrationGreenAmpt_c, 5},
    {"_medfate_snowMelt_c", (DL_FUNC) &_medfate_snowMelt_c, 4},
    {"_medfate_gammln_c", (DL_FUNC) &_medfate_gammln_c, 1},
    {"_medfate_betacf_c", (DL_FUNC) &_medfate_betacf_c, 3},
    {"_medfate_incbeta_c", (DL_FUNC) &_medfate_incbeta_c, 3},
    {"_medfate_invincgam_c", (DL_FUNC) &_medfate_invincgam_c, 3},
    {"_medfate_gammds_c", (DL_FUNC) &_medfate_gammds_c, 2},
    {"_medfate_initSperryNetworks", (DL_FUNC) &_medfate_initSperryNetworks, 1},
    {"_medfate_profitMaximization", (DL_FUNC) &_medfate_profitMaximization, 4},
    {"_medfate_initSureauNetworks", (DL_FUNC) &_medfate_initSureauNetworks, 1},
    {"_medfate_semi_implicit_integration", (DL_FUNC) &_medfate_semi_implicit_integration, 5},
    {"_medfate_leafAngleBetaParameters", (DL_FUNC) &_medfate_leafAngleBetaParameters, 2},
    {"_medfate_layerDirectIrradianceFraction", (DL_FUNC) &_medfate_layerDirectIrradianceFraction, 8},
    {"_medfate_layerDiffuseIrradianceFraction", (DL_FUNC) &_medfate_layerDiffuseIrradianceFraction, 9},
    {"_medfate_cohortSunlitShadeAbsorbedRadiation", (DL_FUNC) &_medfate_cohortSunlitShadeAbsorbedRadiation, 12},
    {"_medfate_layerSunlitFraction", (DL_FUNC) &_medfate_layerSunlitFraction, 4},
    {"_medfate_instantaneousLightExtinctionAbsortion", (DL_FUNC) &_medfate_instantaneousLightExtinctionAbsortion, 11},
    {"_medfate_longwaveRadiationSHAW", (DL_FUNC) &_medfate_longwaveRadiationSHAW, 7},
    {"_medfate_leafAngleCDF_c", (DL_FUNC) &_medfate_leafAngleCDF_c, 3},
    {"_medfate_directionalExtinctionCoefficient_c", (DL_FUNC) &_medfate_directionalExtinctionCoefficient_c, 3},
    {"_medfate_parcohort", (DL_FUNC) &_medfate_parcohort, 5},
    {"_medfate_PARcohort", (DL_FUNC) &_medfate_PARcohort, 3},
    {"_medfate_parheight", (DL_FUNC) &_medfate_parheight, 4},
    {"_medfate_PARground", (DL_FUNC) &_medfate_PARground, 3},
    {"_medfate_swrheight", (DL_FUNC) &_medfate_swrheight, 4},
    {"_medfate_SWRground", (DL_FUNC) &_medfate_SWRground, 3},
    {"_medfate_parExtinctionProfile", (DL_FUNC) &_medfate_parExtinctionProfile, 5},
    {"_medfate_swrExtinctionProfile", (DL_FUNC) &_medfate_swrExtinctionProfile, 5},
    {"_medfate_cohortAbsorbedSWRFraction", (DL_FUNC) &_medfate_cohortAbsorbedSWRFraction, 4},
    {"_medfate_paramsBelow", (DL_FUNC) &_medfate_paramsBelow, 8},
    {"_medfate_medfateVersionString", (DL_FUNC) &_medfate_medfateVersionString, 0},
    {"_medfate_isLowerVersion", (DL_FUNC) &_medfate_isLowerVersion, 1},
    {"_medfate_spwbInputVersionUpdate", (DL_FUNC) &_medfate_spwbInputVersionUpdate, 1},
    {"_medfate_growthInputVersionUpdate", (DL_FUNC) &_medfate_growthInputVersionUpdate, 1},
    {"_medfate_spwbInputInner", (DL_FUNC) &_medfate_spwbInputInner, 8},
    {"_medfate_growthInputInner", (DL_FUNC) &_medfate_growthInputInner, 11},
    {"_medfate_cloneInput", (DL_FUNC) &_medfate_cloneInput, 1},
    {"_medfate_rootDistributionComplete", (DL_FUNC) &_medfate_rootDistributionComplete, 4},
    {"_medfate_spwbInput", (DL_FUNC) &_medfate_spwbInput, 4},
    {"_medfate_growthInput", (DL_FUNC) &_medfate_growthInput, 4},
    {"_medfate_forest2spwbInput", (DL_FUNC) &_medfate_forest2spwbInput, 4},
    {"_medfate_forest2growthInput", (DL_FUNC) &_medfate_forest2growthInput, 4},
    {"_medfate_resetInputs", (DL_FUNC) &_medfate_resetInputs, 1},
    {"_medfate_updateBelow", (DL_FUNC) &_medfate_updateBelow, 1},
    {"_medfate_multiplyInputParam", (DL_FUNC) &_medfate_multiplyInputParam, 6},
    {"_medfate_modifyInputParam", (DL_FUNC) &_medfate_modifyInputParam, 6},
    {"_medfate_testModelInputToStructure", (DL_FUNC) &_medfate_testModelInputToStructure, 1},
    {"_medfate_checkSpeciesParameters", (DL_FUNC) &_medfate_checkSpeciesParameters, 2},
    {"_medfate_speciesNumericParameterFromIndex", (DL_FUNC) &_medfate_speciesNumericParameterFromIndex, 3},
    {"_medfate_speciesCharacterParameterFromIndex", (DL_FUNC) &_medfate_speciesCharacterParameterFromIndex, 3},
    {"_medfate_speciesCharacterParameter", (DL_FUNC) &_medfate_speciesCharacterParameter, 3},
    {"_medfate_cohortCharacterParameter", (DL_FUNC) &_medfate_cohortCharacterParameter, 3},
    {"_medfate_speciesNumericParameterWithImputation", (DL_FUNC) &_medfate_speciesNumericParameterWithImputation, 5},
    {"_medfate_cohortNumericParameterWithImputation", (DL_FUNC) &_medfate_cohortNumericParameterWithImputation, 5},
    {"_medfate_gdd", (DL_FUNC) &_medfate_gdd, 4},
    {"_medfate_leafDevelopmentStatus", (DL_FUNC) &_medfate_leafDevelopmentStatus, 3},
    {"_medfate_leafSenescenceStatus", (DL_FUNC) &_medfate_leafSenescenceStatus, 2},
    {"_medfate_updatePhenology", (DL_FUNC) &_medfate_updatePhenology, 4},
    {"_medfate_updateLeaves", (DL_FUNC) &_medfate_updateLeaves, 3},
    {"_medfate_leafphotosynthesis", (DL_FUNC) &_medfate_leafphotosynthesis, 7},
    {"_medfate_photosynthesisBaldocchi", (DL_FUNC) &_medfate_photosynthesisBaldocchi, 9},
    {"_medfate_leafPhotosynthesisFunction", (DL_FUNC) &_medfate_leafPhotosynthesisFunction, 14},
    {"_medfate_leafPhotosynthesisFunction2", (DL_FUNC) &_medfate_leafPhotosynthesisFunction2, 15},
    {"_medfate_sunshadePhotosynthesisFunction", (DL_FUNC) &_medfate_sunshadePhotosynthesisFunction, 19},
    {"_medfate_multilayerPhotosynthesisFunction", (DL_FUNC) &_medfate_multilayerPhotosynthesisFunction, 17},
    {"_medfate_gammaTemp_c", (DL_FUNC) &_medfate_gammaTemp_c, 1},
    {"_medfate_KmTemp_c", (DL_FUNC) &_medfate_KmTemp_c, 2},
    {"_medfate_VmaxTemp_c", (DL_FUNC) &_medfate_VmaxTemp_c, 2},
    {"_medfate_JmaxTemp_c", (DL_FUNC) &_medfate_JmaxTemp_c, 2},
    {"_medfate_electronLimitedPhotosynthesis_c", (DL_FUNC) &_medfate_electronLimitedPhotosynthesis_c, 4},
    {"_medfate_rubiscoLimitedPhotosynthesis_c", (DL_FUNC) &_medfate_rubiscoLimitedPhotosynthesis_c, 4},
    {"_medfate_conicDistribution", (DL_FUNC) &_medfate_conicDistribution, 2},
    {"_medfate_ldrDistribution", (DL_FUNC) &_medfate_ldrDistribution, 4},
    {"_medfate_rootDistribution", (DL_FUNC) &_medfate_rootDistribution, 2},
    {"_medfate_individualRootedGroundArea", (DL_FUNC) &_medfate_individualRootedGroundArea, 4},
    {"_medfate_fineRootAreaIndex", (DL_FUNC) &_medfate_fineRootAreaIndex, 6},
    {"_medfate_fineRootBiomassPerIndividual", (DL_FUNC) &_medfate_fineRootBiomassPerIndividual, 7},
    {"_medfate_rhizosphereMaximumConductance", (DL_FUNC) &_medfate_rhizosphereMaximumConductance, 7},
    {"_medfate_coarseRootSoilVolumeFromConductance", (DL_FUNC) &_medfate_coarseRootSoilVolumeFromConductance, 6},
    {"_medfate_coarseRootLengthsFromVolume", (DL_FUNC) &_medfate_coarseRootLengthsFromVolume, 4},
    {"_medfate_coarseRootLengths", (DL_FUNC) &_medfate_coarseRootLengths, 3},
    {"_medfate_coarseRootSoilVolume", (DL_FUNC) &_medfate_coarseRootSoilVolume, 3},
    {"_medfate_horizontalProportions", (DL_FUNC) &_medfate_horizontalProportions, 6},
    {"_medfate_fineRootRadius_c", (DL_FUNC) &_medfate_fineRootRadius_c, 2},
    {"_medfate_specificRootSurfaceArea_c", (DL_FUNC) &_medfate_specificRootSurfaceArea_c, 2},
    {"_medfate_fineRootSoilVolume_c", (DL_FUNC) &_medfate_fineRootSoilVolume_c, 3},
    {"_medfate_fineRootHalfDistance_c", (DL_FUNC) &_medfate_fineRootHalfDistance_c, 1},
    {"_medfate_rhizosphereMaximumConductance_c", (DL_FUNC) &_medfate_rhizosphereMaximumConductance_c, 7},
    {"_medfate_USDAType", (DL_FUNC) &_medfate_USDAType, 2},
    {"_medfate_thetaFC", (DL_FUNC) &_medfate_thetaFC, 2},
    {"_medfate_thetaWP", (DL_FUNC) &_medfate_thetaWP, 2},
    {"_medfate_thetaSAT", (DL_FUNC) &_medfate_thetaSAT, 2},
    {"_medfate_waterFC", (DL_FUNC) &_medfate_waterFC, 2},
    {"_medfate_waterSAT", (DL_FUNC) &_medfate_waterSAT, 2},
    {"_medfate_waterWP", (DL_FUNC) &_medfate_waterWP, 2},
    {"_medfate_waterPsi", (DL_FUNC) &_medfate_waterPsi, 3},
    {"_medfate_waterExtractable", (DL_FUNC) &_medfate_waterExtractable, 3},
    {"_medfate_theta", (DL_FUNC) &_medfate_theta, 2},
    {"_medfate_water", (DL_FUNC) &_medfate_water, 2},
    {"_medfate_rockWeight2Volume", (DL_FUNC) &_medfate_rockWeight2Volume, 3},
    {"_medfate_psi", (DL_FUNC) &_medfate_psi, 2},
    {"_medfate_conductivity", (DL_FUNC) &_medfate_conductivity, 3},
    {"_medfate_capacitance", (DL_FUNC) &_medfate_capacitance, 2},
    {"_medfate_saturatedWaterDepth", (DL_FUNC) &_medfate_saturatedWaterDepth, 2},
    {"_medfate_vanGenuchtenParamsCarsel", (DL_FUNC) &_medfate_vanGenuchtenParamsCarsel, 1},
    {"_medfate_campbellParamsClappHornberger", (DL_FUNC) &_medfate_campbellParamsClappHornberger, 1},
    {"_medfate_vanGenuchtenParamsToth", (DL_FUNC) &_medfate_vanGenuchtenParamsToth, 5},
    {"_medfate_soilInit", (DL_FUNC) &_medfate_soilInit, 2},
    {"_medfate_modifySoilLayerParam", (DL_FUNC) &_medfate_modifySoilLayerParam, 5},
    {"_medfate_testSoilDataFrameToStructure", (DL_FUNC) &_medfate_testSoilDataFrameToStructure, 2},
    {"_medfate_saturatedConductivitySaxton_c", (DL_FUNC) &_medfate_saturatedConductivitySaxton_c, 5},
    {"_medfate_unsaturatedConductivitySaxton_c", (DL_FUNC) &_medfate_unsaturatedConductivitySaxton_c, 6},
    {"_medfate_thetaSATSaxton_c", (DL_FUNC) &_medfate_thetaSATSaxton_c, 3},
    {"_medfate_theta2psiSaxton_c", (DL_FUNC) &_medfate_theta2psiSaxton_c, 4},
    {"_medfate_psi2thetaSaxton_c", (DL_FUNC) &_medfate_psi2thetaSaxton_c, 4},
    {"_medfate_psi2kVanGenuchten_c", (DL_FUNC) &_medfate_psi2kVanGenuchten_c, 6},
    {"_medfate_psi2cVanGenuchten_c", (DL_FUNC) &_medfate_psi2cVanGenuchten_c, 5},
    {"_medfate_psi2thetaVanGenuchten_c", (DL_FUNC) &_medfate_psi2thetaVanGenuchten_c, 5},
    {"_medfate_theta2psiVanGenuchten_c", (DL_FUNC) &_medfate_theta2psiVanGenuchten_c, 5},
    {"_medfate_thermalCapacity", (DL_FUNC) &_medfate_thermalCapacity, 2},
    {"_medfate_thermalConductivity", (DL_FUNC) &_medfate_thermalConductivity, 2},
    {"_medfate_temperatureGradient", (DL_FUNC) &_medfate_temperatureGradient, 2},
    {"_medfate_temperatureChange", (DL_FUNC) &_medfate_temperatureChange, 9},
    {"_medfate_temperatureGradient_c", (DL_FUNC) &_medfate_temperatureGradient_c, 3},
    {"_medfate_getWeatherDates", (DL_FUNC) &_medfate_getWeatherDates, 1},
    {"_medfate_defineSPWBDailyOutput", (DL_FUNC) &_medfate_defineSPWBDailyOutput, 6},
    {"_medfate_fillSPWBDailyOutput", (DL_FUNC) &_medfate_fillSPWBDailyOutput, 4},
    {"_medfate_spwb", (DL_FUNC) &_medfate_spwb, 8},
    {"_medfate_pwb", (DL_FUNC) &_medfate_pwb, 12},
    {"_medfate_spwbDay", (DL_FUNC) &_medfate_spwbDay, 11},
    {"_medfate_aspwbDay", (DL_FUNC) &_medfate_aspwbDay, 11},
    {"_medfate_sapwoodWaterCapacity", (DL_FUNC) &_medfate_sapwoodWaterCapacity, 5},
    {"_medfate_plantWaterContent", (DL_FUNC) &_medfate_plantWaterContent, 1},
    {"_medfate_leafWaterCapacity_c", (DL_FUNC) &_medfate_leafWaterCapacity_c, 2},
    {"_medfate_turgorLossPoint_c", (DL_FUNC) &_medfate_turgorLossPoint_c, 2},
    {"_medfate_symplasticRelativeWaterContent_c", (DL_FUNC) &_medfate_symplasticRelativeWaterContent_c, 3},
    {"_medfate_symplasticWaterPotential_c", (DL_FUNC) &_medfate_symplasticWaterPotential_c, 3},
    {"_medfate_apoplasticRelativeWaterContent_c", (DL_FUNC) &_medfate_apoplasticRelativeWaterContent_c, 3},
    {"_medfate_apoplasticWaterPotential_c", (DL_FUNC) &_medfate_apoplasticWaterPotential_c, 3},
    {"_medfate_tissueRelativeWaterContent_c", (DL_FUNC) &_medfate_tissueRelativeWaterContent_c, 7},
    {"_medfate_transpirationSperry", (DL_FUNC) &_medfate_transpirationSperry, 13},
    {"_medfate_transpirationSureau", (DL_FUNC) &_medfate_transpirationSureau, 12},
    {"_medfate_transpirationGranier", (DL_FUNC) &_medfate_transpirationGranier, 8},
    {"_medfate_windCanopyTurbulenceModel", (DL_FUNC) &_medfate_windCanopyTurbulenceModel, 6},
    {"_medfate_windCanopyTurbulence", (DL_FUNC) &_medfate_windCanopyTurbulence, 6},
    {"_medfate_windSpeedAtCanopyHeight_c", (DL_FUNC) &_medfate_windSpeedAtCanopyHeight_c, 2},
    {"_medfate_unshelteredMidflameWindSpeed_c", (DL_FUNC) &_medfate_unshelteredMidflameWindSpeed_c, 2},
    {"_medfate_shelteredMidflameWindSpeed_c", (DL_FUNC) &_medfate_shelteredMidflameWindSpeed_c, 3},
    {"_medfate_windAdjustmentFactor_c", (DL_FUNC) &_medfate_windAdjustmentFactor_c, 4},
    {"_medfate_windSpeedAtHeightOverCanopy_c", (DL_FUNC) &_medfate_windSpeedAtHeightOverCanopy_c, 3},
    {"_medfate_initialize_ring", (DL_FUNC) &_medfate_initialize_ring, 0},
    {"_medfate_grow_ring", (DL_FUNC) &_medfate_grow_ring, 11},
    {"_medfate_temperature_function_c", (DL_FUNC) &_medfate_temperature_function_c, 5},
    {"_medfate_relative_expansion_rate_c", (DL_FUNC) &_medfate_relative_expansion_rate_c, 6},
    {"_rcpp_module_boot_runners", (DL_FUNC) &_rcpp_module_boot_runners, 0},
    {"_medfate_RcppExport_registerCCallable", (DL_FUNC) &_medfate_RcppExport_registerCCallable, 0},
    {NULL, NULL, 0}
};

RcppExport void R_init_medfate(DllInfo *dll) {
    R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
    R_useDynamicSymbols(dll, FALSE);
}
