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

Data Types

type  tspobstype
 

Functions/Subroutines

subroutine, public tsp_obs_cr (obs, inobs)
 Create a new TspObsType object. More...
 
subroutine tsp_obs_ar (this, ic, x, flowja)
 Allocate and read method for package. More...
 
subroutine tsp_obs_df (this, iout, pkgname, filtyp, dis)
 Define observation object. More...
 
subroutine tsp_obs_bd (this)
 Save observations. More...
 
subroutine tsp_obs_rp (this)
 If transport model observations need checks, add them here. More...
 
subroutine tsp_obs_da (this)
 Deallocate memory. More...
 
subroutine set_pointers (this, ic, x, flowja)
 Set pointers needed by the transport OBS package. More...
 
subroutine gwt_process_concentration_obs_id (obsrv, dis, inunitobs, iout)
 Procedure related to Tsp observations (NOT type-bound) More...
 
subroutine tsp_process_intercell_obs_id (obsrv, dis, inunitobs, iout)
 Procedure related to Tsp observations (NOT type-bound) More...
 

Function/Subroutine Documentation

◆ gwt_process_concentration_obs_id()

subroutine tspobsmodule::gwt_process_concentration_obs_id ( type(observetype), intent(inout)  obsrv,
class(disbasetype), intent(in)  dis,
integer(i4b), intent(in)  inunitobs,
integer(i4b), intent(in)  iout 
)
private

Process a specific observation ID

Definition at line 191 of file tsp-obs.f90.

192  ! -- dummy
193  type(ObserveType), intent(inout) :: obsrv
194  class(DisBaseType), intent(in) :: dis
195  integer(I4B), intent(in) :: inunitobs
196  integer(I4B), intent(in) :: iout
197  ! -- local
198  integer(I4B) :: nn1
199  integer(I4B) :: icol, istart, istop
200  character(len=LINELENGTH) :: ermsg, string
201  !
202  ! -- Initialize variables
203  string = obsrv%IDstring
204  icol = 1
205  !
206  ! Get node number, with option for ID string to be either node
207  ! number or lay, row, column (when dis is structured).
208  nn1 = dis%noder_from_string(icol, istart, istop, inunitobs, &
209  iout, string, .false.)
210  !
211  if (nn1 > 0) then
212  obsrv%NodeNumber = nn1
213  else
214  ermsg = 'Error reading data from ID string'
215  call store_error(ermsg)
216  call store_error_unit(inunitobs)
217  end if
218  !
219  ! -- Return
220  return
Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_pointers()

subroutine tspobsmodule::set_pointers ( class(tspobstype), intent(inout)  this,
type(tspictype), intent(in), pointer  ic,
real(dp), dimension(:), intent(in), pointer, contiguous  x,
real(dp), dimension(:), intent(in), pointer, contiguous  flowja 
)
private

Definition at line 172 of file tsp-obs.f90.

173  ! -- dummy
174  class(TspObsType), intent(inout) :: this
175  type(TspIcType), pointer, intent(in) :: ic
176  real(DP), dimension(:), pointer, contiguous, intent(in) :: x
177  real(DP), dimension(:), pointer, contiguous, intent(in) :: flowja
178  !
179  this%ic => ic
180  this%x => x
181  this%flowja => flowja
182  !
183  ! -- Return
184  return

◆ tsp_obs_ar()

subroutine tspobsmodule::tsp_obs_ar ( class(tspobstype), intent(inout)  this,
type(tspictype), intent(in), pointer  ic,
real(dp), dimension(:), intent(in), pointer, contiguous  x,
real(dp), dimension(:), intent(in), pointer, contiguous  flowja 
)
private

Method to allocate and read static data for the package.

Definition at line 60 of file tsp-obs.f90.

61  ! -- dummy
62  class(TspObsType), intent(inout) :: this
63  type(TspIcType), pointer, intent(in) :: ic
64  real(DP), dimension(:), pointer, contiguous, intent(in) :: x
65  real(DP), dimension(:), pointer, contiguous, intent(in) :: flowja
66  !
67  ! Call ar method of parent class
68  call this%obs_ar()
69  !
70  ! set pointers
71  call this%set_pointers(ic, x, flowja)
72  !
73  ! -- Return
74  return

◆ tsp_obs_bd()

subroutine tspobsmodule::tsp_obs_bd ( class(tspobstype), intent(inout)  this)
private

Definition at line 109 of file tsp-obs.f90.

110  ! -- dummy
111  class(TspObsType), intent(inout) :: this
112  ! -- local
113  integer(I4B) :: i, jaindex, nodenumber
114  character(len=100) :: msg
115  class(ObserveType), pointer :: obsrv => null()
116  !
117  call this%obs_bd_clear()
118  !
119  ! -- iterate through all GWT observations
120  if (this%npakobs > 0) then
121  do i = 1, this%npakobs
122  obsrv => this%pakobs(i)%obsrv
123  nodenumber = obsrv%NodeNumber
124  jaindex = obsrv%JaIndex
125  select case (obsrv%ObsTypeId)
126  case ('CONCENTRATION')
127  call this%SaveOneSimval(obsrv, this%x(nodenumber))
128  case ('FLOW-JA-FACE')
129  call this%SaveOneSimval(obsrv, this%flowja(jaindex))
130  case default
131  msg = ' Unrecognized observation type: '//trim(obsrv%ObsTypeId)
132  call store_error(msg)
133  call store_error_unit(this%inUnitObs)
134  end select
135  end do
136  end if
137  !
138  ! -- Return
139  return
Here is the call graph for this function:

