MODFLOW 6  version 6.5.0.dev2
MODFLOW 6 Code Documentation
integer2dreadermodule Module Reference

Data Types

type  integer2dreadertype
 

Functions/Subroutines

subroutine, public read_int2d (parser, int2d, 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 integer2dreadermodule::apply_factor ( class(integer2dreadertype this)
private

Definition at line 111 of file Integer2dReader.f90.

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

◆ fill_constant()

subroutine integer2dreadermodule::fill_constant ( class(integer2dreadertype this)
private

Definition at line 63 of file Integer2dReader.f90.

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

◆ read_ascii()

subroutine integer2dreadermodule::read_ascii ( class(integer2dreadertype this)
private

Definition at line 73 of file Integer2dReader.f90.

74  class(Integer2dReaderType) :: this
75  integer(I4B) :: i, j
76  integer(I4B) :: istat
77  do i = 1, size(this%int2d, dim=2)
78  read (this%input_unit, *, iostat=istat, iomsg=errmsg) &
79  (this%int2d(j, i), j=1, size(this%int2d, 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 integer2dreadermodule::read_binary ( class(integer2dreadertype this)
private

Definition at line 89 of file Integer2dReader.f90.

90  class(Integer2dReaderType) :: 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%int2d(j, i), j=1, size(this%int2d, dim=1)), &
97  i=1, size(this%int2d, 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_int2d()

subroutine, public integer2dreadermodule::read_int2d ( type(blockparsertype), intent(in), target  parser,
integer(i4b), dimension(:, :), target, contiguous  int2d,
character(len=*), intent(in)  aname 
)

Definition at line 35 of file Integer2dReader.f90.

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

◆ reset_reader()

subroutine integer2dreadermodule::reset_reader ( class(integer2dreadertype this)
private

Definition at line 51 of file Integer2dReader.f90.

52  class(Integer2dReaderType) :: this
53  call this%ArrayReaderBaseType%reset_reader()
54  this%constant_array_value = 0
55  this%factor = 1

◆ set_constant()

subroutine integer2dreadermodule::set_constant ( class(integer2dreadertype this)
private

Definition at line 58 of file Integer2dReader.f90.

59  class(Integer2dReaderType) :: this
60  this%constant_array_value = this%parser%GetInteger()

◆ set_factor()

subroutine integer2dreadermodule::set_factor ( class(integer2dreadertype this)
private

Definition at line 106 of file Integer2dReader.f90.

107  class(Integer2dReaderType) :: this
108  this%factor = this%parser%GetInteger()