MODFLOW 6  version 6.7.0.dev3
USGS Modular Hydrologic Model
tspocmodule Module Reference

Data Types

type  tspoctype
 @ brief Output control More...
 

Functions/Subroutines

subroutine, public oc_cr (ocobj, name_model, input_mempath, inunit, iout)
 @ brief Create TspOcType More...
 
subroutine oc_ar (this, depvar, dis, dnodata, dvname)
 @ brief Allocate and read TspOcType More...
 

Function/Subroutine Documentation

◆ oc_ar()

subroutine tspocmodule::oc_ar ( class(tspoctype this,
real(dp), dimension(:), intent(in), pointer, contiguous  depvar,
class(disbasetype), intent(in), pointer  dis,
real(dp), intent(in)  dnodata,
character(len=*), intent(in)  dvname 
)
private

Setup dependent variable (e.g., concentration or temperature) and budget as output control variables.

Parameters
thisTspOcType object
[in]depvarmodel concentration
[in]dvnamename of dependent variable solved by generalized transport model (concentration, temperature)
[in]dismodel discretization package
[in]dnodatano data value

Definition at line 55 of file tsp-oc.f90.

56  use constantsmodule, only: linelength
58  ! -- dummy
59  class(TspOcType) :: this !< TspOcType object
60  real(DP), dimension(:), pointer, contiguous, intent(in) :: depvar !< model concentration
61  character(len=*), intent(in) :: dvname !< name of dependent variable solved by generalized transport model (concentration, temperature)
62  class(DisBaseType), pointer, intent(in) :: dis !< model discretization package
63  real(DP), intent(in) :: dnodata !< no data value
64  ! -- local
65  integer(I4B) :: i, nocdobj, inodata
66  type(OutputControlDataType), pointer :: ocdobjptr
67  real(DP), dimension(:), pointer, contiguous :: nullvec => null()
68  character(len=LINELENGTH) :: ocfile
69  logical(LGP) :: found_ocfile
70  !
71  ! -- Initialize variables
72  inodata = 0
73  nocdobj = 2
74  allocate (this%ocds(nocdobj))
75  do i = 1, nocdobj
76  call ocd_cr(ocdobjptr)
77  select case (i)
78  case (1)
79  call ocdobjptr%init_dbl('BUDGET', nullvec, dis, 'PRINT LAST ', &
80  'COLUMNS 10 WIDTH 11 DIGITS 4 GENERAL ', &
81  this%iout, dnodata)
82  case (2)
83  call ocdobjptr%init_dbl(trim(dvname), depvar, dis, 'PRINT LAST ', &
84  'COLUMNS 10 WIDTH 11 DIGITS 4 GENERAL ', &
85  this%iout, dnodata)
86  end select
87  this%ocds(i) = ocdobjptr
88  deallocate (ocdobjptr)
89  end do
90  !
91  ! -- Read options or set defaults if this package not on
92  if (this%input_mempath /= '') then
93  write (this%iout, '(/,1x,a,/)') 'PROCESSING OC OPTIONS'
94  call this%source_options()
95  call mem_set_value(ocfile, dvname(1:4)//'FILE', this%input_mempath, &
96  found_ocfile)
97  if (found_ocfile) then
98  call this%set_ocfile(dvname, ocfile, this%iout)
99  end if
100  write (this%iout, '(1x,a)') 'END OF OC OPTIONS'
101  end if
This module contains simulation constants.
Definition: Constants.f90:9
integer(i4b), parameter linelength
maximum length of a standard line
Definition: Constants.f90:45
Here is the call graph for this function:

◆ oc_cr()

subroutine, public tspocmodule::oc_cr ( type(tspoctype), pointer  ocobj,
character(len=*), intent(in)  name_model,
character(len=*), intent(in)  input_mempath,
integer(i4b), intent(in)  inunit,
integer(i4b), intent(in)  iout 
)

Create by allocating a new TspOcType object and initializing member variables.

Parameters
ocobjTspOcType object
[in]name_modelname of the model
[in]input_mempathinput mempath of the package
[in]inunitunit number for input
[in]ioutunit number for output

Definition at line 30 of file tsp-oc.f90.

31  ! -- dummy
32  type(TspOcType), pointer :: ocobj !< TspOcType object
33  character(len=*), intent(in) :: name_model !< name of the model
34  character(len=*), intent(in) :: input_mempath !< input mempath of the package
35  integer(I4B), intent(in) :: inunit !< unit number for input
36  integer(I4B), intent(in) :: iout !< unit number for output
37  !
38  ! -- Create the object
39  allocate (ocobj)
40  !
41  ! -- Allocate variables
42  call ocobj%allocate_scalars(name_model, input_mempath)
43  !
44  ! -- Save unit numbers
45  ocobj%inunit = inunit
46  ocobj%iout = iout
Here is the caller graph for this function: