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

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

Data Types

type  obsoutputtype

Functions/Subroutines

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

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 112 of file ObsOutput.f90.

113 ! -- dummy
114 type(ListType), intent(inout) :: list !< observation list
115 type(ObsOutputType), pointer, intent(inout) :: obsOutput !< observation output
116 ! -- local
117 class(*), pointer :: obj
118 !
119 obj => obsoutput
120 call list%Add(obj)
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 74 of file ObsOutput.f90.

75 ! -- dummy
76 class(*), pointer, intent(inout) :: obj !< input object
77 type(ObsOutputType), pointer :: res !< ObsOutputType
78 !
79 res => null()
80 if (.not. associated(obj)) return
81 !
82 select type (obj)
83 type is (obsoutputtype)
84 res => obj
85 class default
86 continue
87 end select
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 96 of file ObsOutput.f90.

97 ! -- dummy
98 type(ObsOutputType), pointer, intent(out) :: newObsOutput
99 character(len=*), intent(in) :: fname !< observation output file name
100 integer(I4B), intent(in) :: nunit !< observation output unit number
101 !
102 allocate (newobsoutput)
103 newobsoutput%filename = fname
104 newobsoutput%nunit = nunit
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 128 of file ObsOutput.f90.

129 implicit none
130 ! -- dummy
131 type(ListType), intent(inout) :: list !< observation list
132 integer(I4B), intent(in) :: idx !< observation index
133 type(ObsOutputType), pointer :: res !< observation output
134 ! -- local
135 class(*), pointer :: obj
136 !
137 obj => list%GetItem(idx)
138 res => castasobsoutputtype(obj)
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)

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.

◆ 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 59 of file ObsOutput.f90.

60 ! -- dummy
61 class(ObsOutputType), intent(inout) :: this
62 ! -- write a line return to end of observation output line
63 ! for this totim
64 write (this%nunit, '(a)', advance='YES') ''