From 3782a317796b8e1847cd1b20253276a83d5d38d0 Mon Sep 17 00:00:00 2001 From: Peter La Follette Date: Wed, 15 Jan 2025 12:54:21 -0800 Subject: [PATCH] reverting variable name change --- include/all.hxx | 6 +++--- src/aet.cxx | 2 +- src/lgar.cxx | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/all.hxx b/include/all.hxx index bbf8bd7..ef6a617 100755 --- a/include/all.hxx +++ b/include/all.hxx @@ -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); @@ -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 diff --git a/src/aet.cxx b/src/aet.cxx index 883292a..1ad608f 100644 --- a/src/aet.cxx +++ b/src/aet.cxx @@ -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; diff --git a/src/lgar.cxx b/src/lgar.cxx index 67af296..c1d2ad4 100755 --- a/src/lgar.cxx +++ b/src/lgar.cxx @@ -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) @@ -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); @@ -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; @@ -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); @@ -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;