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

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

Data Types

type  obsoutputtype
 

Functions/Subroutines

subroutine resetobsemptyline (this)
 @ brief Reset empty line logical More...
 
subroutine writeobslinereturn (this)
 @ brief Write line return for observation More...
 
type(obsoutputtype) function, pointer castasobsoutputtype (obj)
 @ brief Cast as ObsOutputType More...
 
subroutine, public constructobsoutput (newObsOutput, fname, nunit)
 @ brief Construct and assign ObsOutputType object More...
 
subroutine, public addobsoutputtolist (list, obsOutput)
 @ brief Add observation output to a list More...
 
type(obsoutputtype) function, pointer, public getobsoutputfromlist (list, idx)
 @ brief Get observation output from a list More...
 

Detailed Description

This module contains information and methods needed for writing a line of simulated values for observations to an output file. Each block of type continuous in an observation file is associated with an ObsOutputType object. However, the methods are needed only for continuous observations.

Function/Subroutine Documentation

◆ addobsoutputtolist()

subroutine, public obsoutputmodule::addobsoutputtolist ( type(listtype), intent(inout)  list,
type(obsoutputtype), intent(inout), pointer  obsOutput 
)

Subroutine to add observation output to a observation list.

Parameters
[in,out]listobservation list
[in,out]obsoutputobservation output

Definition at line 124 of file ObsOutput.f90.

125  ! -- dummy
126  type(ListType), intent(inout) :: list !< observation list
127  type(ObsOutputType), pointer, intent(inout) :: obsOutput !< observation output
128  ! -- local
129  class(*), pointer :: obj
130  !
131  obj => obsoutput
132  call list%Add(obj)
133  !
134  ! -- return
135  return
Here is the caller graph for this function:

◆ castasobsoutputtype()

type(obsoutputtype) function, pointer obsoutputmodule::castasobsoutputtype ( class(*), intent(inout), pointer  obj)
private

Cast an object as an ObsOutputType.

Parameters
[in,out]objinput object
Returns
ObsOutputType

Definition at line 80 of file ObsOutput.f90.

81  ! -- dummy
82  class(*), pointer, intent(inout) :: obj !< input object
83  type(ObsOutputType), pointer :: res !< ObsOutputType
84  !
85  res => null()
86  if (.not. associated(obj)) return
87  !
88  select type (obj)
89  type is (obsoutputtype)
90  res => obj
91  class default
92  continue
93  end select
94  !
95  ! -- return
96  return
Here is the caller graph for this function:

◆ constructobsoutput()

subroutine, public obsoutputmodule::constructobsoutput ( type(obsoutputtype), intent(out), pointer  newObsOutput,
character(len=*), intent(in)  fname,
integer(i4b), intent(in)  nunit 
)

Subroutine to construct an ObsOutputType object and assign the observation output file name and unit number.

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

Definition at line 105 of file ObsOutput.f90.

106  ! -- dummy
107  type(ObsOutputType), pointer, intent(out) :: newObsOutput
108  character(len=*), intent(in) :: fname !< observation output file name
109  integer(I4B), intent(in) :: nunit !< observation output unit number
110  !
111  allocate (newobsoutput)
112  newobsoutput%filename = fname
113  newobsoutput%nunit = nunit
114  !
115  ! -- return
116  return
Here is the caller graph for this function:

◆ getobsoutputfromlist()

type(obsoutputtype) function, pointer, public obsoutputmodule::getobsoutputfromlist ( type(listtype), intent(inout)  list,
integer(i4b), intent(in)  idx 
)

Subroutine to get observation output from a observation list.

Parameters
[in,out]listobservation list
[in]idxobservation index
Returns
observation output

Definition at line 143 of file ObsOutput.f90.

144  implicit none
145  ! -- dummy
146  type(ListType), intent(inout) :: list !< observation list
147  integer(I4B), intent(in) :: idx !< observation index
148  type(ObsOutputType), pointer :: res !< observation output
149  ! -- local
150  class(*), pointer :: obj
151  !
152  obj => list%GetItem(idx)
153  res => castasobsoutputtype(obj)
154  !
155  ! --return
156  return
Here is the call graph for this function:
Here is the caller graph for this function:

◆ resetobsemptyline()

subroutine obsoutputmodule::resetobsemptyline ( class(obsoutputtype), intent(inout)  this)
private

Subroutine to reset the empty line logical.

Definition at line 46 of file ObsOutput.f90.

47  ! -- dummy
48  class(ObsOutputType), intent(inout) :: this
49  !
50  this%empty_line = .true.
51  !
52  ! -- return
53  return

◆ writeobslinereturn()

subroutine obsoutputmodule::writeobslinereturn ( class(obsoutputtype), intent(inout)  this)
private

Subroutine to write a line return for a time step in an observation output file.

Definition at line 62 of file ObsOutput.f90.

63  ! -- dummy
64  class(ObsOutputType), intent(inout) :: this
65  ! -- write a line return to end of observation output line
66  ! for this totim
67  write (this%nunit, '(a)', advance='YES') ''
68  !
69  ! --return
70  return