Skip to content

Commit

Permalink
Changes to be committed:
Browse files Browse the repository at this point in the history
	modified:   vic/vic_run/include/vic_def.h
	modified:   vic/vic_run/src/compute_irrig_demand.c
  • Loading branch information
Zhaocheng Wang committed Jun 12, 2019
1 parent 5ff0a7a commit 88ae57a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
3 changes: 2 additions & 1 deletion vic/vic_run/include/vic_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ enum
{
IRR_SAT,
IRR_FC,
IRR_CR
IRR_CR,
IRR_WP
};

/***** Data Structures *****/
Expand Down
11 changes: 7 additions & 4 deletions vic/vic_run/src/compute_irrig_demand.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,18 @@ compute_irrig_demand(cell_data_struct *cell,
irr_sm_thresh = soil_con->max_moist[thresh_idx];
else if (veg_lib->ithresh == IRR_FC)
irr_sm_thresh = soil_con->Wcr[thresh_idx] / 0.7;
else
irr_sm_thresh = soil_con->Wcr[thresh_idx]; // critical point in most cases
else if (veg_lib->ithresh == IRR_CR)
irr_sm_thresh = soil_con->Wcr[thresh_idx]; // critical point in urban area
else
irr_sm_thresh = soil_con->Wpwp[thresh_idx]; // wilting point in most cases
if (irr_sm_thresh > soil_con->max_moist[thresh_idx])
irr_sm_thresh = soil_con->max_moist[thresh_idx];
if (veg_lib->itarget == IRR_SAT)
irr_sm_target = soil_con->max_moist[target_idx];
else
else if (veg_lib->itarget == IRR_FC)
irr_sm_target = soil_con->Wcr[target_idx] / 0.7; // field capacity in most cases

else
irr_sm_target = soil_con->Wcr[thresh_idx]; // critical point in urban area
if (irr_sm_target > soil_con->max_moist[target_idx])
irr_sm_target = soil_con->max_moist[target_idx];
if (moistfract < irr_sm_thresh)
Expand Down

0 comments on commit 88ae57a

Please sign in to comment.