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

#ifndef RCPP_medfate_RCPPEXPORTS_H_GEN_
#define RCPP_medfate_RCPPEXPORTS_H_GEN_

#include <Rcpp.h>

namespace medfate {

    using namespace Rcpp;

    namespace {
        void validateSignature(const char* sig) {
            Rcpp::Function require = Rcpp::Environment::base_env()["require"];
            require("medfate", Rcpp::Named("quietly") = true);
            typedef int(*Ptr_validate)(const char*);
            static Ptr_validate p_validate = (Ptr_validate)
                R_GetCCallable("medfate", "_medfate_RcppExport_validate");
            if (!p_validate(sig)) {
                throw Rcpp::function_not_exported(
                    "C++ function with signature '" + std::string(sig) + "' not found in medfate");
            }
        }
    }

    inline double hydrology_erFactor(int doy, double pet, double prec, double Rconv = 5.6, double Rsyn = 1.5) {
        typedef SEXP(*Ptr_hydrology_erFactor)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_hydrology_erFactor p_hydrology_erFactor = NULL;
        if (p_hydrology_erFactor == NULL) {
            validateSignature("double(*hydrology_erFactor)(int,double,double,double,double)");
            p_hydrology_erFactor = (Ptr_hydrology_erFactor)R_GetCCallable("medfate", "_medfate_hydrology_erFactor");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_hydrology_erFactor(Shield<SEXP>(Rcpp::wrap(doy)), Shield<SEXP>(Rcpp::wrap(pet)), Shield<SEXP>(Rcpp::wrap(prec)), Shield<SEXP>(Rcpp::wrap(Rconv)), Shield<SEXP>(Rcpp::wrap(Rsyn)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<double >(rcpp_result_gen);
    }

    inline double hydrology_soilEvaporationAmount(double DEF, double PETs, double Gsoil) {
        typedef SEXP(*Ptr_hydrology_soilEvaporationAmount)(SEXP,SEXP,SEXP);
        static Ptr_hydrology_soilEvaporationAmount p_hydrology_soilEvaporationAmount = NULL;
        if (p_hydrology_soilEvaporationAmount == NULL) {
            validateSignature("double(*hydrology_soilEvaporationAmount)(double,double,double)");
            p_hydrology_soilEvaporationAmount = (Ptr_hydrology_soilEvaporationAmount)R_GetCCallable("medfate", "_medfate_hydrology_soilEvaporationAmount");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_hydrology_soilEvaporationAmount(Shield<SEXP>(Rcpp::wrap(DEF)), Shield<SEXP>(Rcpp::wrap(PETs)), Shield<SEXP>(Rcpp::wrap(Gsoil)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<double >(rcpp_result_gen);
    }

    inline NumericVector hydrology_soilEvaporation(List soil, String soilFunctions, double pet, double LgroundSWR, bool modifySoil = true) {
        typedef SEXP(*Ptr_hydrology_soilEvaporation)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_hydrology_soilEvaporation p_hydrology_soilEvaporation = NULL;
        if (p_hydrology_soilEvaporation == NULL) {
            validateSignature("NumericVector(*hydrology_soilEvaporation)(List,String,double,double,bool)");
            p_hydrology_soilEvaporation = (Ptr_hydrology_soilEvaporation)R_GetCCallable("medfate", "_medfate_hydrology_soilEvaporation");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_hydrology_soilEvaporation(Shield<SEXP>(Rcpp::wrap(soil)), Shield<SEXP>(Rcpp::wrap(soilFunctions)), Shield<SEXP>(Rcpp::wrap(pet)), Shield<SEXP>(Rcpp::wrap(LgroundSWR)), Shield<SEXP>(Rcpp::wrap(modifySoil)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline double _hydrology_infiltrationAmount(double input, double Ssoil) {
        typedef SEXP(*Ptr__hydrology_infiltrationAmount)(SEXP,SEXP);
        static Ptr__hydrology_infiltrationAmount p__hydrology_infiltrationAmount = NULL;
        if (p__hydrology_infiltrationAmount == NULL) {
            validateSignature("double(*_hydrology_infiltrationAmount)(double,double)");
            p__hydrology_infiltrationAmount = (Ptr__hydrology_infiltrationAmount)R_GetCCallable("medfate", "_medfate__hydrology_infiltrationAmount");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p__hydrology_infiltrationAmount(Shield<SEXP>(Rcpp::wrap(input)), Shield<SEXP>(Rcpp::wrap(Ssoil)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<double >(rcpp_result_gen);
    }

    inline NumericVector hydrology_infiltrationRepartition(double I, NumericVector dVec, NumericVector macro, double a = -0.005, double b = 3.0) {
        typedef SEXP(*Ptr_hydrology_infiltrationRepartition)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_hydrology_infiltrationRepartition p_hydrology_infiltrationRepartition = NULL;
        if (p_hydrology_infiltrationRepartition == NULL) {
            validateSignature("NumericVector(*hydrology_infiltrationRepartition)(double,NumericVector,NumericVector,double,double)");
            p_hydrology_infiltrationRepartition = (Ptr_hydrology_infiltrationRepartition)R_GetCCallable("medfate", "_medfate_hydrology_infiltrationRepartition");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_hydrology_infiltrationRepartition(Shield<SEXP>(Rcpp::wrap(I)), Shield<SEXP>(Rcpp::wrap(dVec)), Shield<SEXP>(Rcpp::wrap(macro)), Shield<SEXP>(Rcpp::wrap(a)), Shield<SEXP>(Rcpp::wrap(b)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline double _hydrology_interceptionGashDay(double Precipitation, double Cm, double p, double ER = 0.05) {
        typedef SEXP(*Ptr__hydrology_interceptionGashDay)(SEXP,SEXP,SEXP,SEXP);
        static Ptr__hydrology_interceptionGashDay p__hydrology_interceptionGashDay = NULL;
        if (p__hydrology_interceptionGashDay == NULL) {
            validateSignature("double(*_hydrology_interceptionGashDay)(double,double,double,double)");
            p__hydrology_interceptionGashDay = (Ptr__hydrology_interceptionGashDay)R_GetCCallable("medfate", "_medfate__hydrology_interceptionGashDay");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p__hydrology_interceptionGashDay(Shield<SEXP>(Rcpp::wrap(Precipitation)), Shield<SEXP>(Rcpp::wrap(Cm)), Shield<SEXP>(Rcpp::wrap(p)), Shield<SEXP>(Rcpp::wrap(ER)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<double >(rcpp_result_gen);
    }

    inline double hydrology_snowMelt(double tday, double rad, double LgroundSWR, double elevation) {
        typedef SEXP(*Ptr_hydrology_snowMelt)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_hydrology_snowMelt p_hydrology_snowMelt = NULL;
        if (p_hydrology_snowMelt == NULL) {
            validateSignature("double(*hydrology_snowMelt)(double,double,double,double)");
            p_hydrology_snowMelt = (Ptr_hydrology_snowMelt)R_GetCCallable("medfate", "_medfate_hydrology_snowMelt");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_hydrology_snowMelt(Shield<SEXP>(Rcpp::wrap(tday)), Shield<SEXP>(Rcpp::wrap(rad)), Shield<SEXP>(Rcpp::wrap(LgroundSWR)), Shield<SEXP>(Rcpp::wrap(elevation)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<double >(rcpp_result_gen);
    }

    inline NumericVector hydrology_soilWaterInputs(List soil, String soilFunctions, double prec, double er, double tday, double rad, double elevation, double Cm, double LgroundPAR, double LgroundSWR, double runon = 0.0, bool snowpack = true, bool modifySoil = true) {
        typedef SEXP(*Ptr_hydrology_soilWaterInputs)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_hydrology_soilWaterInputs p_hydrology_soilWaterInputs = NULL;
        if (p_hydrology_soilWaterInputs == NULL) {
            validateSignature("NumericVector(*hydrology_soilWaterInputs)(List,String,double,double,double,double,double,double,double,double,double,bool,bool)");
            p_hydrology_soilWaterInputs = (Ptr_hydrology_soilWaterInputs)R_GetCCallable("medfate", "_medfate_hydrology_soilWaterInputs");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_hydrology_soilWaterInputs(Shield<SEXP>(Rcpp::wrap(soil)), Shield<SEXP>(Rcpp::wrap(soilFunctions)), Shield<SEXP>(Rcpp::wrap(prec)), Shield<SEXP>(Rcpp::wrap(er)), Shield<SEXP>(Rcpp::wrap(tday)), Shield<SEXP>(Rcpp::wrap(rad)), Shield<SEXP>(Rcpp::wrap(elevation)), Shield<SEXP>(Rcpp::wrap(Cm)), Shield<SEXP>(Rcpp::wrap(LgroundPAR)), Shield<SEXP>(Rcpp::wrap(LgroundSWR)), Shield<SEXP>(Rcpp::wrap(runon)), Shield<SEXP>(Rcpp::wrap(snowpack)), Shield<SEXP>(Rcpp::wrap(modifySoil)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector hydrology_soilInfiltrationPercolation(List soil, String soilFunctions, double waterInput, bool drainage = true, bool modifySoil = true) {
        typedef SEXP(*Ptr_hydrology_soilInfiltrationPercolation)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_hydrology_soilInfiltrationPercolation p_hydrology_soilInfiltrationPercolation = NULL;
        if (p_hydrology_soilInfiltrationPercolation == NULL) {
            validateSignature("NumericVector(*hydrology_soilInfiltrationPercolation)(List,String,double,bool,bool)");
            p_hydrology_soilInfiltrationPercolation = (Ptr_hydrology_soilInfiltrationPercolation)R_GetCCallable("medfate", "_medfate_hydrology_soilInfiltrationPercolation");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_hydrology_soilInfiltrationPercolation(Shield<SEXP>(Rcpp::wrap(soil)), Shield<SEXP>(Rcpp::wrap(soilFunctions)), Shield<SEXP>(Rcpp::wrap(waterInput)), Shield<SEXP>(Rcpp::wrap(drainage)), Shield<SEXP>(Rcpp::wrap(modifySoil)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline double soil_thetaSATSX(double clay, double sand, double om = NA_REAL) {
        typedef SEXP(*Ptr_soil_thetaSATSX)(SEXP,SEXP,SEXP);
        static Ptr_soil_thetaSATSX p_soil_thetaSATSX = NULL;
        if (p_soil_thetaSATSX == NULL) {
            validateSignature("double(*soil_thetaSATSX)(double,double,double)");
            p_soil_thetaSATSX = (Ptr_soil_thetaSATSX)R_GetCCallable("medfate", "_medfate_soil_thetaSATSX");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_soil_thetaSATSX(Shield<SEXP>(Rcpp::wrap(clay)), Shield<SEXP>(Rcpp::wrap(sand)), Shield<SEXP>(Rcpp::wrap(om)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<double >(rcpp_result_gen);
    }

    inline double soil_theta2psiSX(double clay, double sand, double theta, double om = NA_REAL) {
        typedef SEXP(*Ptr_soil_theta2psiSX)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_soil_theta2psiSX p_soil_theta2psiSX = NULL;
        if (p_soil_theta2psiSX == NULL) {
            validateSignature("double(*soil_theta2psiSX)(double,double,double,double)");
            p_soil_theta2psiSX = (Ptr_soil_theta2psiSX)R_GetCCallable("medfate", "_medfate_soil_theta2psiSX");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_soil_theta2psiSX(Shield<SEXP>(Rcpp::wrap(clay)), Shield<SEXP>(Rcpp::wrap(sand)), Shield<SEXP>(Rcpp::wrap(theta)), Shield<SEXP>(Rcpp::wrap(om)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<double >(rcpp_result_gen);
    }

    inline double soil_psi2thetaSX(double clay, double sand, double psi, double om = NA_REAL) {
        typedef SEXP(*Ptr_soil_psi2thetaSX)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_soil_psi2thetaSX p_soil_psi2thetaSX = NULL;
        if (p_soil_psi2thetaSX == NULL) {
            validateSignature("double(*soil_psi2thetaSX)(double,double,double,double)");
            p_soil_psi2thetaSX = (Ptr_soil_psi2thetaSX)R_GetCCallable("medfate", "_medfate_soil_psi2thetaSX");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_soil_psi2thetaSX(Shield<SEXP>(Rcpp::wrap(clay)), Shield<SEXP>(Rcpp::wrap(sand)), Shield<SEXP>(Rcpp::wrap(psi)), Shield<SEXP>(Rcpp::wrap(om)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<double >(rcpp_result_gen);
    }

    inline double soil_psi2thetaVG(double n, double alpha, double theta_res, double theta_sat, double psi) {
        typedef SEXP(*Ptr_soil_psi2thetaVG)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_soil_psi2thetaVG p_soil_psi2thetaVG = NULL;
        if (p_soil_psi2thetaVG == NULL) {
            validateSignature("double(*soil_psi2thetaVG)(double,double,double,double,double)");
            p_soil_psi2thetaVG = (Ptr_soil_psi2thetaVG)R_GetCCallable("medfate", "_medfate_soil_psi2thetaVG");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_soil_psi2thetaVG(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(alpha)), Shield<SEXP>(Rcpp::wrap(theta_res)), Shield<SEXP>(Rcpp::wrap(theta_sat)), Shield<SEXP>(Rcpp::wrap(psi)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<double >(rcpp_result_gen);
    }

    inline double soil_theta2psiVG(double n, double alpha, double theta_res, double theta_sat, double theta) {
        typedef SEXP(*Ptr_soil_theta2psiVG)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_soil_theta2psiVG p_soil_theta2psiVG = NULL;
        if (p_soil_theta2psiVG == NULL) {
            validateSignature("double(*soil_theta2psiVG)(double,double,double,double,double)");
            p_soil_theta2psiVG = (Ptr_soil_theta2psiVG)R_GetCCallable("medfate", "_medfate_soil_theta2psiVG");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_soil_theta2psiVG(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(alpha)), Shield<SEXP>(Rcpp::wrap(theta_res)), Shield<SEXP>(Rcpp::wrap(theta_sat)), Shield<SEXP>(Rcpp::wrap(theta)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<double >(rcpp_result_gen);
    }

    inline String soil_USDAType(double clay, double sand) {
        typedef SEXP(*Ptr_soil_USDAType)(SEXP,SEXP);
        static Ptr_soil_USDAType p_soil_USDAType = NULL;
        if (p_soil_USDAType == NULL) {
            validateSignature("String(*soil_USDAType)(double,double)");
            p_soil_USDAType = (Ptr_soil_USDAType)R_GetCCallable("medfate", "_medfate_soil_USDAType");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_soil_USDAType(Shield<SEXP>(Rcpp::wrap(clay)), Shield<SEXP>(Rcpp::wrap(sand)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<String >(rcpp_result_gen);
    }

    inline NumericVector soil_vanGenuchtenParamsCarsel(String soilType) {
        typedef SEXP(*Ptr_soil_vanGenuchtenParamsCarsel)(SEXP);
        static Ptr_soil_vanGenuchtenParamsCarsel p_soil_vanGenuchtenParamsCarsel = NULL;
        if (p_soil_vanGenuchtenParamsCarsel == NULL) {
            validateSignature("NumericVector(*soil_vanGenuchtenParamsCarsel)(String)");
            p_soil_vanGenuchtenParamsCarsel = (Ptr_soil_vanGenuchtenParamsCarsel)R_GetCCallable("medfate", "_medfate_soil_vanGenuchtenParamsCarsel");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_soil_vanGenuchtenParamsCarsel(Shield<SEXP>(Rcpp::wrap(soilType)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector soil_vanGenuchtenParamsToth(double clay, double sand, double om, double bd, bool topsoil) {
        typedef SEXP(*Ptr_soil_vanGenuchtenParamsToth)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_soil_vanGenuchtenParamsToth p_soil_vanGenuchtenParamsToth = NULL;
        if (p_soil_vanGenuchtenParamsToth == NULL) {
            validateSignature("NumericVector(*soil_vanGenuchtenParamsToth)(double,double,double,double,bool)");
            p_soil_vanGenuchtenParamsToth = (Ptr_soil_vanGenuchtenParamsToth)R_GetCCallable("medfate", "_medfate_soil_vanGenuchtenParamsToth");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_soil_vanGenuchtenParamsToth(Shield<SEXP>(Rcpp::wrap(clay)), Shield<SEXP>(Rcpp::wrap(sand)), Shield<SEXP>(Rcpp::wrap(om)), Shield<SEXP>(Rcpp::wrap(bd)), Shield<SEXP>(Rcpp::wrap(topsoil)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector soil_temperatureGradient(NumericVector dVec, NumericVector Temp) {
        typedef SEXP(*Ptr_soil_temperatureGradient)(SEXP,SEXP);
        static Ptr_soil_temperatureGradient p_soil_temperatureGradient = NULL;
        if (p_soil_temperatureGradient == NULL) {
            validateSignature("NumericVector(*soil_temperatureGradient)(NumericVector,NumericVector)");
            p_soil_temperatureGradient = (Ptr_soil_temperatureGradient)R_GetCCallable("medfate", "_medfate_soil_temperatureGradient");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_soil_temperatureGradient(Shield<SEXP>(Rcpp::wrap(dVec)), Shield<SEXP>(Rcpp::wrap(Temp)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector soil_temperatureChange(NumericVector dVec, NumericVector Temp, NumericVector sand, NumericVector clay, NumericVector W, NumericVector Theta_FC, double Gdown) {
        typedef SEXP(*Ptr_soil_temperatureChange)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_soil_temperatureChange p_soil_temperatureChange = NULL;
        if (p_soil_temperatureChange == NULL) {
            validateSignature("NumericVector(*soil_temperatureChange)(NumericVector,NumericVector,NumericVector,NumericVector,NumericVector,NumericVector,double)");
            p_soil_temperatureChange = (Ptr_soil_temperatureChange)R_GetCCallable("medfate", "_medfate_soil_temperatureChange");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_soil_temperatureChange(Shield<SEXP>(Rcpp::wrap(dVec)), Shield<SEXP>(Rcpp::wrap(Temp)), Shield<SEXP>(Rcpp::wrap(sand)), Shield<SEXP>(Rcpp::wrap(clay)), Shield<SEXP>(Rcpp::wrap(W)), Shield<SEXP>(Rcpp::wrap(Theta_FC)), Shield<SEXP>(Rcpp::wrap(Gdown)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline List soil(DataFrame SoilParams, String VG_PTF = "Toth", NumericVector W = NumericVector::create(1.0), double SWE = 0.0) {
        typedef SEXP(*Ptr_soil)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_soil p_soil = NULL;
        if (p_soil == NULL) {
            validateSignature("List(*soil)(DataFrame,String,NumericVector,double)");
            p_soil = (Ptr_soil)R_GetCCallable("medfate", "_medfate_soil");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_soil(Shield<SEXP>(Rcpp::wrap(SoilParams)), Shield<SEXP>(Rcpp::wrap(VG_PTF)), Shield<SEXP>(Rcpp::wrap(W)), Shield<SEXP>(Rcpp::wrap(SWE)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<List >(rcpp_result_gen);
    }

    inline NumericVector soil_thetaFC(List soil, String model = "SX") {
        typedef SEXP(*Ptr_soil_thetaFC)(SEXP,SEXP);
        static Ptr_soil_thetaFC p_soil_thetaFC = NULL;
        if (p_soil_thetaFC == NULL) {
            validateSignature("NumericVector(*soil_thetaFC)(List,String)");
            p_soil_thetaFC = (Ptr_soil_thetaFC)R_GetCCallable("medfate", "_medfate_soil_thetaFC");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_soil_thetaFC(Shield<SEXP>(Rcpp::wrap(soil)), Shield<SEXP>(Rcpp::wrap(model)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector soil_thetaWP(List soil, String model = "SX") {
        typedef SEXP(*Ptr_soil_thetaWP)(SEXP,SEXP);
        static Ptr_soil_thetaWP p_soil_thetaWP = NULL;
        if (p_soil_thetaWP == NULL) {
            validateSignature("NumericVector(*soil_thetaWP)(List,String)");
            p_soil_thetaWP = (Ptr_soil_thetaWP)R_GetCCallable("medfate", "_medfate_soil_thetaWP");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_soil_thetaWP(Shield<SEXP>(Rcpp::wrap(soil)), Shield<SEXP>(Rcpp::wrap(model)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector soil_thetaSAT(List soil, String model = "SX") {
        typedef SEXP(*Ptr_soil_thetaSAT)(SEXP,SEXP);
        static Ptr_soil_thetaSAT p_soil_thetaSAT = NULL;
        if (p_soil_thetaSAT == NULL) {
            validateSignature("NumericVector(*soil_thetaSAT)(List,String)");
            p_soil_thetaSAT = (Ptr_soil_thetaSAT)R_GetCCallable("medfate", "_medfate_soil_thetaSAT");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_soil_thetaSAT(Shield<SEXP>(Rcpp::wrap(soil)), Shield<SEXP>(Rcpp::wrap(model)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector soil_waterFC(List soil, String model = "SX") {
        typedef SEXP(*Ptr_soil_waterFC)(SEXP,SEXP);
        static Ptr_soil_waterFC p_soil_waterFC = NULL;
        if (p_soil_waterFC == NULL) {
            validateSignature("NumericVector(*soil_waterFC)(List,String)");
            p_soil_waterFC = (Ptr_soil_waterFC)R_GetCCallable("medfate", "_medfate_soil_waterFC");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_soil_waterFC(Shield<SEXP>(Rcpp::wrap(soil)), Shield<SEXP>(Rcpp::wrap(model)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector soil_waterSAT(List soil, String model = "SX") {
        typedef SEXP(*Ptr_soil_waterSAT)(SEXP,SEXP);
        static Ptr_soil_waterSAT p_soil_waterSAT = NULL;
        if (p_soil_waterSAT == NULL) {
            validateSignature("NumericVector(*soil_waterSAT)(List,String)");
            p_soil_waterSAT = (Ptr_soil_waterSAT)R_GetCCallable("medfate", "_medfate_soil_waterSAT");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_soil_waterSAT(Shield<SEXP>(Rcpp::wrap(soil)), Shield<SEXP>(Rcpp::wrap(model)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector soil_waterWP(List soil, String model = "SX") {
        typedef SEXP(*Ptr_soil_waterWP)(SEXP,SEXP);
        static Ptr_soil_waterWP p_soil_waterWP = NULL;
        if (p_soil_waterWP == NULL) {
            validateSignature("NumericVector(*soil_waterWP)(List,String)");
            p_soil_waterWP = (Ptr_soil_waterWP)R_GetCCallable("medfate", "_medfate_soil_waterWP");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_soil_waterWP(Shield<SEXP>(Rcpp::wrap(soil)), Shield<SEXP>(Rcpp::wrap(model)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector soil_waterExtractable(List soil, String model = "SX", double minPsi = -5.0) {
        typedef SEXP(*Ptr_soil_waterExtractable)(SEXP,SEXP,SEXP);
        static Ptr_soil_waterExtractable p_soil_waterExtractable = NULL;
        if (p_soil_waterExtractable == NULL) {
            validateSignature("NumericVector(*soil_waterExtractable)(List,String,double)");
            p_soil_waterExtractable = (Ptr_soil_waterExtractable)R_GetCCallable("medfate", "_medfate_soil_waterExtractable");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_soil_waterExtractable(Shield<SEXP>(Rcpp::wrap(soil)), Shield<SEXP>(Rcpp::wrap(model)), Shield<SEXP>(Rcpp::wrap(minPsi)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector soil_theta(List soil, String model = "SX") {
        typedef SEXP(*Ptr_soil_theta)(SEXP,SEXP);
        static Ptr_soil_theta p_soil_theta = NULL;
        if (p_soil_theta == NULL) {
            validateSignature("NumericVector(*soil_theta)(List,String)");
            p_soil_theta = (Ptr_soil_theta)R_GetCCallable("medfate", "_medfate_soil_theta");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_soil_theta(Shield<SEXP>(Rcpp::wrap(soil)), Shield<SEXP>(Rcpp::wrap(model)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector soil_water(List soil, String model = "SX") {
        typedef SEXP(*Ptr_soil_water)(SEXP,SEXP);
        static Ptr_soil_water p_soil_water = NULL;
        if (p_soil_water == NULL) {
            validateSignature("NumericVector(*soil_water)(List,String)");
            p_soil_water = (Ptr_soil_water)R_GetCCallable("medfate", "_medfate_soil_water");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_soil_water(Shield<SEXP>(Rcpp::wrap(soil)), Shield<SEXP>(Rcpp::wrap(model)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline double soil_rockWeight2Volume(double pWeight, double bulkDensity, double rockDensity = 2.3) {
        typedef SEXP(*Ptr_soil_rockWeight2Volume)(SEXP,SEXP,SEXP);
        static Ptr_soil_rockWeight2Volume p_soil_rockWeight2Volume = NULL;
        if (p_soil_rockWeight2Volume == NULL) {
            validateSignature("double(*soil_rockWeight2Volume)(double,double,double)");
            p_soil_rockWeight2Volume = (Ptr_soil_rockWeight2Volume)R_GetCCallable("medfate", "_medfate_soil_rockWeight2Volume");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_soil_rockWeight2Volume(Shield<SEXP>(Rcpp::wrap(pWeight)), Shield<SEXP>(Rcpp::wrap(bulkDensity)), Shield<SEXP>(Rcpp::wrap(rockDensity)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<double >(rcpp_result_gen);
    }

    inline NumericVector soil_psi(List soil, String model = "SX") {
        typedef SEXP(*Ptr_soil_psi)(SEXP,SEXP);
        static Ptr_soil_psi p_soil_psi = NULL;
        if (p_soil_psi == NULL) {
            validateSignature("NumericVector(*soil_psi)(List,String)");
            p_soil_psi = (Ptr_soil_psi)R_GetCCallable("medfate", "_medfate_soil_psi");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_soil_psi(Shield<SEXP>(Rcpp::wrap(soil)), Shield<SEXP>(Rcpp::wrap(model)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline double soil_waterTableDepth(List soil, String model = "SX") {
        typedef SEXP(*Ptr_soil_waterTableDepth)(SEXP,SEXP);
        static Ptr_soil_waterTableDepth p_soil_waterTableDepth = NULL;
        if (p_soil_waterTableDepth == NULL) {
            validateSignature("double(*soil_waterTableDepth)(List,String)");
            p_soil_waterTableDepth = (Ptr_soil_waterTableDepth)R_GetCCallable("medfate", "_medfate_soil_waterTableDepth");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_soil_waterTableDepth(Shield<SEXP>(Rcpp::wrap(soil)), Shield<SEXP>(Rcpp::wrap(model)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<double >(rcpp_result_gen);
    }

    inline NumericVector soil_thermalCapacity(List soil, String model = "SX") {
        typedef SEXP(*Ptr_soil_thermalCapacity)(SEXP,SEXP);
        static Ptr_soil_thermalCapacity p_soil_thermalCapacity = NULL;
        if (p_soil_thermalCapacity == NULL) {
            validateSignature("NumericVector(*soil_thermalCapacity)(List,String)");
            p_soil_thermalCapacity = (Ptr_soil_thermalCapacity)R_GetCCallable("medfate", "_medfate_soil_thermalCapacity");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_soil_thermalCapacity(Shield<SEXP>(Rcpp::wrap(soil)), Shield<SEXP>(Rcpp::wrap(model)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector soil_thermalConductivity(List soil, String model = "SX") {
        typedef SEXP(*Ptr_soil_thermalConductivity)(SEXP,SEXP);
        static Ptr_soil_thermalConductivity p_soil_thermalConductivity = NULL;
        if (p_soil_thermalConductivity == NULL) {
            validateSignature("NumericVector(*soil_thermalConductivity)(List,String)");
            p_soil_thermalConductivity = (Ptr_soil_thermalConductivity)R_GetCCallable("medfate", "_medfate_soil_thermalConductivity");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_soil_thermalConductivity(Shield<SEXP>(Rcpp::wrap(soil)), Shield<SEXP>(Rcpp::wrap(model)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline List spwb_day(List x, List soil, CharacterVector date, double tmin, double tmax, double rhmin, double rhmax, double rad, double wind, double latitude, double elevation, double slope, double aspect, double prec, double runon = 0.0) {
        typedef SEXP(*Ptr_spwb_day)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_spwb_day p_spwb_day = NULL;
        if (p_spwb_day == NULL) {
            validateSignature("List(*spwb_day)(List,List,CharacterVector,double,double,double,double,double,double,double,double,double,double,double,double)");
            p_spwb_day = (Ptr_spwb_day)R_GetCCallable("medfate", "_medfate_spwb_day");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_spwb_day(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(soil)), Shield<SEXP>(Rcpp::wrap(date)), Shield<SEXP>(Rcpp::wrap(tmin)), Shield<SEXP>(Rcpp::wrap(tmax)), Shield<SEXP>(Rcpp::wrap(rhmin)), Shield<SEXP>(Rcpp::wrap(rhmax)), Shield<SEXP>(Rcpp::wrap(rad)), Shield<SEXP>(Rcpp::wrap(wind)), Shield<SEXP>(Rcpp::wrap(latitude)), Shield<SEXP>(Rcpp::wrap(elevation)), Shield<SEXP>(Rcpp::wrap(slope)), Shield<SEXP>(Rcpp::wrap(aspect)), Shield<SEXP>(Rcpp::wrap(prec)), Shield<SEXP>(Rcpp::wrap(runon)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<List >(rcpp_result_gen);
    }

    inline void spwb_resetInputs(List x, List soil, List from = R_NilValue, int day = NA_INTEGER) {
        typedef SEXP(*Ptr_spwb_resetInputs)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_spwb_resetInputs p_spwb_resetInputs = NULL;
        if (p_spwb_resetInputs == NULL) {
            validateSignature("void(*spwb_resetInputs)(List,List,List,int)");
            p_spwb_resetInputs = (Ptr_spwb_resetInputs)R_GetCCallable("medfate", "_medfate_spwb_resetInputs");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_spwb_resetInputs(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(soil)), Shield<SEXP>(Rcpp::wrap(from)), Shield<SEXP>(Rcpp::wrap(day)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
    }

    inline List spwb(List x, List soil, DataFrame meteo, double latitude = NA_REAL, double elevation = NA_REAL, double slope = NA_REAL, double aspect = NA_REAL) {
        typedef SEXP(*Ptr_spwb)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_spwb p_spwb = NULL;
        if (p_spwb == NULL) {
            validateSignature("List(*spwb)(List,List,DataFrame,double,double,double,double)");
            p_spwb = (Ptr_spwb)R_GetCCallable("medfate", "_medfate_spwb");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_spwb(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(soil)), Shield<SEXP>(Rcpp::wrap(meteo)), Shield<SEXP>(Rcpp::wrap(latitude)), Shield<SEXP>(Rcpp::wrap(elevation)), Shield<SEXP>(Rcpp::wrap(slope)), Shield<SEXP>(Rcpp::wrap(aspect)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<List >(rcpp_result_gen);
    }

    inline List pwb(List x, List soil, DataFrame meteo, NumericMatrix W, double latitude = NA_REAL, double elevation = NA_REAL, double slope = NA_REAL, double aspect = NA_REAL, NumericVector canopyEvaporation = NumericVector(0), NumericVector snowMelt = NumericVector(0), NumericVector soilEvaporation = NumericVector(0)) {
        typedef SEXP(*Ptr_pwb)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_pwb p_pwb = NULL;
        if (p_pwb == NULL) {
            validateSignature("List(*pwb)(List,List,DataFrame,NumericMatrix,double,double,double,double,NumericVector,NumericVector,NumericVector)");
            p_pwb = (Ptr_pwb)R_GetCCallable("medfate", "_medfate_pwb");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_pwb(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(soil)), Shield<SEXP>(Rcpp::wrap(meteo)), Shield<SEXP>(Rcpp::wrap(W)), Shield<SEXP>(Rcpp::wrap(latitude)), Shield<SEXP>(Rcpp::wrap(elevation)), Shield<SEXP>(Rcpp::wrap(slope)), Shield<SEXP>(Rcpp::wrap(aspect)), Shield<SEXP>(Rcpp::wrap(canopyEvaporation)), Shield<SEXP>(Rcpp::wrap(snowMelt)), Shield<SEXP>(Rcpp::wrap(soilEvaporation)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<List >(rcpp_result_gen);
    }

}

#endif // RCPP_medfate_RCPPEXPORTS_H_GEN_
