Skip to content

Commit

Permalink
Resolving issue #116. All unit tests now pass for rSOILWAT2. Added ca…
Browse files Browse the repository at this point in the history
…ll to get_critical_rank() and updated submodule to point to most recent commit which re-structures get_swa to correctly work with rSOILWAt2
  • Loading branch information
BrendenBe1 committed Apr 6, 2018
1 parent 74c8a9c commit 1ab301f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/SOILWAT2
7 changes: 7 additions & 0 deletions src/rSW_VegProd.c
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,13 @@ void onSet_SW_VPD(SEXP SW_VPD) {
v->veg[SW_TREES].SWPcrit = -10 * REAL(CSWP)[2]; //Tree
v->veg[SW_FORBS].SWPcrit = -10 * REAL(CSWP)[3]; //Forb

// getting critSoilWater for use with SWA and get_critical_rank()
// critSoilWater goes tree, shrub, forb, grass
SW_VegProd.critSoilWater[0] = REAL(CSWP)[2];
SW_VegProd.critSoilWater[1] = REAL(CSWP)[1];
SW_VegProd.critSoilWater[2] = REAL(CSWP)[3];
SW_VegProd.critSoilWater[3] = REAL(CSWP)[0];

PROTECT(MonthlyVeg = GET_SLOT(SW_VPD, install(cVegProd_names[12])));
PROTECT(Grasslands = VECTOR_ELT(MonthlyVeg, SW_GRASS));
p_Grasslands = REAL(Grasslands);
Expand Down

0 comments on commit 1ab301f

Please sign in to comment.