MODFLOW 6  version 6.7.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 117 of file Double2dReader.f90.

118  class(Double2dReaderType) :: this
119  integer(I4B) :: i, j
120  if (this%factor /= dzero) then
121  do i = 1, size(this%dbl2d, dim=2)
122  do j = 1, size(this%dbl2d, dim=1)
123  this%dbl2d(j, i) = this%dbl2d(j, i) * this%factor
124  end do
125  end do
126  end if

◆ fill_constant()

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

Definition at line 66 of file Double2dReader.f90.

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

◆ read_ascii()

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

Definition at line 76 of file Double2dReader.f90.

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

◆ read_binary()

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

Definition at line 92 of file Double2dReader.f90.

93  class(Double2dReaderType) :: this
94  integer(I4B) :: i, j
95  integer(I4B) :: nvals
96  integer(I4B) :: istat
97  integer(I4B) :: expected_size
98  expected_size = binary_header_bytes + (size(this%dbl2d) * binary_double_bytes)
99  call read_binary_header(this%input_unit, this%iout, this%array_name, nvals)
100  call check_binary_filesize(this%input_unit, expected_size, this%array_name)
101  read (this%input_unit, iostat=istat, iomsg=errmsg) &
102  ((this%dbl2d(j, i), j=1, size(this%dbl2d, dim=1)), &
103  i=1, size(this%dbl2d, dim=2))
104  if (istat /= 0) then
105  errmsg = 'Error reading data for array '//trim(this%array_name)// &
106  '. '//trim(errmsg)
107  call store_error(errmsg)
108  call store_error_unit(this%input_unit)
109  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 38 of file Double2dReader.f90.

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

◆ reset_reader()

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

Definition at line 54 of file Double2dReader.f90.

55  class(Double2dReaderType) :: this
56  call this%ArrayReaderBaseType%reset_reader()
57  this%constant_array_value = dzero
58  this%factor = done

◆ set_constant()

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

Definition at line 61 of file Double2dReader.f90.

62  class(Double2dReaderType) :: this
63  this%constant_array_value = this%parser%GetDouble()

◆ set_factor()

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

Definition at line 112 of file Double2dReader.f90.

113  class(Double2dReaderType) :: this
114  this%factor = this%parser%GetDouble()