◆ tsp_obs_cr()

subroutine, public tspobsmodule::tsp_obs_cr ( type(tspobstype), intent(out), pointer  obs,
integer(i4b), intent(in), pointer  inobs 
)

This routine:

  • creates an observation object
  • allocates pointers
  • initializes values

Definition at line 41 of file tsp-obs.f90.

42  ! -- dummy
43  type(TspObsType), pointer, intent(out) :: obs
44  integer(I4B), pointer, intent(in) :: inobs
45  !
46  allocate (obs)
47  call obs%allocate_scalars()
48  obs%active = .false.
49  obs%inputFilename = ''
50  obs%inUnitObs => inobs
51  !
52  ! -- Return
53  return
Here is the caller graph for this function:

◆ tsp_obs_da()

subroutine tspobsmodule::tsp_obs_da ( class(tspobstype), intent(inout)  this)
private

Deallocate memory associated with transport model

Definition at line 157 of file tsp-obs.f90.

158  ! -- dummy
159  class(TspObsType), intent(inout) :: this
160  !
161  nullify (this%ic)
162  nullify (this%x)
163  nullify (this%flowja)
164  call this%ObsType%obs_da()
165  !
166  ! -- Return
167  return

◆ tsp_obs_df()

subroutine tspobsmodule::tsp_obs_df ( class(tspobstype), intent(inout)  this,
integer(i4b), intent(in)  iout,
character(len=*), intent(in)  pkgname,
character(len=*), intent(in)  filtyp,
class(disbasetype), pointer  dis 
)
private

Definition at line 79 of file tsp-obs.f90.

80  ! -- dummy
81  class(TspObsType), intent(inout) :: this
82  integer(I4B), intent(in) :: iout
83  character(len=*), intent(in) :: pkgname
84  character(len=*), intent(in) :: filtyp
85  class(DisBaseType), pointer :: dis
86  ! -- local
87  integer(I4B) :: indx
88  !
89  ! Call overridden method of parent class
90  call this%ObsType%obs_df(iout, pkgname, filtyp, dis)
91  !
92  ! -- StoreObsType arguments are: (ObserveType, cumulative, indx);
93  ! indx is returned.
94  !
95  ! -- Store obs type and assign procedure pointer for head observation type
96  call this%StoreObsType('concentration', .false., indx)
97  this%obsData(indx)%ProcessIdPtr => gwt_process_concentration_obs_id
98  !
99  ! -- Store obs type and assign procedure pointer for flow-ja-face observation type
100  call this%StoreObsType('flow-ja-face', .true., indx)
101  this%obsData(indx)%ProcessIdPtr => tsp_process_intercell_obs_id
102  !
103  ! -- Return
104  return
Here is the call graph for this function:

◆ tsp_obs_rp()

subroutine tspobsmodule::tsp_obs_rp ( class(tspobstype), intent(inout)  this)
private

Definition at line 144 of file tsp-obs.f90.

145  ! -- dummy
146  class(TspObsType), intent(inout) :: this
147  !
148  ! Do GWT observations need any checking? If so, add checks here
149  !
150  ! -- Return
151  return

◆ tsp_process_intercell_obs_id()

subroutine tspobsmodule::tsp_process_intercell_obs_id ( type(observetype), intent(inout)  obsrv,
class(disbasetype), intent(in)  dis,
integer(i4b), intent(in)  inunitobs,
integer(i4b), intent(in)  iout 
)
private

Process an intercell observation requested by the user

Definition at line 227 of file tsp-obs.f90.

228  ! -- dummy
229  type(ObserveType), intent(inout) :: obsrv
230  class(DisBaseType), intent(in) :: dis
231  integer(I4B), intent(in) :: inunitobs
232  integer(I4B), intent(in) :: iout
233  ! -- local
234  integer(I4B) :: nn1, nn2
235  integer(I4B) :: icol, istart, istop, jaidx
236  character(len=LINELENGTH) :: ermsg, string
237  ! formats
238 70 format('Error: No connection exists between cells identified in text: ', a)
239  !
240  ! -- Initialize variables
241  string = obsrv%IDstring
242  icol = 1
243  !
244  ! Get node number, with option for ID string to be either node
245  ! number or lay, row, column (when dis is structured).
246  nn1 = dis%noder_from_string(icol, istart, istop, inunitobs, &
247  iout, string, .false.)
248  !
249  if (nn1 > 0) then
250  obsrv%NodeNumber = nn1
251  else
252  ermsg = 'Error reading data from ID string: '//string(istart:istop)
253  call store_error(ermsg)
254  end if
255  !
256  ! Get node number, with option for ID string to be either node
257  ! number or lay, row, column (when dis is structured).
258  nn2 = dis%noder_from_string(icol, istart, istop, inunitobs, &
259  iout, string, .false.)
260  if (nn2 > 0) then
261  obsrv%NodeNumber2 = nn2
262  else
263  ermsg = 'Error reading data from ID string: '//string(istart:istop)
264  call store_error(ermsg)
265  end if
266  !
267  ! -- store JA index
268  jaidx = dis%con%getjaindex(nn1, nn2)
269  if (jaidx == 0) then
270  write (ermsg, 70) trim(string)
271  call store_error(ermsg)
272  end if
273  obsrv%JaIndex = jaidx
274  !
275  if (count_errors() > 0) then
276  call store_error_unit(inunitobs)
277  end if
278  !
279  ! -- Return
280  return
Here is the call graph for this function:
Here is the caller graph for this function: