Skip to content

Commit

Permalink
Merge branch 'master' into CalibParams_bmi_topmodel
Browse files Browse the repository at this point in the history
  • Loading branch information
madMatchstick authored Dec 4, 2023
2 parents cfbdec5 + 4995885 commit f76c154
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
1 change: 0 additions & 1 deletion include/topmodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ extern void init(FILE *in_param_fptr, FILE *output_fptr, char *subcat,
double **deficit_root_zone,double *szq, double *Q,
double *sbar, double *bal);



extern void inputs(FILE *input_fptr, int *nstep, double *dt, double **rain,
double **pe, double **Qobs, double **Q, double **contrib_area);
Expand Down
1 change: 1 addition & 0 deletions src/bmi_topmodel.c
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ int init_config(const char* config_file, topmodel_model* model)
model->max_num_subcatchments,model->max_atb_increments);
fclose(model->subcat_fptr);


init(model->params_fptr,model->output_fptr,model->subcat,model->num_channels,model->num_topodex_values,
model->yes_print_output,model->area,&model->time_delay_histogram,model->cum_dist_area_with_dist,
model->dt,model->tl,model->dist_from_outlet,model->max_atb_increments,
Expand Down
12 changes: 3 additions & 9 deletions src/topmodel.c
Original file line number Diff line number Diff line change
Expand Up @@ -514,9 +514,8 @@ return;
* to enable calibratable parameters to be updated.
* BChoat 2023/08/29
*/


/**
* Function to convert distance/area form to time delay histogram ordinates
*
* Converts parameters to m/time step DT
Expand Down Expand Up @@ -565,9 +564,8 @@ extern void convert_dist_to_histords(double *dist_from_outlet, int num_channels,
tch[1]=dist_from_outlet[1]/chvdt;
for(j=2;j<=num_channels;j++)
{

tch[j]=tch[1]+(dist_from_outlet[j]-dist_from_outlet[1])/rvdt;
}
}

return;

Expand Down Expand Up @@ -626,7 +624,6 @@ extern void calc_time_delay_histogram(int max_time_delay_ordinates, int num_chan
(*num_delay)=(int)tch[1];
(*num_time_delay_histo_ords)-=(*num_delay);


for(ir=1;ir<=(*num_time_delay_histo_ords);ir++)
{
time=(double)(*num_delay)+(double)ir;
Expand Down Expand Up @@ -666,7 +663,6 @@ extern void calc_time_delay_histogram(int max_time_delay_ordinates, int num_chan
}
}


return;
}

Expand Down Expand Up @@ -714,7 +710,7 @@ extern void init_discharge_array(int *num_delay, double *Q0, double area,


/**
* Function to initialize unsaturated zone storage and deficit
itialize unsaturated zone storage and deficit
*
* @params[in] max_atb_increments, int, defines size of one-dimensional double
* precision arrays including stor_unsat_zone, deficit_root_zone,
Expand Down Expand Up @@ -782,7 +778,6 @@ extern void init_water_balance(int max_atb_increments,
return;
}


/**
* Main initialize function. Calls convert_dist_to_histords(), calc_time_delay_histogram(),
* init_water_balance(), and init_discharge_array()
Expand Down Expand Up @@ -879,7 +874,6 @@ double sumar;
int ir;



/* read in run parameters */
fgets(subcat,256,in_param_fptr);

Expand Down

0 comments on commit f76c154

Please sign in to comment.