Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove standard topmodel output when running from ngen #41

Merged
Merged
Changes from 1 commit
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
11b32be
testing fork
Ben-Choat Jul 25, 2023
bfea366
removing test file
Ben-Choat Jul 25, 2023
fe7cd9b
Failed attempt at implementing calibratable params
Ben-Choat Aug 9, 2023
bdc39b0
backup/scratch working files to be removed later
Ben-Choat Aug 9, 2023
4d40b80
fixing an accidental comment included with this file
Ben-Choat Aug 9, 2023
9c0745c
remove nstep dt from config and set to 1 in else block initalize - fi…
Ben-Choat Aug 9, 2023
122ae65
refactoring init to smaller functions
Ben-Choat Aug 15, 2023
e29eed6
refactored init() into smaller functions
Ben-Choat Aug 16, 2023
d8c7221
refactored init() into smaller functions
Ben-Choat Aug 16, 2023
bbfa55c
refactored init() to smaller functions
Ben-Choat Aug 16, 2023
60dbc77
refactoring init() to smaller functions - update comments
Ben-Choat Aug 16, 2023
53b0419
refactored init() to smaller functions - added missing \+
Ben-Choat Aug 16, 2023
76a8988
removing file that was not intended to push originally, and was only …
Ben-Choat Aug 29, 2023
840028c
adding refactored init() function to update calibratable parameters
Ben-Choat Aug 29, 2023
5607002
better organizing and adding comments in code
Ben-Choat Aug 29, 2023
59ae02d
removing folder that was not not originally intended to push
Ben-Choat Aug 29, 2023
8264d68
updating commenting and including new init functions in bmi_topmodel.c
Ben-Choat Aug 30, 2023
7756c24
edited init() prototype tp match change of order of input variables i…
Ben-Choat Aug 30, 2023
aca60e7
changed order of init() input variables so outputs come last. Also up…
Ben-Choat Aug 30, 2023
54675ee
imporved comments and organization
Ben-Choat Aug 31, 2023
558f90a
Toward updating calibratable params with refactored functions
Ben-Choat Aug 31, 2023
7c1f590
added lines to include chv, rv as paramters and include the prototype…
Ben-Choat Aug 31, 2023
9eb924f
updating comments for clarity
Ben-Choat Sep 5, 2023
9eb91bf
actively working on using refactored init() functions to update calib…
Ben-Choat Sep 5, 2023
116d98c
added chv & rv to model data structure. Updated order of init() proto…
Ben-Choat Sep 6, 2023
5529661
updated Set_value function to incorporate calibratable parameters. St…
Ben-Choat Sep 6, 2023
609fa10
updated order of init() input variables. Added some print statements …
Ben-Choat Sep 6, 2023
55298a8
updated output messages related to calibratable parameters
Ben-Choat Sep 6, 2023
fb822d2
made small edits to Set_value - removed uneeded calibratable parameters
Ben-Choat Sep 6, 2023
14f875d
updated code related to calibrated parameters in Set_value().
Ben-Choat Sep 7, 2023
379f352
edited order of refactored functions to be more logical. added print …
Ben-Choat Sep 7, 2023
8c5d597
added a few print lines for troubleshooting. Unexpected behavior rela…
Ben-Choat Sep 7, 2023
f6a8ca8
removed print statements no longer needed/relevant
Ben-Choat Sep 8, 2023
aca081d
removed/edited comments no longer needed
Ben-Choat Sep 8, 2023
1bbd41d
small updates to comments
Ben-Choat Sep 11, 2023
c524a3a
updating some comments
Ben-Choat Sep 11, 2023
6e58fd1
updated comments
Ben-Choat Sep 11, 2023
1b06db4
removed uneeded comments
Ben-Choat Sep 11, 2023
cfbdec5
corrected a typo in comments
Ben-Choat Sep 11, 2023
3b25e5c
add helper function to shift Q array by one
hellkite500 Sep 20, 2023
98c2a1c
properly account for time delayed flow accumulation in Q
hellkite500 Sep 20, 2023
c81f69d
use dynamic tch array in convert_dist_to_histords
hellkite500 Sep 20, 2023
00db5ea
use dynamic tch array in calc_time_delay_histogram
hellkite500 Sep 20, 2023
dd56d13
simplify ordinate area adjustment and validate oridnates sum to 1
hellkite500 Sep 20, 2023
b625c15
ensure Q is dynamically initialized
hellkite500 Sep 20, 2023
0042550
Add macros for model limit warnings
hellkite500 Sep 20, 2023
da5b500
Remove hard coded program limits
hellkite500 Sep 20, 2023
92c6017
fix logical operator
hellkite500 Sep 20, 2023
8bd02b6
small combine loop optimization
hellkite500 Sep 20, 2023
625e351
add debug and sanitize flags to unit test build
hellkite500 Sep 20, 2023
fc066cb
fix bug in printing value from pointer
hellkite500 Sep 20, 2023
2ffd6e4
comment bmi Q initialization
hellkite500 Sep 20, 2023
76c3b3f
temporarly 'fix' standalone mode allocation of Q in driver
hellkite500 Sep 20, 2023
1978a88
Corrected amount Q is shifted by at each timestep to include num_dela…
Ben-Choat Sep 21, 2023
38f3a95
Added stand_alone to init() and init_discharge, and edited to allocat…
Ben-Choat Sep 22, 2023
8c7ad8c
fixed error - szq and sum_histogram_ordinates were reported incorrect…
Ben-Choat Sep 25, 2023
9f3b0e0
cleaned up some indentation/formatting
Ben-Choat Sep 26, 2023
0c346a4
Edited so standard topmodel output files are only written when in sta…
Ben-Choat Sep 29, 2023
51959a2
added if statements so info about calibratable parameters is only pri…
Ben-Choat Sep 29, 2023
aec96a6
added stand_alone as input to water balance to fix seg fault when in …
Ben-Choat Sep 29, 2023
9330aec
Merge remote-tracking branch 'origin/master' into remove-topmodel-out…
Ben-Choat Jan 15, 2024
7dfb805
merging w/master
Ben-Choat Jan 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
added lines to include chv, rv as paramters and include the prototype…
…s of the new functions
  • Loading branch information
Ben-Choat committed Aug 31, 2023
commit 7c1f590d38a115df8a29c59fb55cd05e25d5a0d7
28 changes: 18 additions & 10 deletions include/topmodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,24 @@
#define TOPMODEL_DEBUG 0

/*** Function/subroutine prototypes ***/
//extern void init(FILE *in_param_fptr,FILE *output_fptr,char *subcat,
// int num_channels,int num_topodex_values,
// int yes_print_output, double area,double **time_delay_histogram,
// double *cum_dist_area_with_dist,double dt, double *szm, double *t0,
// double tl, double *dist_from_outlet,double *td, double *srmax,
// double *Q0,double *sr0, int *infex, double *xk0, double *hf,
// double *dth,double **stor_unsat_zone,double **deficit_local,
// double **deficit_root_zone,double *szq, double *Q,double *sbar,
// int max_atb_increments, int max_time_delay_ordinates,
// double *bal,int *num_time_delay_histo_ords, int *num_delay);
extern void convert_dist_to_histords(double *dist_from_outlet, int num_channels,
double chv, double rv, double dt, double tch[11]);

extern void calc_time_delay_histogram(int max_time_delay_ordinates, int num_channels, double area,
double tch[11], double *cum_dist_area_with_dist,
int *num_time_delay_histo_ords, int *num_delay, double **time_delay_histogram);

extern void init_water_balance(int max_atb_increments,
int num_topodex_values, double dt, double *sr0,
double *szm, double *Q0, double *t0, double tl,
double **stor_unsat_zone, double *szq,
double **deficit_local, double **deficit_root_zone,
double *sbar, double *bal);

extern void init_discharge_array(int *num_delay, double *Q0, double area,
int *num_time_delay_histo_ords, double **time_delay_histogram,
double *Q);

extern void init(FILE *in_param_fptr, FILE *output_fptr, char *subcat,
int num_channels, int num_topodex_values, int yes_print_output,
double area, double **time_delay_histogram,
Expand Down