MODFLOW 6  version 6.6.0.dev0
USGS Modular Hydrologic Model
exg-gwegwe.f90
Go to the documentation of this file.
1 !> @brief This module contains the GweGweExchangeModule Module
2 !!
3 !! This module contains the code for connecting two GWE Models.
4 !! The methods are based on the simple two point flux approximation
5 !! with the option to use ghost nodes to improve accuracy. This
6 !! exchange is used by GweGweConnection with the more sophisticated
7 !! interface model coupling approach when XT3D is needed.
8 !!
9 !<
11 
12  use kindmodule, only: dp, i4b, lgp
21  use listmodule, only: listtype
22  use listsmodule, only: basemodellist
25  use gwemodule, only: gwemodeltype
26  use tspmvtmodule, only: tspmvttype
28  use observemodule, only: observetype
29  use obsmodule, only: obstype
30  use tablemodule, only: tabletype, table_cr
32 
33  implicit none
34 
35  private
36  public :: gweexchangetype
37  public :: gweexchange_create
38  public :: getgweexchangefromlist
39  public :: castasgweexchange
40 
41  !> @brief Derived type for GwtExchangeType
42  !!
43  !! This derived type contains information and methods for
44  !! connecting two GWT models.
45  !!
46  !<
48  !
49  ! -- names of the GWF models that are connected by this exchange
50  character(len=LENMODELNAME) :: gwfmodelname1 = '' !< name of gwfmodel that corresponds to gwtmodel1
51  character(len=LENMODELNAME) :: gwfmodelname2 = '' !< name of gwfmodel that corresponds to gwtmodel2
52  real(dp), dimension(:), pointer, contiguous :: gwfsimvals => null() !< simulated gwf flow rate for each exchange
53  !
54  ! -- pointers to gwt models
55  class(gwemodeltype), pointer :: gwemodel1 => null() !< pointer to GWT Model 1
56  class(gwemodeltype), pointer :: gwemodel2 => null() !< pointer to GWT Model 2
57  !
58  ! -- GWT specific option block:
59  integer(I4B), pointer :: inewton => null() !< unneeded newton flag allows for mvt to be used here
60  integer(I4B), pointer :: iadvscheme !< the advection scheme at the interface:
61  !! 0 = upstream, 1 = central, 2 = TVD
62  !
63  ! -- Mover transport package
64  integer(I4B), pointer :: inmvt => null() !< unit number for mover transport (0 if off)
65  type(tspmvttype), pointer :: mvt => null() !< water mover object
66  !
67  ! -- Observation package
68  integer(I4B), pointer :: inobs => null() !< unit number for GWT-GWT observations
69  type(obstype), pointer :: obs => null() !< observation object
70  !
71  ! -- internal data
72  real(dp), dimension(:), pointer, contiguous :: cond => null() !< conductance
73  real(dp), dimension(:), pointer, contiguous :: simvals => null() !< simulated flow rate for each exchange
74  !
75  ! -- table objects
76  type(tabletype), pointer :: outputtab1 => null()
77  type(tabletype), pointer :: outputtab2 => null()
78 
79  contains
80 
81  procedure :: exg_df => gwe_gwe_df
82  procedure :: exg_ar => gwe_gwe_ar
83  procedure :: exg_rp => gwe_gwe_rp
84  procedure :: exg_ad => gwe_gwe_ad
85  procedure :: exg_fc => gwe_gwe_fc
86  procedure :: exg_bd => gwe_gwe_bd
87  procedure :: exg_ot => gwe_gwe_ot
88  procedure :: exg_da => gwe_gwe_da
89  procedure :: exg_fp => gwe_gwe_fp
90  procedure :: connects_model => gwe_gwe_connects_model
91  procedure :: use_interface_model
92  procedure :: allocate_scalars
93  procedure :: allocate_arrays
94  procedure :: source_options
95  procedure :: read_mvt
96  procedure :: gwe_gwe_bdsav
97  procedure, private :: gwe_gwe_bdsav_model
98  procedure, private :: gwe_gwe_df_obs
99  procedure, private :: gwe_gwe_rp_obs
100  procedure, public :: gwe_gwe_save_simvals
101  procedure, private :: validate_exchange
102  end type gweexchangetype
103 
104 contains
105 
106  !> @ brief Create GWT GWT exchange
107  !!
108  !! Create a new GWT to GWT exchange object.
109  !<
110  subroutine gweexchange_create(filename, name, id, m1_id, m2_id, input_mempath)
111  ! -- modules
112  use basemodelmodule, only: basemodeltype
113  use listsmodule, only: baseexchangelist
114  use obsmodule, only: obs_cr
116  ! -- dummy
117  character(len=*), intent(in) :: filename !< filename for reading
118  integer(I4B), intent(in) :: id !< id for the exchange
119  character(len=*) :: name !< the exchange name
120  integer(I4B), intent(in) :: m1_id !< id for model 1
121  integer(I4B), intent(in) :: m2_id !< id for model 2
122  character(len=*), intent(in) :: input_mempath
123  ! -- local
124  type(gweexchangetype), pointer :: exchange
125  class(basemodeltype), pointer :: mb
126  class(baseexchangetype), pointer :: baseexchange
127  integer(I4B) :: m1_index, m2_index
128  !
129  ! -- Create a new exchange and add it to the baseexchangelist container
130  allocate (exchange)
131  baseexchange => exchange
132  call addbaseexchangetolist(baseexchangelist, baseexchange)
133  !
134  ! -- Assign id and name
135  exchange%id = id
136  exchange%name = name
137  exchange%memoryPath = create_mem_path(exchange%name)
138  exchange%input_mempath = input_mempath
139  !
140  ! -- allocate scalars and set defaults
141  call exchange%allocate_scalars()
142  exchange%filename = filename
143  exchange%typename = 'GWE-GWE'
144  exchange%iAdvScheme = 0
145  exchange%ixt3d = 1
146  !
147  ! -- set gwemodel1
148  m1_index = model_loc_idx(m1_id)
149  mb => getbasemodelfromlist(basemodellist, m1_index)
150  if (m1_index > 0) then
151  select type (mb)
152  type is (gwemodeltype)
153  exchange%model1 => mb
154  exchange%gwemodel1 => mb
155  end select
156  end if
157  exchange%v_model1 => get_virtual_model(m1_id)
158  !
159  ! -- set gwemodel2
160  m2_index = model_loc_idx(m2_id)
161  if (m2_index > 0) then
162  mb => getbasemodelfromlist(basemodellist, m2_index)
163  select type (mb)
164  type is (gwemodeltype)
165  exchange%model2 => mb
166  exchange%gwemodel2 => mb
167  end select
168  end if
169  exchange%v_model2 => get_virtual_model(m2_id)
170  !
171  ! -- Verify that gwt model1 is of the correct type
172  if (.not. associated(exchange%gwemodel1) .and. m1_index > 0) then
173  write (errmsg, '(3a)') 'Problem with GWE-GWE exchange ', &
174  trim(exchange%name), &
175  '. First specified GWE Model does not appear to be of the correct type.'
176  call store_error(errmsg, terminate=.true.)
177  end if
178  !
179  ! -- Verify that gwe model2 is of the correct type
180  if (.not. associated(exchange%gwemodel2) .and. m2_index > 0) then
181  write (errmsg, '(3a)') 'Problem with GWE-GWE exchange ', &
182  trim(exchange%name), &
183  '. Second specified GWE Model does not appear to be of the correct type.'
184  call store_error(errmsg, terminate=.true.)
185  end if
186  !
187  ! -- Create the obs package
188  call obs_cr(exchange%obs, exchange%inobs)
189  end subroutine gweexchange_create
190 
191  !> @ brief Define GWE GWE exchange
192  !!
193  !! Define GWE to GWE exchange object.
194  !<
195  subroutine gwe_gwe_df(this)
196  ! -- modules
197  use simvariablesmodule, only: iout
199  use ghostnodemodule, only: gnc_cr
200  ! -- dummy
201  class(gweexchangetype) :: this !< GwtExchangeType
202  !
203  ! -- log the exchange
204  write (iout, '(/a,a)') ' Creating exchange: ', this%name
205  !
206  ! -- Ensure models are in same solution
207  if (associated(this%gwemodel1) .and. associated(this%gwemodel2)) then
208  if (this%gwemodel1%idsoln /= this%gwemodel2%idsoln) then
209  call store_error('Two models are connect in a GWE '// &
210  'exchange but they are in different solutions. '// &
211  'GWE models must be in same solution: '// &
212  trim(this%gwemodel1%name)//' '// &
213  trim(this%gwemodel2%name))
214  call store_error_filename(this%filename)
215  end if
216  end if
217  !
218  ! -- source options
219  call this%source_options(iout)
220  !
221  ! -- source dimensions
222  call this%source_dimensions(iout)
223  !
224  ! -- allocate arrays
225  call this%allocate_arrays()
226  !
227  ! -- source exchange data
228  call this%source_data(iout)
229  !
230  ! -- Read mover information
231  if (this%inmvt > 0) then
232  call this%read_mvt(iout)
233  call this%mvt%mvt_df(this%gwemodel1%dis)
234  end if
235  !
236  ! -- Store obs
237  call this%gwe_gwe_df_obs()
238  if (associated(this%gwemodel1)) then
239  call this%obs%obs_df(iout, this%name, 'GWE-GWE', this%gwemodel1%dis)
240  end if
241  !
242  ! -- validate
243  call this%validate_exchange()
244  end subroutine gwe_gwe_df
245 
246  !> @brief validate exchange data after reading
247  !<
248  subroutine validate_exchange(this)
249  ! -- dummy
250  class(gweexchangetype) :: this !< GweExchangeType
251  !
252 
253  ! Ensure gwfmodel names were entered
254  if (this%gwfmodelname1 == '') then
255  write (errmsg, '(3a)') 'GWE-GWE exchange ', trim(this%name), &
256  ' requires that GWFMODELNAME1 be entered in the &
257  &OPTIONS block.'
258  call store_error(errmsg)
259  end if
260  if (this%gwfmodelname2 == '') then
261  write (errmsg, '(3a)') 'GWE-GWE exchange ', trim(this%name), &
262  ' requires that GWFMODELNAME2 be entered in the &
263  &OPTIONS block.'
264  call store_error(errmsg)
265  end if
266  !
267  ! Periodic boundary condition in exchange don't allow XT3D (=interface model)
268  if (associated(this%model1, this%model2)) then
269  if (this%ixt3d > 0) then
270  write (errmsg, '(3a)') 'GWE-GWE exchange ', trim(this%name), &
271  ' is a periodic boundary condition which cannot'// &
272  ' be configured with XT3D'
273  call store_error(errmsg)
274  end if
275  end if
276  !
277  ! Check to see if dispersion is on in either model1 or model2.
278  ! If so, then ANGLDEGX must be provided as an auxiliary variable for this
279  ! GWE-GWE exchange (this%ianglex > 0).
280  if (associated(this%gwemodel1) .and. associated(this%gwemodel2)) then
281  if (this%gwemodel1%incnd /= 0 .or. this%gwemodel2%incnd /= 0) then
282  if (this%ianglex == 0) then
283  write (errmsg, '(3a)') 'GWE-GWE exchange ', trim(this%name), &
284  ' requires that ANGLDEGX be specified as an'// &
285  ' auxiliary variable because dispersion was '// &
286  'specified in one or both transport models.'
287  call store_error(errmsg)
288  end if
289  end if
290  end if
291  !
292  if (this%ixt3d > 0 .and. this%ianglex == 0) then
293  write (errmsg, '(3a)') 'GWE-GWE exchange ', trim(this%name), &
294  ' requires that ANGLDEGX be specified as an'// &
295  ' auxiliary variable because XT3D is enabled'
296  call store_error(errmsg)
297  end if
298  !
299  if (count_errors() > 0) then
300  call ustop()
301  end if
302  end subroutine validate_exchange
303 
304  !> @ brief Allocate and read
305  !!
306  !! Allocated and read and calculate saturated conductance
307  !<
308  subroutine gwe_gwe_ar(this)
309  ! -- dummy
310  class(gweexchangetype) :: this !< GwtExchangeType
311  !
312  ! -- If mover is active, then call ar routine
313  if (this%inmvt > 0) call this%mvt%mvt_ar()
314  !
315  ! -- Observation AR
316  call this%obs%obs_ar()
317  end subroutine gwe_gwe_ar
318 
319  !> @ brief Read and prepare
320  !!
321  !! Read new data for mover and obs
322  !<
323  subroutine gwe_gwe_rp(this)
324  ! -- modules
325  use tdismodule, only: readnewdata
326  ! -- dummy
327  class(gweexchangetype) :: this !< GweExchangeType
328  !
329  ! -- Check with TDIS on whether or not it is time to RP
330  if (.not. readnewdata) return
331  !
332  ! -- Read and prepare for mover
333  if (this%inmvt > 0) call this%mvt%mvt_rp()
334  !
335  ! -- Read and prepare for observations
336  call this%gwe_gwe_rp_obs()
337  end subroutine gwe_gwe_rp
338 
339  !> @ brief Advance
340  !!
341  !! Advance mover and obs
342  !<
343  subroutine gwe_gwe_ad(this)
344  ! -- dummy
345  class(gweexchangetype) :: this !< GweExchangeType
346  !
347  ! -- Advance mover
348  !if(this%inmvt > 0) call this%mvt%mvt_ad()
349  !
350  ! -- Push simulated values to preceding time step
351  call this%obs%obs_ad()
352  end subroutine gwe_gwe_ad
353 
354  !> @ brief Fill coefficients
355  !!
356  !! Calculate conductance and fill coefficient matrix
357  !<
358  subroutine gwe_gwe_fc(this, kiter, matrix_sln, rhs_sln, inwtflag)
359  ! -- dummy
360  class(gweexchangetype) :: this !< GwtExchangeType
361  integer(I4B), intent(in) :: kiter
362  class(matrixbasetype), pointer :: matrix_sln
363  real(DP), dimension(:), intent(inout) :: rhs_sln
364  integer(I4B), optional, intent(in) :: inwtflag
365  !
366  ! -- Call mvt fc routine
367  if (this%inmvt > 0) call this%mvt%mvt_fc(this%gwemodel1%x, this%gwemodel2%x)
368  end subroutine gwe_gwe_fc
369 
370  !> @ brief Budget
371  !!
372  !! Accumulate budget terms
373  !<
374  subroutine gwe_gwe_bd(this, icnvg, isuppress_output, isolnid)
375  ! -- modules
377  use budgetmodule, only: rate_accumulator
378  ! -- dummy
379  class(gweexchangetype) :: this !< GweExchangeType
380  integer(I4B), intent(inout) :: icnvg
381  integer(I4B), intent(in) :: isuppress_output
382  integer(I4B), intent(in) :: isolnid
383  ! -- local
384  character(len=LENBUDTXT), dimension(1) :: budtxt
385  real(DP), dimension(2, 1) :: budterm
386  real(DP) :: ratin, ratout
387  !
388  ! -- initialize
389  budtxt(1) = ' FLOW-JA-FACE'
390  !
391  ! -- Calculate ratin/ratout and pass to model budgets
392  call rate_accumulator(this%simvals, ratin, ratout)
393  !
394  ! -- Add the budget terms to model 1
395  if (associated(this%gwemodel1)) then
396  budterm(1, 1) = ratin
397  budterm(2, 1) = ratout
398  call this%gwemodel1%model_bdentry(budterm, budtxt, this%name)
399  end if
400  !
401  ! -- Add the budget terms to model 2
402  if (associated(this%gwemodel2)) then
403  budterm(1, 1) = ratout
404  budterm(2, 1) = ratin
405  call this%gwemodel2%model_bdentry(budterm, budtxt, this%name)
406  end if
407  !
408  ! -- Call mvt bd routine
409  if (this%inmvt > 0) call this%mvt%mvt_bd(this%gwemodel1%x, this%gwemodel2%x)
410  end subroutine gwe_gwe_bd
411 
412  !> @ brief Budget save
413  !!
414  !! Output individual flows to listing file and binary budget files
415  !<
416  subroutine gwe_gwe_bdsav(this)
417  ! -- dummy
418  class(gweexchangetype) :: this !< GweExchangeType
419  ! -- local
420  integer(I4B) :: icbcfl, ibudfl
421  !
422  ! -- budget for model1
423  if (associated(this%gwemodel1)) then
424  call this%gwe_gwe_bdsav_model(this%gwemodel1)
425  end if
426  !
427  ! -- budget for model2
428  if (associated(this%gwemodel2)) then
429  call this%gwe_gwe_bdsav_model(this%gwemodel2)
430  end if
431  !
432  ! -- Set icbcfl, ibudfl to zero so that flows will be printed and
433  ! saved, if the options were set in the MVT package
434  icbcfl = 1
435  ibudfl = 1
436  !
437  ! -- Call mvt bd routine
438  !cdl todo: if(this%inmvt > 0) call this%mvt%mvt_bdsav(icbcfl, ibudfl, isuppress_output)
439  !
440  ! -- Calculate and write simulated values for observations
441  if (this%inobs /= 0) then
442  call this%gwe_gwe_save_simvals()
443  end if
444  end subroutine gwe_gwe_bdsav
445 
446  !> @ brief Budget save
447  !!
448  !! Output individual flows to listing file and binary budget files
449  !<
450  subroutine gwe_gwe_bdsav_model(this, model)
451  ! -- modules
453  use tdismodule, only: kstp, kper
454  ! -- dummy
455  class(gweexchangetype) :: this !< GwtExchangeType
456  class(gwemodeltype), pointer :: model
457  ! -- local
458  character(len=LENBOUNDNAME) :: bname
459  character(len=LENPACKAGENAME + 4) :: packname
460  character(len=LENBUDTXT), dimension(1) :: budtxt
461  type(tabletype), pointer :: output_tab
462  class(virtualmodeltype), pointer :: nbr_model
463  character(len=20) :: nodestr
464  integer(I4B) :: ntabrows
465  integer(I4B) :: nodeu
466  integer(I4B) :: i, n1, n2, n1u, n2u
467  integer(I4B) :: ibinun
468  real(DP) :: ratin, ratout, rrate
469  logical(LGP) :: is_for_model1
470  integer(I4B) :: isuppress_output
471  real(DP), dimension(this%naux) :: auxrow
472  !
473  ! -- initialize local variables
474  isuppress_output = 0
475  budtxt(1) = ' FLOW-JA-FACE'
476  packname = 'EXG '//this%name
477  packname = adjustr(packname)
478  if (associated(model, this%gwemodel1)) then
479  output_tab => this%outputtab1
480  nbr_model => this%v_model2
481  is_for_model1 = .true.
482  else
483  output_tab => this%outputtab2
484  nbr_model => this%v_model1
485  is_for_model1 = .false.
486  end if
487  !
488  ! -- update output tables
489  if (this%iprflow /= 0) then
490  !
491  ! -- update titles
492  if (model%oc%oc_save('BUDGET')) then
493  call output_tab%set_title(packname)
494  end if
495  !
496  ! -- set table kstp and kper
497  call output_tab%set_kstpkper(kstp, kper)
498  !
499  ! -- update maxbound of tables
500  ntabrows = 0
501  do i = 1, this%nexg
502  n1 = this%nodem1(i)
503  n2 = this%nodem2(i)
504  !
505  ! -- If both cells are active then calculate flow rate
506  if (this%v_model1%ibound%get(n1) /= 0 .and. &
507  this%v_model2%ibound%get(n2) /= 0) then
508  ntabrows = ntabrows + 1
509  end if
510  end do
511  if (ntabrows > 0) then
512  call output_tab%set_maxbound(ntabrows)
513  end if
514  end if
515  !
516  ! -- Print and write budget terms for model 1
517  !
518  ! -- Set binary unit numbers for saving flows
519  if (this%ipakcb /= 0) then
520  ibinun = model%oc%oc_save_unit('BUDGET')
521  else
522  ibinun = 0
523  end if
524  !
525  ! -- If save budget flag is zero for this stress period, then
526  ! shut off saving
527  if (.not. model%oc%oc_save('BUDGET')) ibinun = 0
528  if (isuppress_output /= 0) then
529  ibinun = 0
530  end if
531  !
532  ! -- If cell-by-cell flows will be saved as a list, write header.
533  if (ibinun /= 0) then
534  call model%dis%record_srcdst_list_header(budtxt(1), &
535  model%name, &
536  this%name, &
537  nbr_model%name, &
538  this%name, &
539  this%naux, this%auxname, &
540  ibinun, this%nexg, &
541  model%iout)
542  end if
543  !
544  ! Initialize accumulators
545  ratin = dzero
546  ratout = dzero
547  !
548  ! -- Loop through all exchanges
549  do i = 1, this%nexg
550  !
551  ! -- Assign boundary name
552  if (this%inamedbound > 0) then
553  bname = this%boundname(i)
554  else
555  bname = ''
556  end if
557  !
558  ! -- Calculate the flow rate between n1 and n2
559  rrate = dzero
560  n1 = this%nodem1(i)
561  n2 = this%nodem2(i)
562  !
563  ! -- If both cells are active then calculate flow rate
564  if (this%v_model1%ibound%get(n1) /= 0 .and. &
565  this%v_model2%ibound%get(n2) /= 0) then
566  rrate = this%simvals(i)
567  !
568  ! -- Print the individual rates to model list files if requested
569  if (this%iprflow /= 0) then
570  if (model%oc%oc_save('BUDGET')) then
571  !
572  ! -- set nodestr and write outputtab table
573  if (is_for_model1) then
574  nodeu = model%dis%get_nodeuser(n1)
575  call model%dis%nodeu_to_string(nodeu, nodestr)
576  call output_tab%print_list_entry(i, trim(adjustl(nodestr)), &
577  rrate, bname)
578  else
579  nodeu = model%dis%get_nodeuser(n2)
580  call model%dis%nodeu_to_string(nodeu, nodestr)
581  call output_tab%print_list_entry(i, trim(adjustl(nodestr)), &
582  -rrate, bname)
583  end if
584  end if
585  end if
586  if (rrate < dzero) then
587  ratout = ratout - rrate
588  else
589  ratin = ratin + rrate
590  end if
591  end if
592  !
593  ! -- If saving cell-by-cell flows in list, write flow
594  n1u = this%v_model1%dis_get_nodeuser(n1)
595  n2u = this%v_model2%dis_get_nodeuser(n2)
596  if (ibinun /= 0) then
597  if (this%naux > 0) then
598  auxrow(:) = this%auxvar(:, i)
599  end if
600  if (is_for_model1) then
601  call model%dis%record_mf6_list_entry( &
602  ibinun, n1u, n2u, rrate, this%naux, auxrow, &
603  .false., .false.)
604  else
605  call model%dis%record_mf6_list_entry( &
606  ibinun, n2u, n1u, -rrate, this%naux, auxrow, &
607  .false., .false.)
608  end if
609  end if
610  !
611  end do
612  end subroutine gwe_gwe_bdsav_model
613 
614  !> @ brief Output
615  !!
616  !! Write output
617  !<
618  subroutine gwe_gwe_ot(this)
619  ! -- modules
620  use simvariablesmodule, only: iout
621  use constantsmodule, only: dzero
622  ! -- dummy
623  class(gweexchangetype) :: this !< GweExchangeType
624  ! -- local
625  integer(I4B) :: iexg, n1, n2
626  integer(I4B) :: ibudfl
627  real(DP) :: flow
628  character(len=LINELENGTH) :: node1str, node2str
629  ! -- format
630  character(len=*), parameter :: fmtheader = &
631  "(/1x, 'SUMMARY OF EXCHANGE RATES FOR EXCHANGE ', a, ' WITH ID ', i0, /, &
632  &2a16, 5a16, /, 112('-'))"
633  character(len=*), parameter :: fmtheader2 = &
634  "(/1x, 'SUMMARY OF EXCHANGE RATES FOR EXCHANGE ', a, ' WITH ID ', i0, /, &
635  &2a16, 4a16, /, 96('-'))"
636  character(len=*), parameter :: fmtdata = &
637  "(2a16, 5(1pg16.6))"
638  !
639  ! -- Call bdsave
640  call this%gwe_gwe_bdsav()
641  !
642  ! -- Write a table of exchanges
643  if (this%iprflow /= 0) then
644  write (iout, fmtheader2) trim(adjustl(this%name)), this%id, 'NODEM1', &
645  'NODEM2', 'COND', 'X_M1', 'X_M2', 'FLOW'
646  do iexg = 1, this%nexg
647  n1 = this%nodem1(iexg)
648  n2 = this%nodem2(iexg)
649  flow = this%simvals(iexg)
650  call this%v_model1%dis_noder_to_string(n1, node1str)
651  call this%v_model2%dis_noder_to_string(n2, node2str)
652  write (iout, fmtdata) trim(adjustl(node1str)), &
653  trim(adjustl(node2str)), &
654  this%cond(iexg), this%v_model1%x%get(n1), &
655  this%v_model2%x%get(n2), flow
656  end do
657  end if
658  !
659  !cdl Implement when MVT is ready
660  ! -- Mover budget output
661  ibudfl = 1
662  if (this%inmvt > 0) call this%mvt%mvt_ot_bdsummary(ibudfl)
663  !
664  ! -- OBS output
665  call this%obs%obs_ot()
666  end subroutine gwe_gwe_ot
667 
668  !> @ brief Source options
669  !!
670  !! Source the options block
671  !<
672  subroutine source_options(this, iout)
673  ! -- modules
674  use constantsmodule, only: lenvarname
680  ! -- dummy
681  class(gweexchangetype) :: this !< GweExchangeType
682  integer(I4B), intent(in) :: iout
683  ! -- local
684  type(exggwegweparamfoundtype) :: found
685  character(len=LENVARNAME), dimension(3) :: adv_scheme = &
686  &[character(len=LENVARNAME) :: 'UPSTREAM', 'CENTRAL', 'TVD']
687  character(len=linelength) :: mvt_fname
688  !
689  ! -- update defaults with values sourced from input context
690  call mem_set_value(this%gwfmodelname1, 'GWFMODELNAME1', this%input_mempath, &
691  found%gwfmodelname1)
692  call mem_set_value(this%gwfmodelname2, 'GWFMODELNAME2', this%input_mempath, &
693  found%gwfmodelname2)
694  call mem_set_value(this%iAdvScheme, 'ADV_SCHEME', this%input_mempath, &
695  adv_scheme, found%adv_scheme)
696  call mem_set_value(this%ixt3d, 'CND_XT3D_OFF', this%input_mempath, &
697  found%cnd_xt3d_off)
698  call mem_set_value(this%ixt3d, 'CND_XT3D_RHS', this%input_mempath, &
699  found%cnd_xt3d_rhs)
700  !
701  write (iout, '(1x,a)') 'PROCESSING GWE-GWE EXCHANGE OPTIONS'
702  !
703  ! -- source base class options
704  call this%DisConnExchangeType%source_options(iout)
705  !
706  if (found%gwfmodelname1) then
707  write (iout, '(4x,a,a)') &
708  'GWFMODELNAME1 IS SET TO: ', trim(this%gwfmodelname1)
709  end if
710  !
711  if (found%gwfmodelname2) then
712  write (iout, '(4x,a,a)') &
713  'GWFMODELNAME2 IS SET TO: ', trim(this%gwfmodelname2)
714  end if
715  !
716  if (found%adv_scheme) then
717  ! -- count from 0
718  this%iAdvScheme = this%iAdvScheme - 1
719  write (iout, '(4x,a,a)') &
720  'ADVECTION SCHEME METHOD HAS BEEN SET TO: ', &
721  trim(adv_scheme(this%iAdvScheme + 1))
722  end if
723  !
724  if (found%cnd_xt3d_off .and. found%cnd_xt3d_rhs) then
725  errmsg = 'CND_XT3D_OFF and CND_XT3D_RHS cannot both be set as options.'
726  call store_error(errmsg)
727  call store_error_filename(this%filename)
728  else if (found%cnd_xt3d_off) then
729  this%ixt3d = 0
730  write (iout, '(4x,a)') 'XT3D FORMULATION HAS BEEN SHUT OFF.'
731  else if (found%cnd_xt3d_rhs) then
732  this%ixt3d = 2
733  write (iout, '(4x,a)') 'XT3D RIGHT-HAND SIDE FORMULATION IS SELECTED.'
734  end if
735  !
736  ! -- enforce 0 or 1 MVR6_FILENAME entries in option block
737  if (filein_fname(mvt_fname, 'MVE6_FILENAME', this%input_mempath, &
738  this%filename)) then
739  this%inmvt = getunit()
740  call openfile(this%inmvt, iout, mvt_fname, 'MVT')
741  write (iout, '(4x,a)') 'WATER MOVER ENERGY TRANSPORT &
742  &INFORMATION WILL BE READ FROM ', trim(mvt_fname)
743  end if
744  !
745  ! -- enforce 0 or 1 OBS6_FILENAME entries in option block
746  if (filein_fname(this%obs%inputFilename, 'OBS6_FILENAME', &
747  this%input_mempath, this%filename)) then
748  this%obs%active = .true.
749  this%obs%inUnitObs = getunit()
750  call openfile(this%obs%inUnitObs, iout, this%obs%inputFilename, 'OBS')
751  end if
752  !
753  write (iout, '(1x,a)') 'END OF GWE-GWE EXCHANGE OPTIONS'
754  end subroutine source_options
755 
756  !> @ brief Read mover
757  !!
758  !! Read and process movers
759  !<
760  subroutine read_mvt(this, iout)
761  ! -- modules
762  use tspmvtmodule, only: mvt_cr
763  ! -- dummy
764  class(gweexchangetype) :: this !< GwtExchangeType
765  integer(I4B), intent(in) :: iout
766  !
767  ! -- Create and initialize the mover object Here, fmi is set to the one
768  ! for gwtmodel1 so that a call to save flows has an associated dis
769  ! object.
770  call mvt_cr(this%mvt, this%name, this%inmvt, iout, this%gwemodel1%fmi, &
771  this%gwemodel1%eqnsclfac, this%gwemodel1%depvartype, &
772  gwfmodelname1=this%gwfmodelname1, &
773  gwfmodelname2=this%gwfmodelname2, &
774  fmi2=this%gwemodel2%fmi)
775  end subroutine read_mvt
776 
777  !> @ brief Allocate scalars
778  !!
779  !! Allocate scalar variables
780  !<
781  subroutine allocate_scalars(this)
782  ! -- modules
784  use constantsmodule, only: dzero
785  ! -- dummy
786  class(gweexchangetype) :: this !< GwtExchangeType
787  !
788  call this%DisConnExchangeType%allocate_scalars()
789  !
790  call mem_allocate(this%inewton, 'INEWTON', this%memoryPath)
791  call mem_allocate(this%inobs, 'INOBS', this%memoryPath)
792  call mem_allocate(this%iAdvScheme, 'IADVSCHEME', this%memoryPath)
793  this%inewton = 0
794  this%inobs = 0
795  this%iAdvScheme = 0
796  !
797  call mem_allocate(this%inmvt, 'INMVT', this%memoryPath)
798  this%inmvt = 0
799  end subroutine allocate_scalars
800 
801  !> @ brief Deallocate
802  !!
803  !! Deallocate memory associated with this object
804  !<
805  subroutine gwe_gwe_da(this)
806  ! -- modules
808  ! -- dummy
809  class(gweexchangetype) :: this !< GwtExchangeType
810  !
811  ! -- objects
812  if (this%inmvt > 0) then
813  call this%mvt%mvt_da()
814  deallocate (this%mvt)
815  end if
816  call this%obs%obs_da()
817  deallocate (this%obs)
818  !
819  ! -- arrays
820  call mem_deallocate(this%cond)
821  call mem_deallocate(this%simvals)
822  call mem_deallocate(this%gwfsimvals, 'GWFSIMVALS', this%memoryPath) ! linked memory
823  !
824  ! -- output table objects
825  if (associated(this%outputtab1)) then
826  call this%outputtab1%table_da()
827  deallocate (this%outputtab1)
828  nullify (this%outputtab1)
829  end if
830  if (associated(this%outputtab2)) then
831  call this%outputtab2%table_da()
832  deallocate (this%outputtab2)
833  nullify (this%outputtab2)
834  end if
835  !
836  ! -- scalars
837  deallocate (this%filename)
838  call mem_deallocate(this%inewton)
839  call mem_deallocate(this%inobs)
840  call mem_deallocate(this%iAdvScheme)
841  call mem_deallocate(this%inmvt)
842  !
843  ! -- deallocate base
844  call this%DisConnExchangeType%disconnex_da()
845  end subroutine gwe_gwe_da
846 
847  !> @ brief Allocate arrays
848  !!
849  !! Allocate arrays
850  !<
851  subroutine allocate_arrays(this)
852  ! -- modules
854  ! -- dummy
855  class(gweexchangetype) :: this !< GweExchangeType
856  ! -- local
857  character(len=LINELENGTH) :: text
858  integer(I4B) :: ntabcol, i
859  !
860  call this%DisConnExchangeType%allocate_arrays()
861  !
862  call mem_allocate(this%cond, this%nexg, 'COND', this%memoryPath)
863  call mem_allocate(this%simvals, this%nexg, 'SIMVALS', this%memoryPath)
864  !
865  ! -- Initialize
866  do i = 1, this%nexg
867  this%cond(i) = dnodata
868  end do
869  !
870  ! -- allocate and initialize the output table
871  if (this%iprflow /= 0) then
872  !
873  ! -- dimension table
874  ntabcol = 3
875  if (this%inamedbound > 0) then
876  ntabcol = ntabcol + 1
877  end if
878  !
879  ! -- initialize the output table objects
880  ! outouttab1
881  if (this%v_model1%is_local) then
882  call table_cr(this%outputtab1, this%name, ' ')
883  call this%outputtab1%table_df(this%nexg, ntabcol, this%gwemodel1%iout, &
884  transient=.true.)
885  text = 'NUMBER'
886  call this%outputtab1%initialize_column(text, 10, alignment=tabcenter)
887  text = 'CELLID'
888  call this%outputtab1%initialize_column(text, 20, alignment=tableft)
889  text = 'RATE'
890  call this%outputtab1%initialize_column(text, 15, alignment=tabcenter)
891  if (this%inamedbound > 0) then
892  text = 'NAME'
893  call this%outputtab1%initialize_column(text, 20, alignment=tableft)
894  end if
895  end if
896  ! outouttab2
897  if (this%v_model2%is_local) then
898  call table_cr(this%outputtab2, this%name, ' ')
899  call this%outputtab2%table_df(this%nexg, ntabcol, this%gwemodel2%iout, &
900  transient=.true.)
901  text = 'NUMBER'
902  call this%outputtab2%initialize_column(text, 10, alignment=tabcenter)
903  text = 'CELLID'
904  call this%outputtab2%initialize_column(text, 20, alignment=tableft)
905  text = 'RATE'
906  call this%outputtab2%initialize_column(text, 15, alignment=tabcenter)
907  if (this%inamedbound > 0) then
908  text = 'NAME'
909  call this%outputtab2%initialize_column(text, 20, alignment=tableft)
910  end if
911  end if
912  end if
913  end subroutine allocate_arrays
914 
915  !> @ brief Define observations
916  !!
917  !! Define the observations associated with this object
918  !<
919  subroutine gwe_gwe_df_obs(this)
920  ! -- dummy
921  class(gweexchangetype) :: this !< GweExchangeType
922  ! -- local
923  integer(I4B) :: indx
924  !
925  ! -- Store obs type and assign procedure pointer
926  ! for gwt-gwt observation type.
927  call this%obs%StoreObsType('flow-ja-face', .true., indx)
928  this%obs%obsData(indx)%ProcessIdPtr => gwe_gwe_process_obsid
929  end subroutine gwe_gwe_df_obs
930 
931  !> @ brief Read and prepare observations
932  !!
933  !! Handle observation exchanges exchange-boundary names.
934  !<
935  subroutine gwe_gwe_rp_obs(this)
936  ! -- modules
937  use constantsmodule, only: dzero
938  ! -- dummy
939  class(gweexchangetype) :: this !< GwtExchangeType
940  ! -- local
941  integer(I4B) :: i
942  integer(I4B) :: j
943  class(observetype), pointer :: obsrv => null()
944  character(len=LENBOUNDNAME) :: bname
945  logical :: jfound
946  ! -- formats
947 10 format('Exchange "', a, '" for observation "', a, &
948  '" is invalid in package "', a, '"')
949 20 format('Exchange id "', i0, '" for observation "', a, &
950  '" is invalid in package "', a, '"')
951  !
952  do i = 1, this%obs%npakobs
953  obsrv => this%obs%pakobs(i)%obsrv
954  !
955  ! -- indxbnds needs to be reset each stress period because
956  ! list of boundaries can change each stress period.
957  ! -- Not true for exchanges, but leave this in for now anyway.
958  call obsrv%ResetObsIndex()
959  obsrv%BndFound = .false.
960  !
961  bname = obsrv%FeatureName
962  if (bname /= '') then
963  ! -- Observation location(s) is(are) based on a boundary name.
964  ! Iterate through all boundaries to identify and store
965  ! corresponding index(indices) in bound array.
966  jfound = .false.
967  do j = 1, this%nexg
968  if (this%boundname(j) == bname) then
969  jfound = .true.
970  obsrv%BndFound = .true.
971  obsrv%CurrentTimeStepEndValue = dzero
972  call obsrv%AddObsIndex(j)
973  end if
974  end do
975  if (.not. jfound) then
976  write (errmsg, 10) trim(bname), trim(obsrv%ObsTypeId), trim(this%name)
977  call store_error(errmsg)
978  end if
979  else
980  ! -- Observation location is a single exchange number
981  if (obsrv%intPak1 <= this%nexg .and. obsrv%intPak1 > 0) then
982  jfound = .true.
983  obsrv%BndFound = .true.
984  obsrv%CurrentTimeStepEndValue = dzero
985  call obsrv%AddObsIndex(obsrv%intPak1)
986  else
987  jfound = .false.
988  end if
989  if (.not. jfound) then
990  write (errmsg, 20) obsrv%intPak1, trim(obsrv%ObsTypeId), trim(this%name)
991  call store_error(errmsg)
992  end if
993  end if
994  end do
995  !
996  ! -- write summary of error messages
997  if (count_errors() > 0) then
998  call store_error_filename(this%obs%inputFilename)
999  end if
1000  end subroutine gwe_gwe_rp_obs
1001 
1002  !> @ brief Final processing
1003  !!
1004  !! Conduct any final processing
1005  !<
1006  subroutine gwe_gwe_fp(this)
1007  ! -- dummy
1008  class(gweexchangetype) :: this !< GwtExchangeType
1009  end subroutine gwe_gwe_fp
1010 
1011  !> @brief Return true when this exchange provides matrix coefficients for
1012  !! solving @param model
1013  !<
1014  function gwe_gwe_connects_model(this, model) result(is_connected)
1015  ! -- dummy
1016  class(gweexchangetype) :: this !< GweExchangeType
1017  class(basemodeltype), pointer, intent(in) :: model !< the model to which the exchange might hold a connection
1018  ! -- return
1019  logical(LGP) :: is_connected !< true, when connected
1020  !
1021  is_connected = .false.
1022  !
1023  ! only connected when model is GwtModelType of course
1024  select type (model)
1025  class is (gwemodeltype)
1026  if (associated(this%gwemodel1, model)) then
1027  is_connected = .true.
1028  else if (associated(this%gwemodel2, model)) then
1029  is_connected = .true.
1030  end if
1031  end select
1032  end function gwe_gwe_connects_model
1033 
1034  !> @brief Should interface model be used for this exchange
1035  !!
1036  !! For now this always returns true, since we do not support
1037  !! a classic-style two-point flux approximation for GWT-GWT.
1038  !! If we ever add logic to support a simpler non-interface
1039  !! model flux calculation, then logic should be added here to
1040  !! set the return accordingly.
1041  !<
1042  function use_interface_model(this) result(use_im)
1043  ! -- dummy
1044  class(gweexchangetype) :: this !< GweExchangeType
1045  ! -- return
1046  logical(LGP) :: use_im !< true when interface model should be used
1047  !
1048  ! For now set use_im to .true. since the interface model approach
1049  ! must currently be used for any GWT-GWT exchange.
1050  use_im = .true.
1051  end function
1052 
1053  !> @ brief Save simulated flow observations
1054  !!
1055  !! Save the simulated flows for each exchange
1056  !<
1057  subroutine gwe_gwe_save_simvals(this)
1058  ! -- dummy
1059  use simvariablesmodule, only: errmsg
1060  use constantsmodule, only: dzero
1061  use observemodule, only: observetype
1062  class(gweexchangetype), intent(inout) :: this
1063  ! -- local
1064  integer(I4B) :: i
1065  integer(I4B) :: j
1066  integer(I4B) :: n1
1067  integer(I4B) :: n2
1068  integer(I4B) :: iexg
1069  real(DP) :: v
1070  type(observetype), pointer :: obsrv => null()
1071  !
1072  ! -- Write simulated values for all gwt-gwt observations
1073  if (this%obs%npakobs > 0) then
1074  call this%obs%obs_bd_clear()
1075  do i = 1, this%obs%npakobs
1076  obsrv => this%obs%pakobs(i)%obsrv
1077  do j = 1, obsrv%indxbnds_count
1078  iexg = obsrv%indxbnds(j)
1079  v = dzero
1080  select case (obsrv%ObsTypeId)
1081  case ('FLOW-JA-FACE')
1082  n1 = this%nodem1(iexg)
1083  n2 = this%nodem2(iexg)
1084  v = this%simvals(iexg)
1085  case default
1086  errmsg = 'Unrecognized observation type: '// &
1087  trim(obsrv%ObsTypeId)
1088  call store_error(errmsg)
1089  call store_error_filename(this%obs%inputFilename)
1090  end select
1091  call this%obs%SaveOneSimval(obsrv, v)
1092  end do
1093  end do
1094  end if
1095  end subroutine gwe_gwe_save_simvals
1096 
1097  !> @ brief Obs ID processor
1098  !!
1099  !! Process observations for this exchange
1100  !<
1101  subroutine gwe_gwe_process_obsid(obsrv, dis, inunitobs, iout)
1102  ! -- modules
1103  use constantsmodule, only: linelength
1104  use inputoutputmodule, only: urword
1105  use observemodule, only: observetype
1106  use basedismodule, only: disbasetype
1107  ! -- dummy
1108  type(observetype), intent(inout) :: obsrv
1109  class(disbasetype), intent(in) :: dis
1110  integer(I4B), intent(in) :: inunitobs
1111  integer(I4B), intent(in) :: iout
1112  ! -- local
1113  integer(I4B) :: n, iexg, istat
1114  integer(I4B) :: icol, istart, istop
1115  real(DP) :: r
1116  character(len=LINELENGTH) :: string
1117  !
1118  string = obsrv%IDstring
1119  icol = 1
1120  ! -- get exchange index
1121  call urword(string, icol, istart, istop, 1, n, r, iout, inunitobs)
1122  read (string(istart:istop), '(i10)', iostat=istat) iexg
1123  if (istat == 0) then
1124  obsrv%intPak1 = iexg
1125  else
1126  ! Integer can't be read from string; it's presumed to be an exchange
1127  ! boundary name (already converted to uppercase)
1128  obsrv%FeatureName = trim(adjustl(string))
1129  ! -- Observation may require summing rates from multiple exchange
1130  ! boundaries, so assign intPak1 as a value that indicates observation
1131  ! is for a named exchange boundary or group of exchange boundaries.
1132  obsrv%intPak1 = namedboundflag
1133  end if
1134  end subroutine gwe_gwe_process_obsid
1135 
1136  !> @ brief Cast polymorphic object as exchange
1137  !!
1138  !! Cast polymorphic object as exchange
1139  !<
1140  function castasgweexchange(obj) result(res)
1141  implicit none
1142  ! -- dummy
1143  class(*), pointer, intent(inout) :: obj
1144  ! -- return
1145  class(gweexchangetype), pointer :: res
1146  !
1147  res => null()
1148  if (.not. associated(obj)) return
1149  !
1150  select type (obj)
1151  class is (gweexchangetype)
1152  res => obj
1153  end select
1154  end function castasgweexchange
1155 
1156  !> @ brief Get exchange from list
1157  !!
1158  !! Return an exchange from the list for specified index
1159  !<
1160  function getgweexchangefromlist(list, idx) result(res)
1161  implicit none
1162  ! -- dummy
1163  type(listtype), intent(inout) :: list
1164  integer(I4B), intent(in) :: idx
1165  ! -- return
1166  class(gweexchangetype), pointer :: res
1167  ! -- local
1168  class(*), pointer :: obj
1169  !
1170  obj => list%GetItem(idx)
1171  res => castasgweexchange(obj)
1172  end function getgweexchangefromlist
1173 
1174 end module gwegweexchangemodule
1175 
subroutine, public addbaseexchangetolist(list, exchange)
Add the exchange object (BaseExchangeType) to a list.
class(basemodeltype) function, pointer, public getbasemodelfromlist(list, idx)
Definition: BaseModel.f90:172
This module contains the BudgetModule.
Definition: Budget.f90:20
subroutine, public rate_accumulator(flow, rin, rout)
@ brief Rate accumulator subroutine
Definition: Budget.f90:632
This module contains simulation constants.
Definition: Constants.f90:9
integer(i4b), parameter linelength
maximum length of a standard line
Definition: Constants.f90:45
@ tabcenter
centered table column
Definition: Constants.f90:172
@ tableft
left justified table column
Definition: Constants.f90:171
integer(i4b), parameter lenmodelname
maximum length of the model name
Definition: Constants.f90:22
integer(i4b), parameter lenpackagename
maximum length of the package name
Definition: Constants.f90:23
integer(i4b), parameter namedboundflag
named bound flag
Definition: Constants.f90:49
real(dp), parameter dnodata
real no data constant
Definition: Constants.f90:95
integer(i4b), parameter lenvarname
maximum length of a variable name
Definition: Constants.f90:17
integer(i4b), parameter lenauxname
maximum length of a aux variable
Definition: Constants.f90:35
integer(i4b), parameter lenboundname
maximum length of a bound name
Definition: Constants.f90:36
real(dp), parameter dzero
real constant zero
Definition: Constants.f90:65
integer(i4b), parameter lenbudtxt
maximum length of a budget component names
Definition: Constants.f90:37
subroutine, public gnc_cr(gncobj, name_parent, inunit, iout)
Create new GNC exchange object.
Definition: GhostNode.f90:61
This module contains the GweGweExchangeModule Module.
Definition: exg-gwegwe.f90:10
subroutine gwe_gwe_rp(this)
@ brief Read and prepare
Definition: exg-gwegwe.f90:324
subroutine read_mvt(this, iout)
@ brief Read mover
Definition: exg-gwegwe.f90:761
subroutine gwe_gwe_ot(this)
@ brief Output
Definition: exg-gwegwe.f90:619
subroutine gwe_gwe_rp_obs(this)
@ brief Read and prepare observations
Definition: exg-gwegwe.f90:936
subroutine gwe_gwe_process_obsid(obsrv, dis, inunitobs, iout)
@ brief Obs ID processor
subroutine gwe_gwe_bdsav_model(this, model)
@ brief Budget save
Definition: exg-gwegwe.f90:451
subroutine gwe_gwe_ad(this)
@ brief Advance
Definition: exg-gwegwe.f90:344
subroutine gwe_gwe_df_obs(this)
@ brief Define observations
Definition: exg-gwegwe.f90:920
subroutine gwe_gwe_bd(this, icnvg, isuppress_output, isolnid)
@ brief Budget
Definition: exg-gwegwe.f90:375
subroutine gwe_gwe_da(this)
@ brief Deallocate
Definition: exg-gwegwe.f90:806
subroutine gwe_gwe_save_simvals(this)
@ brief Save simulated flow observations
subroutine allocate_arrays(this)
@ brief Allocate arrays
Definition: exg-gwegwe.f90:852
logical(lgp) function gwe_gwe_connects_model(this, model)
Return true when this exchange provides matrix coefficients for solving.
class(gweexchangetype) function, pointer, public getgweexchangefromlist(list, idx)
@ brief Get exchange from list
class(gweexchangetype) function, pointer, public castasgweexchange(obj)
@ brief Cast polymorphic object as exchange
subroutine source_options(this, iout)
@ brief Source options
Definition: exg-gwegwe.f90:673
logical(lgp) function use_interface_model(this)
Should interface model be used for this exchange.
subroutine, public gweexchange_create(filename, name, id, m1_id, m2_id, input_mempath)
@ brief Create GWT GWT exchange
Definition: exg-gwegwe.f90:111
subroutine gwe_gwe_bdsav(this)
@ brief Budget save
Definition: exg-gwegwe.f90:417
subroutine gwe_gwe_ar(this)
@ brief Allocate and read
Definition: exg-gwegwe.f90:309
subroutine allocate_scalars(this)
@ brief Allocate scalars
Definition: exg-gwegwe.f90:782
subroutine validate_exchange(this)
validate exchange data after reading
Definition: exg-gwegwe.f90:249
subroutine gwe_gwe_fp(this)
@ brief Final processing
subroutine gwe_gwe_fc(this, kiter, matrix_sln, rhs_sln, inwtflag)
@ brief Fill coefficients
Definition: exg-gwegwe.f90:359
subroutine gwe_gwe_df(this)
@ brief Define GWE GWE exchange
Definition: exg-gwegwe.f90:196
Definition: gwe.f90:3
integer(i4b) function, public getunit()
Get a free unit number.
subroutine, public openfile(iu, iout, fname, ftype, fmtarg_opt, accarg_opt, filstat_opt, mode_opt)
Open a file.
Definition: InputOutput.f90:30
subroutine, public urword(line, icol, istart, istop, ncode, n, r, iout, in)
Extract a word from a string.
This module defines variable data types.
Definition: kind.f90:8
type(listtype), public basemodellist
Definition: mf6lists.f90:16
type(listtype), public baseexchangelist
Definition: mf6lists.f90:25
character(len=lenmempath) function create_mem_path(component, subcomponent, context)
returns the path to the memory object
This module contains the derived types ObserveType and ObsDataType.
Definition: Observe.f90:15
This module contains the derived type ObsType.
Definition: Obs.f90:127
subroutine, public obs_cr(obs, inobs)
@ brief Create a new ObsType object
Definition: Obs.f90:225
This module contains simulation methods.
Definition: Sim.f90:10
subroutine, public ustop(stopmess, ioutlocal)
Stop the simulation.
Definition: Sim.f90:312
subroutine, public store_error(msg, terminate)
Store an error message.
Definition: Sim.f90:92
integer(i4b) function, public count_errors()
Return number of errors.
Definition: Sim.f90:59
subroutine, public store_error_filename(filename, terminate)
Store the erroring file name.
Definition: Sim.f90:203
This module contains simulation variables.
Definition: SimVariables.f90:9
character(len=maxcharlen) errmsg
error message string
integer(i4b), dimension(:), allocatable model_loc_idx
equals the local index into the basemodel list (-1 when not available)
integer(i4b) iout
file unit number for simulation output
This module contains the SourceCommonModule.
Definition: SourceCommon.f90:7
logical(lgp) function, public filein_fname(filename, tagname, input_mempath, input_fname)
enforce and set a single input filename provided via FILEIN keyword
subroutine, public table_cr(this, name, title)
Definition: Table.f90:87
logical(lgp), pointer, public readnewdata
flag indicating time to read new data
Definition: tdis.f90:26
integer(i4b), pointer, public kstp
current time step number
Definition: tdis.f90:24
integer(i4b), pointer, public kper
current stress period number
Definition: tdis.f90:23
subroutine, public mvt_cr(mvt, name_model, inunit, iout, fmi1, eqnsclfac, depvartype, gwfmodelname1, gwfmodelname2, fmi2)
Create a new mover transport object.
Definition: tsp-mvt.f90:75
Highest level model type. All models extend this parent type.
Definition: BaseModel.f90:13
This class is used to store a single deferred-length character string. It was designed to work in an ...
Definition: CharString.f90:23
Exchange based on connection between discretizations of DisBaseType. The data specifies the connectio...
Derived type for GwtExchangeType.
Definition: exg-gwegwe.f90:47
A generic heterogeneous doubly-linked list.
Definition: List.f90:14