Commit 71c4ff0a authored by Ethan Coon's avatar Ethan Coon
Browse files

alters cpp version to call the interfaced version

parent 03952e53
#ifndef ELM_CANOPY_HYDROLOGY_INTERFACE_HH_
#define ELM_CANOPY_HYDROLOGY_INTERFACE_HH_
#include "CanopyHydrology_private.h"
namespace ELM {
void CanopyHydrologyKern1(double dtime,
......@@ -8,7 +10,7 @@ void CanopyHydrologyKern1(double dtime,
const int& ltype, const int& ctype,
const bool& urbpoi, const bool& do_capsnow,
const double& elai, const double& esai,
const double& dewmx, const double& frac_veg_nosno,
const double& dewmx, const int& frac_veg_nosno,
double& h2ocan,
int& n_irrig_steps_left,
double& qflx_prec_intr,
......@@ -17,7 +19,13 @@ void CanopyHydrologyKern1(double dtime,
double& qflx_snwcp_liq,
double& qflx_snwcp_ice,
double& qflx_snow_grnd_patch,
double& qflx_rain_grnd);
double& qflx_rain_grnd) {
canopyhydrologykern1_(&dtime, &forc_rain, &forc_snow, &irrig_rate,
&ltype, &ctype, &urbpoi, &do_capsnow, &elai, &esai,
&dewmx, &frac_veg_nosno, &h2ocan, &n_irrig_steps_left,
&qflx_prec_intr, &qflx_irrig, &qflx_prec_grnd,
&qflx_snwcp_liq, &qflx_snwcp_ice, & qflx_snow_grnd_patch, &qflx_rain_grnd);
}
} // namespace
......
......@@ -10,7 +10,7 @@
#include <iostream>
using namespace std;
#include "CanopyHydrology_private.h"
#include "CanopyHydrology.hh"
#define handle_error( status, what ) \
......@@ -124,14 +124,14 @@ int main(int argc, char ** argv)
n_irrig_steps_left = 0;
urbpoi = false;
do_capsnow = false;
canopyhydrologykern1_(&dtime,
&forc_rain, &forc_snow, &irrig_rate,
&ltype, &ctype, &urbpoi, &do_capsnow,
&elai, &esai, &dewmx, &frac_veg_nosno,
&h2ocan, &n_irrig_steps_left,
&qflx_prec_intr, &qflx_irrig, &qflx_prec_grnd,
&qflx_snwcp_liq, &qflx_snwcp_ice,
&qflx_snow_grnd_patch, &qflx_rain_grnd);
ELM::CanopyHydrologyKern1(dtime, forc_snow, forc_snow, irrig_rate,
ltype, ctype, urbpoi, do_capsnow,
elai, esai, dewmx, frac_veg_nosno,
h2ocan, n_irrig_steps_left,
qflx_prec_intr, qflx_irrig, qflx_prec_grnd,
qflx_snwcp_liq, qflx_snwcp_ice,
qflx_snow_grnd_patch, qflx_rain_grnd);
//printf("[ %d,%E,%4.4f,%E,%E]\n",itime, forc_rain, h2ocan, qflx_prec_grnd, qflx_prec_intr);
std::cout << "[ " << itime << " , " << forc_rain<< " , " << h2ocan<< " , " << qflx_prec_grnd<< " , " << qflx_prec_intr << " ]" << std::endl;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment