MODFLOW 6 version 6.9.0.dev0
USGS Modular Hydrologic Model
Loading...
Searching...
No Matches
double1dreadermodule Module Reference

Data Types

type  double1dreadertype

Functions/Subroutines

subroutine, public read_dbl1d (parser, dbl1d, 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 double1dreadermodule::apply_factor ( class(double1dreadertype) this)
private

Definition at line 112 of file Double1dReader.f90.

113 class(Double1dReaderType) :: this
114 integer(I4B) :: i
115 if (this%factor /= dzero) then
116 do i = 1, size(this%dbl1d)
117 ! no data values are not scaled
118 if (this%dbl1d(i) == dnodata) cycle
119 this%dbl1d(i) = this%dbl1d(i) * this%factor
120 end do
121 end if

◆ fill_constant()

subroutine double1dreadermodule::fill_constant ( class(double1dreadertype) this)
private

Definition at line 66 of file Double1dReader.f90.

67 class(Double1dReaderType) :: this
68 integer(I4B) :: i
69 do i = 1, size(this%dbl1d)
70 this%dbl1d(i) = this%constant_array_value
71 end do

◆ read_ascii()

subroutine double1dreadermodule::read_ascii ( class(double1dreadertype) this)
private

Definition at line 74 of file Double1dReader.f90.

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

◆ read_binary()

subroutine double1dreadermodule::read_binary ( class(double1dreadertype) this)
private

Definition at line 88 of file Double1dReader.f90.

89 class(Double1dReaderType) :: this
90 integer(I4B) :: i
91 integer(I4B) :: nvals
92 integer(I4B) :: istat
93 integer(I4B) :: expected_size
94 expected_size = binary_header_bytes + (size(this%dbl1d) * binary_double_bytes)
95 call read_binary_header(this%input_unit, this%iout, this%array_name, nvals)
96 call check_binary_filesize(this%input_unit, expected_size, this%array_name)
97 read (this%input_unit, iostat=istat, iomsg=errmsg) &
98 (this%dbl1d(i), i=1, size(this%dbl1d))
99 if (istat /= 0) then
100 errmsg = 'Error reading data for array '//trim(this%array_name)// &
101 '. '//trim(errmsg)
102 call store_error(errmsg)
103 call store_error_unit(this%input_unit)
104 end if
Here is the call graph for this function:

◆ read_dbl1d()

subroutine, public double1dreadermodule::read_dbl1d ( type(blockparsertype), intent(in), target parser,
real(dp), dimension(:), target, contiguous dbl1d,
character(len=*), intent(in) aname )

Definition at line 38 of file Double1dReader.f90.

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

◆ reset_reader()

subroutine double1dreadermodule::reset_reader ( class(double1dreadertype) this)
private

Definition at line 54 of file Double1dReader.f90.

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

◆ set_constant()

subroutine double1dreadermodule::set_constant ( class(double1dreadertype) this)
private

Definition at line 61 of file Double1dReader.f90.

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

◆ set_factor()

subroutine double1dreadermodule::set_factor ( class(double1dreadertype) this)
private

Definition at line 107 of file Double1dReader.f90.

108 class(Double1dReaderType) :: this
109 this%factor = this%parser%GetDouble()