27 character(len=LENFTYPE) ::
ftype =
'API'
28 character(len=LENPACKAGENAME) ::
text =
' API'
48 subroutine api_create(packobj, id, ibcnum, inunit, iout, namemodel, pakname, &
51 class(
bndtype),
pointer :: packobj
52 integer(I4B),
intent(in) :: id
53 integer(I4B),
intent(in) :: ibcnum
54 integer(I4B),
intent(in) :: inunit
55 integer(I4B),
intent(in) :: iout
56 character(len=*),
intent(in) :: namemodel
57 character(len=*),
intent(in) :: pakname
58 character(len=*),
intent(in) :: mempath
60 type(
apitype),
pointer :: apiobj
67 call packobj%set_names(ibcnum, namemodel, pakname,
ftype, mempath)
71 call packobj%allocate_scalars()
74 call packobj%pack_initialize()
76 packobj%inunit = inunit
79 packobj%ibcnum = ibcnum
91 class(
apitype),
intent(inout) :: this
93 logical(LGP) :: found_iprpak, found_iprflow, found_ipakcb
94 logical(LGP) :: found_boundnames, found_mover
96 character(len=*),
parameter :: fmtflow2 = &
97 &
"(4x, 'FLOWS WILL BE SAVED TO BUDGET FILE SPECIFIED IN OUTPUT CONTROL')"
100 call mem_set_value(this%iprpak,
'IPRPAK', this%input_mempath, found_iprpak)
101 call mem_set_value(this%iprflow,
'IPRFLOW', this%input_mempath, found_iprflow)
102 call mem_set_value(this%ipakcb,
'IPAKCB', this%input_mempath, found_ipakcb)
103 call mem_set_value(this%inamedbound,
'BOUNDNAMES', this%input_mempath, &
105 call mem_set_value(this%imover,
'MOVER', this%input_mempath, found_mover)
108 if (found_ipakcb) this%ipakcb = -1
111 if (
filein_fname(this%obs%inputFilename,
'OBS6_FILENAME', &
112 this%input_mempath, this%input_fname))
then
113 this%obs%active = .true.
115 call openfile(this%obs%inUnitObs, this%iout, this%obs%inputFilename,
'OBS')
119 write (this%iout,
'(/1x,a)')
'PROCESSING '//trim(adjustl(this%text)) &
121 if (found_iprpak)
then
122 write (this%iout,
'(4x,a)') &
123 'LISTS OF '//trim(adjustl(this%text))//
' CELLS WILL BE PRINTED.'
125 if (found_iprflow)
then
126 write (this%iout,
'(4x,a)') trim(adjustl(this%text))// &
127 ' FLOWS WILL BE PRINTED TO LISTING FILE.'
129 if (found_ipakcb)
write (this%iout, fmtflow2)
130 if (found_boundnames)
then
131 write (this%iout,
'(4x,a)') trim(adjustl(this%text))// &
132 ' BOUNDARIES HAVE NAMES IN LAST COLUMN.'
134 if (found_mover)
write (this%iout,
'(4x,A)')
'MOVER OPTION ENABLED'
135 write (this%iout,
'(1x,a)') &
136 'END OF '//trim(adjustl(this%text))//
' OPTIONS'
146 class(
apitype),
intent(inout) :: this
148 logical(LGP) :: found_maxbound
151 call mem_set_value(this%maxbound,
'MAXBOUND', this%input_mempath, &
155 write (this%iout,
'(/1x,a)')
'PROCESSING '//trim(adjustl(this%text))// &
157 write (this%iout,
'(4x,a,i7)')
'MAXBOUND = ', this%maxbound
158 write (this%iout,
'(1x,a)') &
159 'END OF '//trim(adjustl(this%text))//
' DIMENSIONS'
162 if (this%maxbound <= 0)
then
163 write (
errmsg,
'(a)')
'MAXBOUND must be an integer greater than zero.'
178 class(
apitype),
intent(inout) :: this
187 subroutine api_fc(this, rhs, ia, idxglo, matrix_sln)
190 real(DP),
dimension(:),
intent(inout) :: rhs
191 integer(I4B),
dimension(:),
intent(in) :: ia
192 integer(I4B),
dimension(:),
intent(in) :: idxglo
201 if (this%imover == 1)
then
202 call this%pakmvrobj%fc()
206 do i = 1, this%nbound
208 rhs(n) = rhs(n) + this%rhs(i)
210 call matrix_sln%add_value_pos(idxglo(ipos), this%hcof(i))
214 qusr = this%rhs(i) - this%hcof(i) * this%xnew(n)
215 if (this%imover == 1 .and. qusr >
dzero)
then
216 call this%pakmvrobj%accumulate_qformvr(i, qusr)
249 call this%obs%StoreObsType(
'api', .true., indx)
254 call this%obs%StoreObsType(
'to-mvr', .true., indx)
This module contains the API package methods.
subroutine, public api_create(packobj, id, ibcnum, inunit, iout, namemodel, pakname, mempath)
Create a new package object.
character(len=lenpackagename) text
character(len=lenftype) ftype
subroutine api_rp(this)
Read and prepare stress period data for package.
subroutine source_options(this)
Source package options from input context.
logical function api_obs_supported(this)
Determine if observations are supported.
subroutine source_dimensions(this)
Source package dimensions from input context.
subroutine api_df_obs(this)
Define the observation types available in the package.
subroutine api_fc(this, rhs, ia, idxglo, matrix_sln)
Fill A and r for the package.
This module contains the base boundary package.
logical(lgp) function bnd_obs_supported(this)
Determine if observations are supported.
subroutine bnd_rp(this)
Allocate and read method for package.
subroutine bnd_fc(this, rhs, ia, idxglo, matrix_sln)
Copy hcof and rhs terms into solution.
subroutine bnd_df_obs(this)
Define the observation types available in the package.
This module contains simulation constants.
integer(i4b), parameter lenpackagename
maximum length of the package name
integer(i4b), parameter lenftype
maximum length of a package type (DIS, WEL, OC, etc.)
real(dp), parameter dzero
real constant zero
This module defines variable data types.
This module contains the derived type ObsType.
subroutine, public defaultobsidprocessor(obsrv, dis, inunitobs, iout)
Process IDstring provided for each observation.
This module contains simulation methods.
subroutine, public store_error(msg, terminate)
Store an error message.
subroutine, public store_error_filename(filename, terminate)
Store the erroring file name.
This module contains simulation variables.
character(len=maxcharlen) errmsg
error message string
This module contains the SourceCommonModule.
logical(lgp) function, public filein_fname(filename, tagname, input_mempath, input_fname)
enforce and set a single input filename provided via FILEIN keyword
type(timeserieslinktype) function, pointer, public gettimeserieslinkfromlist(list, indx)
Get time series link from a list.