MODFLOW 6  version 6.6.0.dev0
USGS Modular Hydrologic Model
double2dreadermodule Module Reference

Data Types

type  double2dreadertype
 

Functions/Subroutines

subroutine, public read_dbl2d (parser, dbl2d, aname)
 
subroutine reset_reader (this)
 
subroutine set_constant (this)
 
subroutine fill_constant (this)
 
subroutine read_ascii (this)
 
subroutine read_binary (this)
 
subroutine set_factor (this)
 
subroutine apply_factor (this)
 

Function/Subroutine Documentation

◆ apply_factor()

subroutine double2dreadermodule::apply_factor ( class(double2dreadertype this)
private

Definition at line 111 of file Double2dReader.f90.

112  class(Double2dReaderType) :: this
113  integer(I4B) :: i, j
114  if (this%factor /= dzero) then
115  do i = 1, size(this%dbl2d, dim=2)
116  do j = 1, size(this%dbl2d, dim=1)
117  this%dbl2d(j, i) = this%dbl2d(j, i) * this%factor
118  end do
119  end do
120  end if

◆ fill_constant()

subroutine double2dreadermodule::fill_constant ( class(double2dreadertype this)
private

Definition at line 63 of file Double2dReader.f90.

64  class(Double2dReaderType) :: this
65  integer(I4B) :: i, j
66  do i = 1, size(this%dbl2d, dim=2)
67  do j = 1, size(this%dbl2d, dim=1)
68  this%dbl2d(j, i) = this%constant_array_value
69  end do
70  end do

◆ read_ascii()

subroutine double2dreadermodule::read_ascii ( class(double2dreadertype this)
private

Definition at line 73 of file Double2dReader.f90.

74  class(Double2dReaderType) :: this
75  integer(I4B) :: i, j
76  integer(I4B) :: istat
77  do i = 1, size(this%dbl2d, dim=2)
78  read (this%input_unit, *, iostat=istat, iomsg=errmsg) &
79  (this%dbl2d(j, i), j=1, size(this%dbl2d, dim=1))
80  end do
81  if (istat /= 0) then
82  errmsg = 'Error reading data for array '//trim(this%array_name)// &
83  '. '//trim(errmsg)
84  call store_error(errmsg)
85  call store_error_unit(this%input_unit)
86  end if
Here is the call graph for this function:

◆ read_binary()

subroutine double2dreadermodule::read_binary ( class(double2dreadertype this)
private

Definition at line 89 of file Double2dReader.f90.

90  class(Double2dReaderType) :: this
91  integer(I4B) :: i, j
92  integer(I4B) :: nvals
93  integer(I4B) :: istat
94  call read_binary_header(this%input_unit, this%iout, this%array_name, nvals)
95  read (this%input_unit, iostat=istat, iomsg=errmsg) &
96  ((this%dbl2d(j, i), j=1, size(this%dbl2d, dim=1)), &
97  i=1, size(this%dbl2d, dim=2))
98  if (istat /= 0) then
99  errmsg = 'Error reading data for array '//trim(this%array_name)// &
100  '. '//trim(errmsg)
101  call store_error(errmsg)
102  call store_error_unit(this%input_unit)
103  end if
Here is the call graph for this function:

◆ read_dbl2d()

subroutine, public double2dreadermodule::read_dbl2d ( type(blockparsertype), intent(in), target  parser,
real(dp), dimension(:, :), target, contiguous  dbl2d,
character(len=*), intent(in)  aname 
)

Definition at line 35 of file Double2dReader.f90.

36  ! -- dummy
37  type(BlockParserType), intent(in), target :: parser
38  real(DP), dimension(:, :), contiguous, target :: dbl2d
39  character(len=*), intent(in) :: aname
40  ! -- local
41  type(Double2dReaderType) :: this
42 
43  this%parser => parser
44  this%dbl2d => dbl2d
45  this%array_name = aname
46 
47  call this%read_array()
48 
Here is the caller graph for this function:

◆ reset_reader()

subroutine double2dreadermodule::reset_reader ( class(double2dreadertype this)
private

Definition at line 51 of file Double2dReader.f90.

52  class(Double2dReaderType) :: this
53  call this%ArrayReaderBaseType%reset_reader()
54  this%constant_array_value = dzero
55  this%factor = done

◆ set_constant()

subroutine double2dreadermodule::set_constant ( class(double2dreadertype this)
private

Definition at line 58 of file Double2dReader.f90.

59  class(Double2dReaderType) :: this
60  this%constant_array_value = this%parser%GetDouble()

◆ set_factor()

subroutine double2dreadermodule::set_factor ( class(double2dreadertype this)
private

Definition at line 106 of file Double2dReader.f90.

107  class(Double2dReaderType) :: this
108  this%factor = this%parser%GetDouble()