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

This module defines the derived type ObsOutputListType. More...

Data Types

type  obsoutputlisttype

Functions/Subroutines

subroutine resetallobsemptylines (this)
 Reset empty line logical for all observations.
integer(i4b) function count (this)
 Count the number of ObsOutputType objects.
logical function containsfile (this, fname)
 Determine if a file name is in the list of ObsOutputType objects.
subroutine add (this, fname, nunit)
 Add a ObsOutputType object to the list.
subroutine writeallobslinereturns (this)
 Write line returns for all ObsOutputListType.
type(obsoutputtype) function, pointer get (this, indx)
 Get an item from a ObsOutputListType.
subroutine clear (this)
 Clear a ObsOutputListType.
subroutine deallocobsoutputlist (this)
 Deallocate a ObsOutputListType.

Detailed Description

This module contains a list of ObsOutputType objects and methods needed for coordinating between an ObsType object and its ObsOutputType objects. Like ObsOutputType, ObsOutputListType is needed only for processing continuous observations.

Function/Subroutine Documentation

◆ add()

subroutine obsoutputlistmodule::add ( class(obsoutputlisttype), intent(inout) this,
character(len=*), intent(in) fname,
integer(i4b), intent(in) nunit )
private

Subroutine to add a new ObsOutputType object to the ObsOutputList and assign ObsOutputType members.

Parameters
[in]fnameobservation output file name
[in]nunitobservation output unit number

Definition at line 104 of file ObsOutputList.f90.

105 ! -- dummy
106 class(ObsOutputListType), intent(inout) :: this
107 character(len=*), intent(in) :: fname !< observation output file name
108 integer(I4B), intent(in) :: nunit !< observation output unit number
109 ! -- local
110 type(ObsOutputType), pointer :: obsOutput => null()
111 !
112 call constructobsoutput(obsoutput, fname, nunit)
113 call addobsoutputtolist(this%ObsOutputs, obsoutput)
Here is the call graph for this function:

◆ clear()

subroutine obsoutputlistmodule::clear ( class(obsoutputlisttype), intent(inout) this)
private

Subroutine to clear a ObsOutputListType list.

Definition at line 158 of file ObsOutputList.f90.

159 ! -- dummy
160 class(ObsOutputListType), intent(inout) :: this
161 !
162 call this%ObsOutputs%Clear()

◆ containsfile()

logical function obsoutputlistmodule::containsfile ( class(obsoutputlisttype), intent(inout) this,
character(len=*), intent(in) fname )
private

Function to determine if a file name is in the list of ObsOutptType objects.

Parameters
[in]fnameobservation output file name

Definition at line 79 of file ObsOutputList.f90.

80 ! -- dummy
81 class(ObsOutputListType), intent(inout) :: this
82 character(len=*), intent(in) :: fname !< observation output file name
83 ! -- local
84 type(ObsOutputType), pointer :: obsOutput => null()
85 integer(I4B) :: i, n
86 !
87 containsfile = .false.
88 n = this%Count()
89 loop1: do i = 1, n
90 obsoutput => this%Get(i)
91 if (same_word(obsoutput%filename, fname)) then
92 containsfile = .true.
93 exit loop1
94 end if
95 end do loop1
Here is the call graph for this function:
Here is the caller graph for this function:

◆ count()

integer(i4b) function obsoutputlistmodule::count ( class(obsoutputlisttype), intent(inout) this)
private

Subroutine to return the number of ObsOutputType objects in the list.

Returns
number of ObsOutputType objects

Definition at line 64 of file ObsOutputList.f90.

65 ! -- return
66 integer(I4B) :: count !< number of ObsOutputType objects
67 ! -- dummy
68 class(ObsOutputListType), intent(inout) :: this
69 !
70 count = this%ObsOutputs%Count()
Here is the call graph for this function:

◆ deallocobsoutputlist()

subroutine obsoutputlistmodule::deallocobsoutputlist ( class(obsoutputlisttype), intent(inout) this)
private

Subroutine to deallocate a ObsOutputListType list.

Definition at line 170 of file ObsOutputList.f90.

171 ! -- dummy
172 class(ObsOutputListType), intent(inout) :: this
173 ! -- local
174 integer :: i, n
175 type(ObsOutputType), pointer :: obsoutput => null()
176 !
177 n = this%Count()
178 do i = 1, n
179 obsoutput => getobsoutputfromlist(this%ObsOutputs, i)
180 !call obsoutput%DeallocObsOutput()
181 end do
182 !
183 call this%ObsOutputs%Clear(.true.)
Here is the call graph for this function:

◆ get()

type(obsoutputtype) function, pointer obsoutputlistmodule::get ( class(obsoutputlisttype), intent(inout) this,
integer(i4b), intent(in) indx )
private

Function to get a ObsOutputType from a ObsOutputListType list.

Parameters
[in]indxindex for ObsOutputType object

Definition at line 143 of file ObsOutputList.f90.

144 ! -- dummy
145 class(ObsOutputListType), intent(inout) :: this
146 integer(I4B), intent(in) :: indx !< index for ObsOutputType object
147 ! result
148 type(ObsOutputType), pointer :: obsOutput
149 !
150 obsoutput => getobsoutputfromlist(this%ObsOutputs, indx)
Here is the call graph for this function:

◆ resetallobsemptylines()

subroutine obsoutputlistmodule::resetallobsemptylines ( class(obsoutputlisttype), intent(inout) this)

Subroutine to reset the empty line logical for all ObsOutputType objects in the list.

Definition at line 45 of file ObsOutputList.f90.

46 ! -- dummy
47 class(ObsOutputListType), intent(inout) :: this
48 ! -- local
49 integer(I4B) :: i, num
50 type(ObsOutputType), pointer :: obsOutput => null()
51 !
52 num = this%Count()
53 do i = 1, num
54 obsoutput => this%Get(i)
55 call obsoutput%ResetObsEmptyLine()
56 end do

◆ writeallobslinereturns()

subroutine obsoutputlistmodule::writeallobslinereturns ( class(obsoutputlisttype), intent(inout) this)
private

Subroutine to write line returns for a time step for all observation output files in a ObsOutputListType.

Definition at line 122 of file ObsOutputList.f90.

123 ! -- dummy
124 class(ObsOutputListType), intent(inout) :: this
125 ! -- local
126 type(ObsOutputType), pointer :: obsOutput => null()
127 integer(I4B) :: i, num
128 !
129 num = this%Count()
130 do i = 1, num
131 obsoutput => this%Get(i)
132 if (obsoutput%FormattedOutput) then
133 call obsoutput%WriteObsLineReturn()
134 end if
135 end do