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

Print/save manager module.

Data Types

type  printsavemanagertype
 Print/save manager type. More...

Functions/Subroutines

type(printsavemanagertype) function, pointer, public create_psm ()
 Initialize or clear the print/save manager.
subroutine allocate (this)
subroutine deallocate (this)
subroutine init (this)
subroutine read (this, linein, iout)
 Read a line of input and prepare the manager.
subroutine set (this, ocaction, ocsetting, iout)
 set data from an input record.
logical function should_print (this, kstp, endofperiod)
 Determine if printing is enabled for this time step.
logical function should_save (this, kstp, endofperiod)
 Determine if saving is enabled for this time step.

Function/Subroutine Documentation

◆ allocate()

subroutine printsavemanagermodule::allocate ( class(printsavemanagertype) this)
private

Definition at line 63 of file PrintSaveManager.f90.

64 class(PrintSaveManagerType) :: this
65 allocate (this%save_steps)
66 allocate (this%print_steps)
67 call this%save_steps%init()
68 call this%print_steps%init()

◆ create_psm()

type(printsavemanagertype) function, pointer, public printsavemanagermodule::create_psm
Returns
the print/save manager

Definition at line 57 of file PrintSaveManager.f90.

58 type(PrintSaveManagerType), pointer :: psm !< the print/save manager
59 allocate (psm)
60 call psm%allocate()
Here is the caller graph for this function:

◆ deallocate()

subroutine printsavemanagermodule::deallocate ( class(printsavemanagertype) this)
private
Parameters
thisthis instance

Definition at line 71 of file PrintSaveManager.f90.

72 class(PrintSaveManagerType) :: this !< this instance
73 if (associated(this%save_steps)) deallocate (this%save_steps)
74 if (associated(this%print_steps)) deallocate (this%print_steps)

◆ init()

subroutine printsavemanagermodule::init ( class(printsavemanagertype) this)
private

Definition at line 77 of file PrintSaveManager.f90.

78 class(PrintSaveManagerType) :: this
79 call this%deallocate()
80 call this%allocate()

◆ read()

subroutine printsavemanagermodule::read ( class(printsavemanagertype) this,
character(len=*), intent(in) linein,
integer(i4b), intent(in) iout )
private
Parameters
thisthis instance
[in]lineininput line
[in]ioutoutput file unit

Definition at line 84 of file PrintSaveManager.f90.

85 ! dummy
86 class(PrintSaveManagerType) :: this !< this instance
87 character(len=*), intent(in) :: linein !< input line
88 integer(I4B), intent(in) :: iout !< output file unit
89 ! local
90 character(len=len(linein)) :: line
91 integer(I4B) :: lloc, istart, istop, ival
92 real(DP) :: rval
93
94 line(:) = linein(:)
95 lloc = 1
96 call urword(line, lloc, istart, istop, 1, ival, rval, 0, 0)
97
98 select case (line(istart:istop))
99 case ('PRINT')
100 call this%print_steps%read(line(istop + 2:))
101 if (iout > 0) &
102 call this%print_steps%log(iout, verb="PRINTED")
103 case ('SAVE')
104 call this%save_steps%read(line(istop + 2:))
105 if (iout > 0) &
106 call this%save_steps%log(iout, verb="SAVED")
107 case default
108 call store_error( &
109 'Looking for PRINT or SAVE. Found: '//trim(adjustl(line)), &
110 terminate=.true.)
111 end select
Here is the call graph for this function:

◆ set()

subroutine printsavemanagermodule::set ( class(printsavemanagertype) this,
character(len=*) ocaction,
character(len=*) ocsetting,
integer(i4b), intent(in) iout )
private
Parameters
thisthis instance
[in]ioutoutput file unit

Definition at line 115 of file PrintSaveManager.f90.

116 ! dummy
117 class(PrintSaveManagerType) :: this !< this instance
118 character(len=*) :: ocaction
119 character(len=*) :: ocsetting
120 integer(I4B), intent(in) :: iout !< output file unit
121 select case (ocaction)
122 case ('PRINT')
123 call this%print_steps%read(ocsetting)
124 if (iout > 0) &
125 call this%print_steps%log(iout, verb="PRINTED")
126 case ('SAVE')
127 call this%save_steps%read(ocsetting)
128 if (iout > 0) &
129 call this%save_steps%log(iout, verb="SAVED")
130 case default
131 call store_error( &
132 'Looking for PRINT or SAVE. Found: '//trim(adjustl(ocaction)), &
133 terminate=.true.)
134 end select
Here is the call graph for this function:

◆ should_print()

logical function printsavemanagermodule::should_print ( class(printsavemanagertype) this,
integer(i4b), intent(in) kstp,
logical(lgp), intent(in) endofperiod )
private
Parameters
thisthis instance
[in]kstpcurrent time step
[in]endofperiodwhether last step of stress period

Definition at line 138 of file PrintSaveManager.f90.

139 class(PrintSaveManagerType) :: this !< this instance
140 integer(I4B), intent(in) :: kstp !< current time step
141 logical(LGP), intent(in) :: endofperiod !< whether last step of stress period
142
143 should_print = this%print_steps%is_selected(kstp, endofperiod)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ should_save()

logical function printsavemanagermodule::should_save ( class(printsavemanagertype) this,
integer(i4b), intent(in) kstp,
logical(lgp), intent(in) endofperiod )
private
Parameters
thisthis instance
[in]kstpcurrent time step
[in]endofperiodwhether last step of stress period

Definition at line 147 of file PrintSaveManager.f90.

148 class(PrintSaveManagerType) :: this !< this instance
149 integer(I4B), intent(in) :: kstp !< current time step
150 logical(LGP), intent(in) :: endofperiod !< whether last step of stress period
151
152 should_save = this%save_steps%is_selected(kstp, endofperiod)
Here is the call graph for this function:
Here is the caller graph for this function: