32 logical (c_bool),
intent(in) :: is_cell_active(:,:)
33 integer (c_int),
intent(in) :: landuse_index(:)
36 integer (c_int) :: number_of_landuse_codes
37 integer (c_int),
allocatable :: lu_codes(:)
38 integer (c_int) :: indx
39 integer (c_int) :: num_records
40 logical :: are_lengths_unequal
42 integer (c_int) :: status
43 character (len=256) :: sbuf
45 call string_list%append(
"LU_Code")
46 call string_list%append(
"Landuse_Code")
47 call string_list%append(
"Landuse_Lookup_Code")
50 call params%get_parameters( slkeys=string_list, ivalues=lu_codes )
51 number_of_landuse_codes = count( lu_codes >= 0 )
53 call string_list%clear()
54 call string_list%append(
"Storm_drain_capture")
55 call string_list%append(
"Storm_drain_capture_fraction")
58 call assert( status==0,
"Problem allocating STORM_DRAIN_CAPTURE_FRACTION", &
67 call string_list%clear()
80 are_lengths_unequal = ( num_records /= number_of_landuse_codes )
82 if ( are_lengths_unequal )
then
84 sbuf =
"The number of values specifying storm drain capture" &
86 //
ascharacter( num_records )//
") does not match the number of landuse values (" &
87 //
ascharacter( number_of_landuse_codes )//
"). Setting default storm drain" &
88 //
" capture to 0.0 (ZERO)."
90 call warn( smessage=trim(sbuf), &
93 lfatal=.
false._c_bool, &
100 do indx=lbound( landuse_index, 1 ), ubound( landuse_index, 1 )
107 call assert( status==0,
"Problem allocating STORM_DRAIN_CAPTURE_FRACTION_TABLE", &
118 real (c_float),
intent(inout) :: capture_fraction
119 integer (c_int),
intent(in) :: indx
120 logical (c_bool),
intent(in) :: is_cell_active(:,:)
125 associate( dt =>
sim_dt%curr )
This module contains physical constants and convenience functions aimed at performing unit conversion...
logical(c_bool), parameter, public false
real(c_float), parameter ftinyval
Defines the DATA_CATALOG_T data type, which contains type-bound procedures to add,...
type(data_catalog_t), public dat
DAT is a global to hold data catalog entries.
This module contains the DATETIME_T class and associated time and date-related routines,...
subroutine, public warn(smessage, smodule, iline, shints, lfatal, iloglevel, lecho)
Provides support for input and output of gridded ASCII data, as well as for creation and destruction ...
subroutine, public grid_writearcgrid(sfilename, pgrd)
type(logfile_t), public logs
type(parameters_t), public params
type(date_range_t), public sim_dt
subroutine, public storm_drain_capture_initialize(is_cell_active, landuse_index)
type(datetime_t) date_of_last_retrieval
type(data_catalog_entry_t), pointer pstorm_drain_capture_fraction
real(c_float), dimension(:), allocatable storm_drain_capture_fraction_table
real(c_float), dimension(:), allocatable, public storm_drain_capture_fraction
subroutine, public storm_drain_capture_calculate(capture_fraction, indx, is_cell_active)