subroutine catchment_read_subcatch_params
use input, only : read_integer_column, read_real_column
use groundwater, only : &
gw_abf, &
gw_bff, &
gw_delay, &
gw_rchrgc, &
gw_revapc, &
gw_revapmn
use soil, only: bsn_cncor, bsn_sccor
use river, only: bsn_roc2, bsn_roc4
use snow, only: &
bsn_gmrate, &
bsn_smrate, &
bsn_tmelt, &
bsn_tsnfall
use evapotranspiration, only: bsn_thc, bsn_ecal
use utilities, only: check_range, log_debug
! read file subcatch.prm
! enable assignment of individual subbasin parameters
allocate(catchment_ids(n_subcatch))
call read_integer_column(catchment_input_file_id, "catchment_id", catchment_ids, 0)
call read_real_column(catchment_input_file_id, "ecal", bsn_ecal, 0.0_dp)
call read_real_column(catchment_input_file_id, "thc", bsn_thc, 0.0_dp)
call read_real_column(catchment_input_file_id, "roc2", bsn_roc2, 0.0_dp)
call read_real_column(catchment_input_file_id, "roc4", bsn_roc4, 0.0_dp)
call read_real_column(catchment_input_file_id, "cncor", bsn_cncor, 0.0_dp, range=(/0.25, 1.25/))
call read_real_column(catchment_input_file_id, "sccor", bsn_sccor, 0.0_dp)
call read_real_column(catchment_input_file_id, "tsnfall", bsn_tsnfall, 0.0_dp)
call read_real_column(catchment_input_file_id, "tmelt", bsn_tmelt, 0.0_dp)
call read_real_column(catchment_input_file_id, "smrate", bsn_smrate, 0.0_dp)
call read_real_column(catchment_input_file_id, "gmrate", bsn_gmrate, 0.0_dp)
call read_real_column(catchment_input_file_id, "bff", gw_bff, 0.0_dp)
call read_real_column(catchment_input_file_id, "abf", gw_abf, 0.0_dp)
call read_real_column(catchment_input_file_id, "delay", gw_delay, 0.0_dp)
call read_real_column(catchment_input_file_id, "revapc", gw_revapc, 0.0_dp)
call read_real_column(catchment_input_file_id, "rchrgc", gw_rchrgc, 0.0_dp)
call read_real_column(catchment_input_file_id, "revapmn", gw_revapmn, 0.0_dp)
call log_debug("catchment_read_subcatch_params", "Subcatchment parameters:")
call log_debug("catchment_read_subcatch_params", "id", ints=catchment_ids)
call log_debug("catchment_read_subcatch_params", "ecal", reals=bsn_ecal)
call log_debug("catchment_read_subcatch_params", "thc", reals=bsn_thc)
call log_debug("catchment_read_subcatch_params", "roc2", reals=bsn_roc2)
call log_debug("catchment_read_subcatch_params", "roc4", reals=bsn_roc4)
call log_debug("catchment_read_subcatch_params", "cncor", reals=bsn_cncor)
call log_debug("catchment_read_subcatch_params", "sccor", reals=bsn_sccor)
call log_debug("catchment_read_subcatch_params", "tsnfall", reals=bsn_tsnfall)
call log_debug("catchment_read_subcatch_params", "tmelt", reals=bsn_tmelt)
call log_debug("catchment_read_subcatch_params", "smrate", reals=bsn_smrate)
call log_debug("catchment_read_subcatch_params", "gmrate", reals=bsn_gmrate)
call log_debug("catchment_read_subcatch_params", "bff", reals=gw_bff)
call log_debug("catchment_read_subcatch_params", "abf", reals=gw_abf)
call log_debug("catchment_read_subcatch_params", "delay", reals=gw_delay)
call log_debug("catchment_read_subcatch_params", "revapc", reals=gw_revapc)
call log_debug("catchment_read_subcatch_params", "rchrgc", reals=gw_rchrgc)
call log_debug("catchment_read_subcatch_params", "revapmn", reals=gw_revapmn)
end subroutine catchment_read_subcatch_params