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

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

Data Types

type  obsoutputlisttype
 

Functions/Subroutines

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

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 113 of file ObsOutputList.f90.

114  ! -- dummy
115  class(ObsOutputListType), intent(inout) :: this
116  character(len=*), intent(in) :: fname !< observation output file name
117  integer(I4B), intent(in) :: nunit !< observation output unit number
118  ! -- local
119  type(ObsOutputType), pointer :: obsOutput => null()
120  !
121  call constructobsoutput(obsoutput, fname, nunit)
122  call addobsoutputtolist(this%ObsOutputs, obsoutput)
123  !
124  ! -- return
125  return
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 176 of file ObsOutputList.f90.

177  ! -- dummy
178  class(ObsOutputListType), intent(inout) :: this
179  !
180  call this%ObsOutputs%Clear()
181  !
182  ! -- return
183  return

◆ 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 85 of file ObsOutputList.f90.

86  ! -- dummy
87  class(ObsOutputListType), intent(inout) :: this
88  character(len=*), intent(in) :: fname !< observation output file name
89  ! -- local
90  type(ObsOutputType), pointer :: obsOutput => null()
91  integer(I4B) :: i, n
92  !
93  containsfile = .false.
94  n = this%Count()
95  loop1: do i = 1, n
96  obsoutput => this%Get(i)
97  if (same_word(obsoutput%filename, fname)) then
98  containsfile = .true.
99  exit loop1
100  end if
101  end do loop1
102  !
103  ! -- return
104  return
Here is the call 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 67 of file ObsOutputList.f90.

68  ! -- return
69  integer(I4B) :: count !< number of ObsOutputType objects
70  ! -- dummy
71  class(ObsOutputListType), intent(inout) :: this
72  !
73  count = this%ObsOutputs%Count()
74  !
75  ! -- return
76  return

◆ deallocobsoutputlist()

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

Subroutine to deallocate a ObsOutputListType list.

Definition at line 191 of file ObsOutputList.f90.

192  ! -- dummy
193  class(ObsOutputListType), intent(inout) :: this
194  ! -- local
195  integer :: i, n
196  type(ObsOutputType), pointer :: obsoutput => null()
197  !
198  n = this%Count()
199  do i = 1, n
200  obsoutput => getobsoutputfromlist(this%ObsOutputs, i)
201  !call obsoutput%DeallocObsOutput()
202  end do
203  !
204  call this%ObsOutputs%Clear(.true.)
205  !
206  ! -- return
207  return
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 158 of file ObsOutputList.f90.

159  ! -- dummy
160  class(ObsOutputListType), intent(inout) :: this
161  integer(I4B), intent(in) :: indx !< index for ObsOutputType object
162  ! result
163  type(ObsOutputType), pointer :: obsOutput
164  !
165  obsoutput => getobsoutputfromlist(this%ObsOutputs, indx)
166  !
167  ! -- return
168  return
Here is the call graph for this function:

◆ resetallobsemptylines()

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

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
57  !
58  ! -- return
59  return

◆ 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 134 of file ObsOutputList.f90.

135  ! -- dummy
136  class(ObsOutputListType), intent(inout) :: this
137  ! -- local
138  type(ObsOutputType), pointer :: obsOutput => null()
139  integer(I4B) :: i, num
140  !
141  num = this%Count()
142  do i = 1, num
143  obsoutput => this%Get(i)
144  if (obsoutput%FormattedOutput) then
145  call obsoutput%WriteObsLineReturn()
146  end if
147  end do
148  !
149  ! -- return
150  return