Skip to content

Commit

Permalink
reverting variable name change
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter La Follette authored and Peter La Follette committed Jan 15, 2025
1 parent 6860b30 commit 3782a31
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions include/all.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ extern double lgar_insert_water(bool use_closed_form_G, int nint, double timeste
// double old_mass, int number_of_layers, double *actual_ET_demand,
// double *cum_layer_thickness_cm, int *soil_type_by_layer, double *frozen_factor,
// struct wetting_front** head, struct wetting_front* state_previous, struct soil_properties_ *soil_properties);
extern double lgar_move_wetting_fronts(bool TO_enabled, double timestep_h, double *free_drainage_subtimestep_cm, double PET_subtimestep_cm, double wilting_point_psi_cm, double field_capacity_psi_cm, double root_zone_depth_cm,
extern double lgar_move_wetting_fronts(bool TO_enabled, double timestep_h, double *free_drainage_timestep_cm, double PET_subtimestep_cm, double wilting_point_psi_cm, double field_capacity_psi_cm, double root_zone_depth_cm,
double *volin_cm, int wf_free_drainage_demand, double old_mass, int num_layers, double surf_frac_rz, double *AET_demand_cm, double *cum_layer_thickness_cm,
int *soil_type, double *frozen_factor, struct wetting_front** head,
struct wetting_front* state_previous, struct soil_properties_ *soil_properties, double *surf_AET_vec);
Expand Down Expand Up @@ -413,10 +413,10 @@ extern void calc_aet(bool TO_enabled, double PET_timestep_cm, double time_step_h
extern double calc_aet_for_individual_TO_WFs(int WF_num, double WF_thickness_cm, double rooting_zone_depth, double PET_timestep_cm, double time_step_h, double wilting_point_psi_cm,
double field_capacity_psi_cm, int *soil_type, struct soil_properties_ *soil_properties, struct wetting_front** head);

extern double lgarto_calc_aet_from_TO_WFs(int num_layers, double deepest_surf_depth_at_start, double root_zone_depth, double PET_subtimestep_cm, double timestep_h, double surf_frac_rz,
extern double lgarto_calc_aet_from_TO_WFs(int num_layers, double deepest_surf_depth_at_start, double root_zone_depth, double PET_timestep_cm, double timestep_h, double surf_frac_rz,
double wilting_point_psi_cm, double field_capacity_psi_cm, int *soil_type, double *cum_layer_thickness_cm, struct soil_properties_ *soil_properties, struct wetting_front** head);

extern void lgarto_ensure_rooting_zone_population(double rzd, double PET_subtimestep_cm, int *soil_type, struct soil_properties_ *soil_properties, struct wetting_front** head);
extern void lgarto_ensure_rooting_zone_population(double rzd, double PET_timestep_cm, int *soil_type, struct soil_properties_ *soil_properties, struct wetting_front** head);


extern int lgarto_correction_type(int num_layers, double* cum_layer_thickness_cm, struct wetting_front** head);//returns an integer that describes which type of layer boundary crossing or WF merging is necessary, for all WFs
Expand Down
2 changes: 1 addition & 1 deletion src/aet.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ extern double calc_aet_for_individual_TO_WFs(int WF_num, double WF_thickness_cm,
}


extern double lgarto_calc_aet_from_TO_WFs(int num_layers, double deepest_surf_depth_at_start, double root_zone_depth, double PET_subtimestep_cm, double timestep_h, double surf_frac_rz,
extern double lgarto_calc_aet_from_TO_WFs(int num_layers, double deepest_surf_depth_at_start, double root_zone_depth, double PET_timestep_cm, double timestep_h, double surf_frac_rz,
double wilting_point_psi_cm, double field_capacity_psi_cm, int *soil_type, double *cum_layer_thickness_cm, struct soil_properties_ *soil_properties, struct wetting_front** head){

struct wetting_front *current;
Expand Down
10 changes: 5 additions & 5 deletions src/lgar.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1125,7 +1125,7 @@ extern int wetting_front_free_drainage(struct wetting_front* head) {
Note: '_old' denotes the wetting_front or variables at the previous timestep (or state)
*/
// #######################################################################################################
extern double lgar_move_wetting_fronts(bool TO_enabled, double timestep_h, double *free_drainage_subtimestep_cm, double PET_subtimestep_cm, double wilting_point_psi_cm, double field_capacity_psi_cm, double root_zone_depth_cm,
extern double lgar_move_wetting_fronts(bool TO_enabled, double timestep_h, double *free_drainage_subtimestep_cm, double PET_timestep_cm, double wilting_point_psi_cm, double field_capacity_psi_cm, double root_zone_depth_cm,
double *volin_cm, int wf_free_drainage_demand, double old_mass, int num_layers, double surf_frac_rz, double *AET_demand_cm, double *cum_layer_thickness_cm,
int *soil_type, double *frozen_factor, struct wetting_front** head,
struct wetting_front* state_previous, struct soil_properties_ *soil_properties, double *surf_AET_vec)
Expand Down Expand Up @@ -1800,7 +1800,7 @@ extern double lgar_move_wetting_fronts(bool TO_enabled, double timestep_h, doubl
listPrint(*head);
}

double cumulative_ET_from_TO_WFs_cm = lgarto_calc_aet_from_TO_WFs(num_layers, deepest_surf_depth_at_start, root_zone_depth, PET_subtimestep_cm, timestep_h, surf_frac_rz,
double cumulative_ET_from_TO_WFs_cm = lgarto_calc_aet_from_TO_WFs(num_layers, deepest_surf_depth_at_start, root_zone_depth, PET_timestep_cm, timestep_h, surf_frac_rz,
wilting_point_psi_cm, field_capacity_psi_cm, soil_type, cum_layer_thickness_cm, soil_properties, head);


Expand All @@ -1811,7 +1811,7 @@ extern double lgar_move_wetting_fronts(bool TO_enabled, double timestep_h, doubl
}

double AET_in_TO_WFs_cm = 0.0;
lgarto_ensure_rooting_zone_population(root_zone_depth, PET_subtimestep_cm, soil_type, soil_properties, head);
lgarto_ensure_rooting_zone_population(root_zone_depth, PET_timestep_cm, soil_type, soil_properties, head);

*AET_demand_cm += cumulative_ET_from_TO_WFs_cm;

Expand Down Expand Up @@ -4292,7 +4292,7 @@ extern void lgarto_resolve_TO_WF_between_surf_WFs(int *soil_type, struct soil_pr
}


extern void lgarto_ensure_rooting_zone_population(double rzd, double PET_subtimestep_cm, int *soil_type, struct soil_properties_ *soil_properties, struct wetting_front** head){
extern void lgarto_ensure_rooting_zone_population(double rzd, double PET_timestep_cm, int *soil_type, struct soil_properties_ *soil_properties, struct wetting_front** head){
if (verbosity.compare("high") == 0) {
printf("states before lgarto_ensure_rooting_zone_population: \n");
listPrint(*head);
Expand All @@ -4301,7 +4301,7 @@ extern void lgarto_ensure_rooting_zone_population(double rzd, double PET_subtime
struct wetting_front *current;
current = *head;

while (( (num_TO_WFs_in_rz - listLength_surface(*head))<4) && (PET_subtimestep_cm>0.0) && (listLength_surface(*head)==0) && current->psi_cm<1.E6 ){//the 1.E-6 ensures that we don't get absurdly dry WFs towards surface
while (( (num_TO_WFs_in_rz - listLength_surface(*head))<4) && (PET_timestep_cm>0.0) && (listLength_surface(*head)==0) && current->psi_cm<1.E6 ){//the 1.E-6 ensures that we don't get absurdly dry WFs towards surface
// while (( (num_TO_WFs_in_rz - listLength_surface(*head))<15) && current->psi_cm<1.E6 ){//the 1.E-6 ensures that we don't get absurdly dry WFs towards surface
//high accuracy version: use the version where new wetting fronts are created regardless of PET
current = *head;
Expand Down

0 comments on commit 3782a31

Please sign in to comment.