MODFLOW 6  version 6.8.0.dev0
USGS Modular Hydrologic Model
gwtgwtexchangemodule Module Reference

This module contains the GwtGwtExchangeModule Module. More...

Data Types

type  gwtexchangetype
 Derived type for GwtExchangeType. More...
 

Functions/Subroutines

subroutine, public gwtexchange_create (filename, name, id, m1_id, m2_id, input_mempath)
 @ brief Create GWT GWT exchange More...
 
subroutine gwt_gwt_df (this)
 @ brief Define GWT GWT exchange More...
 
subroutine validate_exchange (this)
 validate exchange data after reading More...
 
subroutine gwt_gwt_ar (this)
 @ brief Allocate and read More...
 
subroutine gwt_gwt_rp (this)
 @ brief Read and prepare More...
 
subroutine gwt_gwt_ad (this)
 @ brief Advance More...
 
subroutine gwt_gwt_cf (this, kiter)
 
subroutine gwt_gwt_fc (this, kiter, matrix_sln, rhs_sln, inwtflag)
 @ brief Fill coefficients More...
 
subroutine gwt_gwt_bd (this, icnvg, isuppress_output, isolnid)
 @ brief Budget More...
 
subroutine gwt_gwt_bdsav (this)
 @ brief Budget save More...
 
subroutine gwt_gwt_bdsav_model (this, model)
 @ brief Budget save More...
 
subroutine gwt_gwt_ot (this)
 @ brief Output More...
 
subroutine source_options (this, iout)
 @ brief Source options More...
 
subroutine read_mvt (this, iout)
 @ brief Read mover More...
 
subroutine allocate_scalars (this)
 @ brief Allocate scalars More...
 
subroutine gwt_gwt_da (this)
 @ brief Deallocate More...
 
subroutine allocate_arrays (this)
 @ brief Allocate arrays More...
 
subroutine gwt_gwt_df_obs (this)
 @ brief Define observations More...
 
subroutine gwt_gwt_rp_obs (this)
 @ brief Read and prepare observations More...
 
subroutine gwt_gwt_fp (this)
 @ brief Final processing More...
 
logical(lgp) function gwt_gwt_connects_model (this, model)
 Return true when this exchange provides matrix coefficients for solving. More...
 
logical(lgp) function use_interface_model (this)
 Should interface model be used for this exchange. More...
 
subroutine gwt_gwt_save_simvals (this)
 @ brief Save simulated flow observations More...
 
subroutine gwt_gwt_process_obsid (obsrv, dis, inunitobs, iout)
 @ brief Obs ID processor More...
 
class(gwtexchangetype) function, pointer, public castasgwtexchange (obj)
 @ brief Cast polymorphic object as exchange More...
 
class(gwtexchangetype) function, pointer, public getgwtexchangefromlist (list, idx)
 @ brief Get exchange from list More...
 

Detailed Description

This module contains the code for connecting two GWT Models. The methods are based on the simple two point flux approximation with the option to use ghost nodes to improve accuracy. This exchange is used by GwtGwtConnection with the more sophisticated interface model coupling approach when XT3D is needed.

Function/Subroutine Documentation

◆ allocate_arrays()

subroutine gwtgwtexchangemodule::allocate_arrays ( class(gwtexchangetype this)

Allocate arrays

Parameters
thisGwtExchangeType

Definition at line 884 of file exg-gwtgwt.f90.

885  ! -- modules
887  ! -- dummy
888  class(GwtExchangeType) :: this !< GwtExchangeType
889  ! -- local
890  character(len=LINELENGTH) :: text
891  integer(I4B) :: ntabcol, i
892  !
893  call this%DisConnExchangeType%allocate_arrays()
894  !
895  call mem_allocate(this%cond, this%nexg, 'COND', this%memoryPath)
896  call mem_allocate(this%simvals, this%nexg, 'SIMVALS', this%memoryPath)
897  !
898  ! -- Initialize
899  do i = 1, this%nexg
900  this%cond(i) = dnodata
901  end do
902  !
903  ! -- allocate and initialize the output table
904  if (this%iprflow /= 0) then
905  !
906  ! -- dimension table
907  ntabcol = 3
908  if (this%inamedbound > 0) then
909  ntabcol = ntabcol + 1
910  end if
911  !
912  ! -- initialize the output table objects
913  ! outouttab1
914  if (this%v_model1%is_local) then
915  call table_cr(this%outputtab1, this%name, ' ')
916  call this%outputtab1%table_df(this%nexg, ntabcol, this%gwtmodel1%iout, &
917  transient=.true.)
918  text = 'NUMBER'
919  call this%outputtab1%initialize_column(text, 10, alignment=tabcenter)
920  text = 'CELLID'
921  call this%outputtab1%initialize_column(text, 20, alignment=tableft)
922  text = 'RATE'
923  call this%outputtab1%initialize_column(text, 15, alignment=tabcenter)
924  if (this%inamedbound > 0) then
925  text = 'NAME'
926  call this%outputtab1%initialize_column(text, 20, alignment=tableft)
927  end if
928  end if
929  ! outouttab2
930  if (this%v_model2%is_local) then
931  call table_cr(this%outputtab2, this%name, ' ')
932  call this%outputtab2%table_df(this%nexg, ntabcol, this%gwtmodel2%iout, &
933  transient=.true.)
934  text = 'NUMBER'
935  call this%outputtab2%initialize_column(text, 10, alignment=tabcenter)
936  text = 'CELLID'
937  call this%outputtab2%initialize_column(text, 20, alignment=tableft)
938  text = 'RATE'
939  call this%outputtab2%initialize_column(text, 15, alignment=tabcenter)
940  if (this%inamedbound > 0) then
941  text = 'NAME'
942  call this%outputtab2%initialize_column(text, 20, alignment=tableft)
943  end if
944  end if
945  end if
Here is the call graph for this function:

◆ allocate_scalars()

subroutine gwtgwtexchangemodule::allocate_scalars ( class(gwtexchangetype this)

Allocate scalar variables

Parameters
thisGwtExchangeType

Definition at line 814 of file exg-gwtgwt.f90.

815  ! -- modules
817  use constantsmodule, only: dzero
818  ! -- dummy
819  class(GwtExchangeType) :: this !< GwtExchangeType
820  !
821  call this%DisConnExchangeType%allocate_scalars()
822  !
823  call mem_allocate(this%inewton, 'INEWTON', this%memoryPath)
824  call mem_allocate(this%inobs, 'INOBS', this%memoryPath)
825  call mem_allocate(this%iAdvScheme, 'IADVSCHEME', this%memoryPath)
826  this%inewton = 0
827  this%inobs = 0
828  this%iAdvScheme = 0
829  !
830  call mem_allocate(this%inmvt, 'INMVT', this%memoryPath)
831  this%inmvt = 0
This module contains simulation constants.
Definition: Constants.f90:9
real(dp), parameter dzero
real constant zero
Definition: Constants.f90:65

◆ castasgwtexchange()

class(gwtexchangetype) function, pointer, public gwtgwtexchangemodule::castasgwtexchange ( class(*), intent(inout), pointer  obj)

Cast polymorphic object as exchange

Definition at line 1173 of file exg-gwtgwt.f90.

1174  implicit none
1175  ! -- dummy
1176  class(*), pointer, intent(inout) :: obj
1177  ! -- return
1178  class(GwtExchangeType), pointer :: res
1179  !
1180  res => null()
1181  if (.not. associated(obj)) return
1182  !
1183  select type (obj)
1184  class is (gwtexchangetype)
1185  res => obj
1186  end select
Here is the caller graph for this function:

◆ getgwtexchangefromlist()

class(gwtexchangetype) function, pointer, public gwtgwtexchangemodule::getgwtexchangefromlist ( type(listtype), intent(inout)  list,
integer(i4b), intent(in)  idx 
)

Return an exchange from the list for specified index

Definition at line 1193 of file exg-gwtgwt.f90.

1194  implicit none
1195  ! -- dummy
1196  type(ListType), intent(inout) :: list
1197  integer(I4B), intent(in) :: idx
1198  ! -- return
1199  class(GwtExchangeType), pointer :: res
1200  ! -- local
1201  class(*), pointer :: obj
1202  !
1203  obj => list%GetItem(idx)
1204  res => castasgwtexchange(obj)
Here is the call graph for this function:

◆ gwt_gwt_ad()

subroutine gwtgwtexchangemodule::gwt_gwt_ad ( class(gwtexchangetype this)

Advance mover and obs

Parameters
thisGwtExchangeType

Definition at line 346 of file exg-gwtgwt.f90.

347  ! -- dummy
348  class(GwtExchangeType) :: this !< GwtExchangeType
349  !
350  ! -- Advance mover
351  !if(this%inmvt > 0) call this%mvt%mvt_ad()
352  !
353  ! -- Push simulated values to preceding time step
354  call this%obs%obs_ad()

◆ gwt_gwt_ar()

subroutine gwtgwtexchangemodule::gwt_gwt_ar ( class(gwtexchangetype this)
private

Allocated and read and calculate saturated conductance

Parameters
thisGwtExchangeType

Definition at line 311 of file exg-gwtgwt.f90.

312  ! -- dummy
313  class(GwtExchangeType) :: this !< GwtExchangeType
314  !
315  ! -- If mover is active, then call ar routine
316  if (this%inmvt > 0) call this%mvt%mvt_ar()
317  !
318  ! -- Observation AR
319  call this%obs%obs_ar()

◆ gwt_gwt_bd()

subroutine gwtgwtexchangemodule::gwt_gwt_bd ( class(gwtexchangetype this,
integer(i4b), intent(inout)  icnvg,
integer(i4b), intent(in)  isuppress_output,
integer(i4b), intent(in)  isolnid 
)
private

Accumulate budget terms

Parameters
thisGwtExchangeType

Definition at line 402 of file exg-gwtgwt.f90.

403  ! -- modules
405  use budgetmodule, only: rate_accumulator
406  ! -- dummy
407  class(GwtExchangeType) :: this !< GwtExchangeType
408  integer(I4B), intent(inout) :: icnvg
409  integer(I4B), intent(in) :: isuppress_output
410  integer(I4B), intent(in) :: isolnid
411  ! -- local
412  character(len=LENBUDTXT), dimension(1) :: budtxt
413  real(DP), dimension(2, 1) :: budterm
414  real(DP) :: ratin, ratout
415  !
416  ! -- initialize
417  budtxt(1) = ' FLOW-JA-FACE'
418  !
419  ! -- Calculate ratin/ratout and pass to model budgets
420  call rate_accumulator(this%simvals, ratin, ratout)
421  !
422  ! -- Add the budget terms to model 1
423  if (associated(this%gwtmodel1)) then
424  budterm(1, 1) = ratin
425  budterm(2, 1) = ratout
426  call this%gwtmodel1%model_bdentry(budterm, budtxt, this%name)
427  end if
428  !
429  ! -- Add the budget terms to model 2
430  if (associated(this%gwtmodel2)) then
431  budterm(1, 1) = ratout
432  budterm(2, 1) = ratin
433  call this%gwtmodel2%model_bdentry(budterm, budtxt, this%name)
434  end if
435  !
436  ! -- Call mvt bd routine
437  if (this%inmvt > 0) call this%mvt%mvt_bd()
This module contains the BudgetModule.
Definition: Budget.f90:20
subroutine, public rate_accumulator(flow, rin, rout)
@ brief Rate accumulator subroutine
Definition: Budget.f90:632
integer(i4b), parameter lenpackagename
maximum length of the package name
Definition: Constants.f90:23
integer(i4b), parameter lenbudtxt
maximum length of a budget component names
Definition: Constants.f90:37
Here is the call graph for this function:

◆ gwt_gwt_bdsav()

subroutine gwtgwtexchangemodule::gwt_gwt_bdsav ( class(gwtexchangetype this)

Output individual flows to listing file and binary budget files

Parameters
thisGwtExchangeType

Definition at line 444 of file exg-gwtgwt.f90.

445  ! -- dummy
446  class(GwtExchangeType) :: this !< GwtExchangeType
447  ! -- local
448  integer(I4B) :: icbcfl, ibudfl
449  !
450  ! -- budget for model1
451  if (associated(this%gwtmodel1)) then
452  call this%gwt_gwt_bdsav_model(this%gwtmodel1)
453  end if
454  !
455  ! -- budget for model2
456  if (associated(this%gwtmodel2)) then
457  call this%gwt_gwt_bdsav_model(this%gwtmodel2)
458  end if
459  !
460  ! -- Set icbcfl, ibudfl to zero so that flows will be printed and
461  ! saved, if the options were set in the MVT package
462  icbcfl = 1
463  ibudfl = 1
464  !
465  ! -- Call mvt bd routine
466  !cdl todo: if(this%inmvt > 0) call this%mvt%mvt_bdsav(icbcfl, ibudfl, isuppress_output)
467  !
468  ! -- Calculate and write simulated values for observations
469  if (this%inobs /= 0) then
470  call this%gwt_gwt_save_simvals()
471  end if

◆ gwt_gwt_bdsav_model()

subroutine gwtgwtexchangemodule::gwt_gwt_bdsav_model ( class(gwtexchangetype this,
class(gwtmodeltype), pointer  model 
)
private

Output individual flows to listing file and binary budget files

Parameters
thisGwtExchangeType

Definition at line 478 of file exg-gwtgwt.f90.

479  ! -- modules
481  use tdismodule, only: kstp, kper
482  ! -- dummy
483  class(GwtExchangeType) :: this !< GwtExchangeType
484  class(GwtModelType), pointer :: model
485  ! -- local
486  character(len=LENBOUNDNAME) :: bname
487  character(len=LENPACKAGENAME + 4) :: packname
488  character(len=LENBUDTXT), dimension(1) :: budtxt
489  type(TableType), pointer :: output_tab
490  class(VirtualModelType), pointer :: nbr_model
491  character(len=20) :: nodestr
492  integer(I4B) :: ntabrows
493  integer(I4B) :: nodeu
494  integer(I4B) :: i, n1, n2, n1u, n2u
495  integer(I4B) :: ibinun
496  real(DP) :: ratin, ratout, rrate
497  logical(LGP) :: is_for_model1
498  integer(I4B) :: isuppress_output
499  real(DP), dimension(this%naux) :: auxrow
500  !
501  ! -- initialize local variables
502  isuppress_output = 0
503  budtxt(1) = ' FLOW-JA-FACE'
504  packname = 'EXG '//this%name
505  packname = adjustr(packname)
506  if (associated(model, this%gwtmodel1)) then
507  output_tab => this%outputtab1
508  nbr_model => this%v_model2
509  is_for_model1 = .true.
510  else
511  output_tab => this%outputtab2
512  nbr_model => this%v_model1
513  is_for_model1 = .false.
514  end if
515  !
516  ! -- update output tables
517  if (this%iprflow /= 0) then
518  !
519  ! -- update titles
520  if (model%oc%oc_save('BUDGET')) then
521  call output_tab%set_title(packname)
522  end if
523  !
524  ! -- set table kstp and kper
525  call output_tab%set_kstpkper(kstp, kper)
526  !
527  ! -- update maxbound of tables
528  ntabrows = 0
529  do i = 1, this%nexg
530  n1 = this%nodem1(i)
531  n2 = this%nodem2(i)
532  !
533  ! -- If both cells are active then calculate flow rate
534  if (this%v_model1%ibound%get(n1) /= 0 .and. &
535  this%v_model2%ibound%get(n2) /= 0) then
536  ntabrows = ntabrows + 1
537  end if
538  end do
539  if (ntabrows > 0) then
540  call output_tab%set_maxbound(ntabrows)
541  end if
542  end if
543  !
544  ! -- Print and write budget terms for model 1
545  !
546  ! -- Set binary unit numbers for saving flows
547  if (this%ipakcb /= 0) then
548  ibinun = model%oc%oc_save_unit('BUDGET')
549  else
550  ibinun = 0
551  end if
552  !
553  ! -- If save budget flag is zero for this stress period, then
554  ! shut off saving
555  if (.not. model%oc%oc_save('BUDGET')) ibinun = 0
556  if (isuppress_output /= 0) then
557  ibinun = 0
558  end if
559  !
560  ! -- If cell-by-cell flows will be saved as a list, write header.
561  if (ibinun /= 0) then
562  call model%dis%record_srcdst_list_header(budtxt(1), &
563  model%name, &
564  this%name, &
565  nbr_model%name, &
566  this%name, &
567  this%naux, this%auxname, &
568  ibinun, this%nexg, &
569  model%iout)
570  end if
571  !
572  ! Initialize accumulators
573  ratin = dzero
574  ratout = dzero
575  !
576  ! -- Loop through all exchanges
577  do i = 1, this%nexg
578  !
579  ! -- Assign boundary name
580  if (this%inamedbound > 0) then
581  bname = this%boundname(i)
582  else
583  bname = ''
584  end if
585  !
586  ! -- Calculate the flow rate between n1 and n2
587  rrate = dzero
588  n1 = this%nodem1(i)
589  n2 = this%nodem2(i)
590  !
591  ! -- If both cells are active then calculate flow rate
592  if (this%v_model1%ibound%get(n1) /= 0 .and. &
593  this%v_model2%ibound%get(n2) /= 0) then
594  rrate = this%simvals(i)
595  !
596  ! -- Print the individual rates to model list files if requested
597  if (this%iprflow /= 0) then
598  if (model%oc%oc_save('BUDGET')) then
599  !
600  ! -- set nodestr and write outputtab table
601  if (is_for_model1) then
602  nodeu = model%dis%get_nodeuser(n1)
603  call model%dis%nodeu_to_string(nodeu, nodestr)
604  call output_tab%print_list_entry(i, trim(adjustl(nodestr)), &
605  rrate, bname)
606  else
607  nodeu = model%dis%get_nodeuser(n2)
608  call model%dis%nodeu_to_string(nodeu, nodestr)
609  call output_tab%print_list_entry(i, trim(adjustl(nodestr)), &
610  -rrate, bname)
611  end if
612  end if
613  end if
614  if (rrate < dzero) then
615  ratout = ratout - rrate
616  else
617  ratin = ratin + rrate
618  end if
619  end if
620  !
621  ! -- If saving cell-by-cell flows in list, write flow
622  n1u = this%v_model1%dis_get_nodeuser(n1)
623  n2u = this%v_model2%dis_get_nodeuser(n2)
624  if (ibinun /= 0) then
625  if (this%naux > 0) then
626  auxrow(:) = this%auxvar(:, i)
627  end if
628  if (is_for_model1) then
629  call model%dis%record_mf6_list_entry( &
630  ibinun, n1u, n2u, rrate, this%naux, auxrow, &
631  .false., .false.)
632  else
633  call model%dis%record_mf6_list_entry( &
634  ibinun, n2u, n1u, -rrate, this%naux, auxrow, &
635  .false., .false.)
636  end if
637  end if
638  !
639  end do
integer(i4b), pointer, public kstp
current time step number
Definition: tdis.f90:27
integer(i4b), pointer, public kper
current stress period number
Definition: tdis.f90:26

◆ gwt_gwt_cf()

subroutine gwtgwtexchangemodule::gwt_gwt_cf ( class(gwtexchangetype this,
integer(i4b), intent(in)  kiter 
)
private
Parameters
thisGwfExchangeType

Definition at line 357 of file exg-gwtgwt.f90.

358  class(GwtExchangeType) :: this !< GwfExchangeType
359  integer(I4B), intent(in) :: kiter
360  ! local
361  real(DP), dimension(:), pointer, contiguous :: x_m1, x_m2
362 
363  ! call mvt cf routine
364  if (this%inmvt > 0) then
365  x_m1 => null()
366  x_m2 => null()
367  if (associated(this%gwtmodel1)) x_m1 => this%gwtmodel1%x
368  if (associated(this%gwtmodel2)) x_m2 => this%gwtmodel2%x
369  call this%mvt%xmvt_cf(x_m1, x_m2)
370  end if
371 

◆ gwt_gwt_connects_model()

logical(lgp) function gwtgwtexchangemodule::gwt_gwt_connects_model ( class(gwtexchangetype this,
class(basemodeltype), intent(in), pointer  model 
)
private
Parameters
model
thisGwtExchangeType
[in]modelthe model to which the exchange might hold a connection
Returns
true, when connected

Definition at line 1047 of file exg-gwtgwt.f90.

1048  ! -- dummy
1049  class(GwtExchangeType) :: this !< GwtExchangeType
1050  class(BaseModelType), pointer, intent(in) :: model !< the model to which the exchange might hold a connection
1051  ! -- return
1052  logical(LGP) :: is_connected !< true, when connected
1053  !
1054  is_connected = .false.
1055  !
1056  ! only connected when model is GwtModelType of course
1057  select type (model)
1058  class is (gwtmodeltype)
1059  if (associated(this%gwtmodel1, model)) then
1060  is_connected = .true.
1061  else if (associated(this%gwtmodel2, model)) then
1062  is_connected = .true.
1063  end if
1064  end select

◆ gwt_gwt_da()

subroutine gwtgwtexchangemodule::gwt_gwt_da ( class(gwtexchangetype this)

Deallocate memory associated with this object

Parameters
thisGwtExchangeType

Definition at line 838 of file exg-gwtgwt.f90.

839  ! -- modules
841  ! -- dummy
842  class(GwtExchangeType) :: this !< GwtExchangeType
843  !
844  ! -- objects
845  if (this%inmvt > 0) then
846  call this%mvt%mvt_da()
847  deallocate (this%mvt)
848  end if
849  call this%obs%obs_da()
850  deallocate (this%obs)
851  !
852  ! -- arrays
853  call mem_deallocate(this%cond)
854  call mem_deallocate(this%simvals)
855  call mem_deallocate(this%gwfsimvals, 'GWFSIMVALS', this%memoryPath) ! linked memory
856  !
857  ! -- output table objects
858  if (associated(this%outputtab1)) then
859  call this%outputtab1%table_da()
860  deallocate (this%outputtab1)
861  nullify (this%outputtab1)
862  end if
863  if (associated(this%outputtab2)) then
864  call this%outputtab2%table_da()
865  deallocate (this%outputtab2)
866  nullify (this%outputtab2)
867  end if
868  !
869  ! -- scalars
870  deallocate (this%filename)
871  call mem_deallocate(this%inewton)
872  call mem_deallocate(this%inobs)
873  call mem_deallocate(this%iAdvScheme)
874  call mem_deallocate(this%inmvt)
875  !
876  ! -- deallocate base
877  call this%DisConnExchangeType%disconnex_da()

◆ gwt_gwt_df()

subroutine gwtgwtexchangemodule::gwt_gwt_df ( class(gwtexchangetype this)

Define GWT to GWT exchange object.

Parameters
thisGwtExchangeType

Definition at line 196 of file exg-gwtgwt.f90.

197  ! -- modules
198  use simvariablesmodule, only: iout
200  use ghostnodemodule, only: gnc_cr
201  ! -- dummy
202  class(GwtExchangeType) :: this !< GwtExchangeType
203  ! -- local
204  !
205  ! -- log the exchange
206  write (iout, '(/a,a)') ' Creating exchange: ', this%name
207  !
208  ! -- Ensure models are in same solution
209  if (this%v_model1%idsoln%get() /= this%v_model2%idsoln%get()) then
210  call store_error('Two models are connected in a GWT '// &
211  'exchange but they are in different solutions. '// &
212  'GWT models must be in same solution: '// &
213  trim(this%v_model1%name)//' '// &
214  trim(this%v_model2%name))
215  call store_error_filename(this%filename)
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  if (this%v_model1%is_local) then
234  call this%mvt%mvt_df(this%gwtmodel1%dis)
235  else
236  call this%mvt%mvt_df(this%gwtmodel2%dis)
237  end if
238  end if
239  !
240  ! -- Store obs
241  call this%gwt_gwt_df_obs()
242  if (associated(this%gwtmodel1)) then
243  call this%obs%obs_df(iout, this%name, 'GWT-GWT', this%gwtmodel1%dis)
244  end if
245  !
246  ! -- validate
247  call this%validate_exchange()
subroutine, public gnc_cr(gncobj, name_parent, inunit, iout)
Create new GNC exchange object.
Definition: GhostNode.f90:61
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
This module contains simulation variables.
Definition: SimVariables.f90:9
integer(i4b) iout
file unit number for simulation output
Here is the call graph for this function:

◆ gwt_gwt_df_obs()

subroutine gwtgwtexchangemodule::gwt_gwt_df_obs ( class(gwtexchangetype this)

Define the observations associated with this object

Parameters
thisGwtExchangeType

Definition at line 952 of file exg-gwtgwt.f90.

953  ! -- dummy
954  class(GwtExchangeType) :: this !< GwtExchangeType
955  ! -- local
956  integer(I4B) :: indx
957  !
958  ! -- Store obs type and assign procedure pointer
959  ! for gwt-gwt observation type.
960  call this%obs%StoreObsType('flow-ja-face', .true., indx)
961  this%obs%obsData(indx)%ProcessIdPtr => gwt_gwt_process_obsid
Here is the call graph for this function:

◆ gwt_gwt_fc()

subroutine gwtgwtexchangemodule::gwt_gwt_fc ( class(gwtexchangetype this,
integer(i4b), intent(in)  kiter,
class(matrixbasetype), pointer  matrix_sln,
real(dp), dimension(:), intent(inout)  rhs_sln,
integer(i4b), intent(in), optional  inwtflag 
)
private

Calculate conductance and fill coefficient matrix

Parameters
thisGwtExchangeType

Definition at line 378 of file exg-gwtgwt.f90.

379  ! -- dummy
380  class(GwtExchangeType) :: this !< GwtExchangeType
381  integer(I4B), intent(in) :: kiter
382  class(MatrixBaseType), pointer :: matrix_sln
383  real(DP), dimension(:), intent(inout) :: rhs_sln
384  integer(I4B), optional, intent(in) :: inwtflag
385  ! local
386  real(DP), dimension(:), pointer, contiguous :: x_m1, x_m2
387  !
388  ! -- Call mvt fc routine
389  if (this%inmvt > 0) then
390  x_m1 => null()
391  x_m2 => null()
392  if (associated(this%gwtmodel1)) x_m1 => this%gwtmodel1%x
393  if (associated(this%gwtmodel2)) x_m2 => this%gwtmodel2%x
394  call this%mvt%mvt_fc(x_m1, x_m2)
395  end if

◆ gwt_gwt_fp()

subroutine gwtgwtexchangemodule::gwt_gwt_fp ( class(gwtexchangetype this)

Conduct any final processing

Parameters
thisGwtExchangeType

Definition at line 1039 of file exg-gwtgwt.f90.

1040  ! -- dummy
1041  class(GwtExchangeType) :: this !< GwtExchangeType

◆ gwt_gwt_ot()

subroutine gwtgwtexchangemodule::gwt_gwt_ot ( class(gwtexchangetype this)

Write output

Parameters
thisGwtExchangeType

Definition at line 646 of file exg-gwtgwt.f90.

647  ! -- modules
648  use simvariablesmodule, only: iout
649  use constantsmodule, only: dzero
650  ! -- dummy
651  class(GwtExchangeType) :: this !< GwtExchangeType
652  ! -- local
653  integer(I4B) :: iexg, n1, n2
654  integer(I4B) :: ibudfl
655  real(DP) :: flow
656  character(len=LINELENGTH) :: node1str, node2str
657  ! -- format
658  character(len=*), parameter :: fmtheader = &
659  "(/1x, 'SUMMARY OF EXCHANGE RATES FOR EXCHANGE ', a, ' WITH ID ', i0, /, &
660  &2a16, 5a16, /, 112('-'))"
661  character(len=*), parameter :: fmtheader2 = &
662  "(/1x, 'SUMMARY OF EXCHANGE RATES FOR EXCHANGE ', a, ' WITH ID ', i0, /, &
663  &2a16, 4a16, /, 96('-'))"
664  character(len=*), parameter :: fmtdata = &
665  "(2a16, 5(1pg16.6))"
666  !
667  ! -- Call bdsave
668  call this%gwt_gwt_bdsav()
669  !
670  ! -- Write a table of exchanges
671  if (this%iprflow /= 0) then
672  write (iout, fmtheader2) trim(adjustl(this%name)), this%id, 'NODEM1', &
673  'NODEM2', 'COND', 'X_M1', 'X_M2', 'FLOW'
674  do iexg = 1, this%nexg
675  n1 = this%nodem1(iexg)
676  n2 = this%nodem2(iexg)
677  flow = this%simvals(iexg)
678  call this%v_model1%dis_noder_to_string(n1, node1str)
679  call this%v_model2%dis_noder_to_string(n2, node2str)
680  write (iout, fmtdata) trim(adjustl(node1str)), &
681  trim(adjustl(node2str)), &
682  this%cond(iexg), this%v_model1%x%get(n1), &
683  this%v_model2%x%get(n2), flow
684  end do
685  end if
686  !
687  !cdl Implement when MVT is ready
688  ! -- Mover budget output
689  ibudfl = 1
690  if (this%inmvt > 0) call this%mvt%mvt_ot_bdsummary(ibudfl)
691  !
692  ! -- OBS output
693  call this%obs%obs_ot()

◆ gwt_gwt_process_obsid()

subroutine gwtgwtexchangemodule::gwt_gwt_process_obsid ( type(observetype), intent(inout)  obsrv,
class(disbasetype), intent(in)  dis,
integer(i4b), intent(in)  inunitobs,
integer(i4b), intent(in)  iout 
)

Process observations for this exchange

Definition at line 1134 of file exg-gwtgwt.f90.

1135  ! -- modules
1136  use constantsmodule, only: linelength
1137  use inputoutputmodule, only: urword
1138  use observemodule, only: observetype
1139  use basedismodule, only: disbasetype
1140  ! -- dummy
1141  type(ObserveType), intent(inout) :: obsrv
1142  class(DisBaseType), intent(in) :: dis
1143  integer(I4B), intent(in) :: inunitobs
1144  integer(I4B), intent(in) :: iout
1145  ! -- local
1146  integer(I4B) :: n, iexg, istat
1147  integer(I4B) :: icol, istart, istop
1148  real(DP) :: r
1149  character(len=LINELENGTH) :: string
1150  !
1151  string = obsrv%IDstring
1152  icol = 1
1153  ! -- get exchange index
1154  call urword(string, icol, istart, istop, 1, n, r, iout, inunitobs)
1155  read (string(istart:istop), '(i10)', iostat=istat) iexg
1156  if (istat == 0) then
1157  obsrv%intPak1 = iexg
1158  else
1159  ! Integer can't be read from string; it's presumed to be an exchange
1160  ! boundary name (already converted to uppercase)
1161  obsrv%FeatureName = trim(adjustl(string))
1162  ! -- Observation may require summing rates from multiple exchange
1163  ! boundaries, so assign intPak1 as a value that indicates observation
1164  ! is for a named exchange boundary or group of exchange boundaries.
1165  obsrv%intPak1 = namedboundflag
1166  end if
integer(i4b), parameter linelength
maximum length of a standard line
Definition: Constants.f90:45
subroutine, public urword(line, icol, istart, istop, ncode, n, r, iout, in)
Extract a word from a string.
This module contains the derived types ObserveType and ObsDataType.
Definition: Observe.f90:15
Here is the call graph for this function:
Here is the caller graph for this function:

◆ gwt_gwt_rp()

subroutine gwtgwtexchangemodule::gwt_gwt_rp ( class(gwtexchangetype this)
private

Read new data for mover and obs

Parameters
thisGwtExchangeType

Definition at line 326 of file exg-gwtgwt.f90.

327  ! -- modules
328  use tdismodule, only: readnewdata
329  ! -- dummy
330  class(GwtExchangeType) :: this !< GwtExchangeType
331  !
332  ! -- Check with TDIS on whether or not it is time to RP
333  if (.not. readnewdata) return
334  !
335  ! -- Read and prepare for mover
336  if (this%inmvt > 0) call this%mvt%mvt_rp()
337  !
338  ! -- Read and prepare for observations
339  call this%gwt_gwt_rp_obs()
logical(lgp), pointer, public readnewdata
flag indicating time to read new data
Definition: tdis.f90:29

◆ gwt_gwt_rp_obs()

subroutine gwtgwtexchangemodule::gwt_gwt_rp_obs ( class(gwtexchangetype this)
private

Handle observation exchanges exchange-boundary names.

Parameters
thisGwtExchangeType

Definition at line 968 of file exg-gwtgwt.f90.

969  ! -- modules
970  use constantsmodule, only: dzero
971  ! -- dummy
972  class(GwtExchangeType) :: this !< GwtExchangeType
973  ! -- local
974  integer(I4B) :: i
975  integer(I4B) :: j
976  class(ObserveType), pointer :: obsrv => null()
977  character(len=LENBOUNDNAME) :: bname
978  logical :: jfound
979  ! -- formats
980 10 format('Exchange "', a, '" for observation "', a, &
981  '" is invalid in package "', a, '"')
982 20 format('Exchange id "', i0, '" for observation "', a, &
983  '" is invalid in package "', a, '"')
984  !
985  do i = 1, this%obs%npakobs
986  obsrv => this%obs%pakobs(i)%obsrv
987  !
988  ! -- indxbnds needs to be reset each stress period because
989  ! list of boundaries can change each stress period.
990  ! -- Not true for exchanges, but leave this in for now anyway.
991  call obsrv%ResetObsIndex()
992  obsrv%BndFound = .false.
993  !
994  bname = obsrv%FeatureName
995  if (bname /= '') then
996  ! -- Observation location(s) is(are) based on a boundary name.
997  ! Iterate through all boundaries to identify and store
998  ! corresponding index(indices) in bound array.
999  jfound = .false.
1000  do j = 1, this%nexg
1001  if (this%boundname(j) == bname) then
1002  jfound = .true.
1003  obsrv%BndFound = .true.
1004  obsrv%CurrentTimeStepEndValue = dzero
1005  call obsrv%AddObsIndex(j)
1006  end if
1007  end do
1008  if (.not. jfound) then
1009  write (errmsg, 10) trim(bname), trim(obsrv%ObsTypeId), trim(this%name)
1010  call store_error(errmsg)
1011  end if
1012  else
1013  ! -- Observation location is a single exchange number
1014  if (obsrv%intPak1 <= this%nexg .and. obsrv%intPak1 > 0) then
1015  jfound = .true.
1016  obsrv%BndFound = .true.
1017  obsrv%CurrentTimeStepEndValue = dzero
1018  call obsrv%AddObsIndex(obsrv%intPak1)
1019  else
1020  jfound = .false.
1021  end if
1022  if (.not. jfound) then
1023  write (errmsg, 20) obsrv%intPak1, trim(obsrv%ObsTypeId), trim(this%name)
1024  call store_error(errmsg)
1025  end if
1026  end if
1027  end do
1028  !
1029  ! -- write summary of error messages
1030  if (count_errors() > 0) then
1031  call store_error_filename(this%obs%inputFilename)
1032  end if
Here is the call graph for this function:

◆ gwt_gwt_save_simvals()

subroutine gwtgwtexchangemodule::gwt_gwt_save_simvals ( class(gwtexchangetype), intent(inout)  this)
private

Save the simulated flows for each exchange

Definition at line 1090 of file exg-gwtgwt.f90.

1091  ! -- dummy
1092  use simvariablesmodule, only: errmsg
1093  use constantsmodule, only: dzero
1094  use observemodule, only: observetype
1095  class(GwtExchangeType), intent(inout) :: this
1096  ! -- local
1097  integer(I4B) :: i
1098  integer(I4B) :: j
1099  integer(I4B) :: n1
1100  integer(I4B) :: n2
1101  integer(I4B) :: iexg
1102  real(DP) :: v
1103  type(ObserveType), pointer :: obsrv => null()
1104  !
1105  ! -- Write simulated values for all gwt-gwt observations
1106  if (this%obs%npakobs > 0) then
1107  call this%obs%obs_bd_clear()
1108  do i = 1, this%obs%npakobs
1109  obsrv => this%obs%pakobs(i)%obsrv
1110  do j = 1, obsrv%indxbnds_count
1111  iexg = obsrv%indxbnds(j)
1112  v = dzero
1113  select case (obsrv%ObsTypeId)
1114  case ('FLOW-JA-FACE')
1115  n1 = this%nodem1(iexg)
1116  n2 = this%nodem2(iexg)
1117  v = this%simvals(iexg)
1118  case default
1119  errmsg = 'Unrecognized observation type: '// &
1120  trim(obsrv%ObsTypeId)
1121  call store_error(errmsg)
1122  call store_error_filename(this%obs%inputFilename)
1123  end select
1124  call this%obs%SaveOneSimval(obsrv, v)
1125  end do
1126  end do
1127  end if
character(len=maxcharlen) errmsg
error message string
Here is the call graph for this function:

◆ gwtexchange_create()

subroutine, public gwtgwtexchangemodule::gwtexchange_create ( character(len=*), intent(in)  filename,
character(len=*)  name,
integer(i4b), intent(in)  id,
integer(i4b), intent(in)  m1_id,
integer(i4b), intent(in)  m2_id,
character(len=*), intent(in)  input_mempath 
)

Create a new GWT to GWT exchange object.

Parameters
[in]filenamefilename for reading
[in]idid for the exchange
namethe exchange name
[in]m1_idid for model 1
[in]m2_idid for model 2

Definition at line 111 of file exg-gwtgwt.f90.

112  ! -- modules
113  use basemodelmodule, only: basemodeltype
114  use listsmodule, only: baseexchangelist
115  use obsmodule, only: obs_cr
117  ! -- dummy
118  character(len=*), intent(in) :: filename !< filename for reading
119  integer(I4B), intent(in) :: id !< id for the exchange
120  character(len=*) :: name !< the exchange name
121  integer(I4B), intent(in) :: m1_id !< id for model 1
122  integer(I4B), intent(in) :: m2_id !< id for model 2
123  character(len=*), intent(in) :: input_mempath
124  ! -- local
125  type(GwtExchangeType), pointer :: exchange
126  class(BaseModelType), pointer :: mb
127  class(BaseExchangeType), pointer :: baseexchange
128  integer(I4B) :: m1_index, m2_index
129  !
130  ! -- Create a new exchange and add it to the baseexchangelist container
131  allocate (exchange)
132  baseexchange => exchange
133  call addbaseexchangetolist(baseexchangelist, baseexchange)
134  !
135  ! -- Assign id and name
136  exchange%id = id
137  exchange%name = name
138  exchange%memoryPath = create_mem_path(exchange%name)
139  exchange%input_mempath = input_mempath
140  !
141  ! -- allocate scalars and set defaults
142  call exchange%allocate_scalars()
143  exchange%filename = filename
144  exchange%typename = 'GWT-GWT'
145  exchange%iAdvScheme = 0
146  exchange%ixt3d = 1
147  !
148  ! -- set gwtmodel1
149  m1_index = model_loc_idx(m1_id)
150  mb => getbasemodelfromlist(basemodellist, m1_index)
151  if (m1_index > 0) then
152  select type (mb)
153  type is (gwtmodeltype)
154  exchange%model1 => mb
155  exchange%gwtmodel1 => mb
156  end select
157  end if
158  exchange%v_model1 => get_virtual_model(m1_id)
159  !
160  ! -- set gwtmodel2
161  m2_index = model_loc_idx(m2_id)
162  if (m2_index > 0) then
163  mb => getbasemodelfromlist(basemodellist, m2_index)
164  select type (mb)
165  type is (gwtmodeltype)
166  exchange%model2 => mb
167  exchange%gwtmodel2 => mb
168  end select
169  end if
170  exchange%v_model2 => get_virtual_model(m2_id)
171  !
172  ! -- Verify that gwt model1 is of the correct type
173  if (.not. associated(exchange%gwtmodel1) .and. m1_index > 0) then
174  write (errmsg, '(3a)') 'Problem with GWT-GWT exchange ', &
175  trim(exchange%name), &
176  '. First specified GWT Model does not appear to be of the correct type.'
177  call store_error(errmsg, terminate=.true.)
178  end if
179  !
180  ! -- Verify that gwt model2 is of the correct type
181  if (.not. associated(exchange%gwtmodel2) .and. m2_index > 0) then
182  write (errmsg, '(3a)') 'Problem with GWT-GWT exchange ', &
183  trim(exchange%name), &
184  '. Second specified GWT Model does not appear to be of the correct type.'
185  call store_error(errmsg, terminate=.true.)
186  end if
187  !
188  ! -- Create the obs package
189  call obs_cr(exchange%obs, exchange%inobs)
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 type ObsType.
Definition: Obs.f90:127
subroutine, public obs_cr(obs, inobs)
@ brief Create a new ObsType object
Definition: Obs.f90:225
Highest level model type. All models extend this parent type.
Definition: BaseModel.f90:16
Here is the call graph for this function:
Here is the caller graph for this function:

◆ read_mvt()

subroutine gwtgwtexchangemodule::read_mvt ( class(gwtexchangetype this,
integer(i4b), intent(in)  iout 
)

Read and process movers

Parameters
thisGwtExchangeType

Definition at line 793 of file exg-gwtgwt.f90.

794  ! -- modules
795  use tspmvtmodule, only: mvt_cr
796  ! -- dummy
797  class(GwtExchangeType) :: this !< GwtExchangeType
798  integer(I4B), intent(in) :: iout
799  ! -- local
800  class(TransportModelType), pointer :: tspmodel1, tspmodel2
801  !
802  ! -- Create and initialize the mover object
803  tspmodel1 => this%gwtmodel1
804  tspmodel2 => this%gwtmodel2
805  call xmvt_cr(this%mvt, this%name, tspmodel1, tspmodel2, &
806  this%gwfmodelname1, this%gwfmodelname2, this%inmvt, iout)
807 
subroutine, public mvt_cr(mvt, name_model, inunit, iout, fmi1, eqnsclfac, depvartype, gwfmodelname1, gwfmodelname2, fmi2)
Definition: tsp-mvt.f90:85
Here is the call graph for this function:

◆ source_options()

subroutine gwtgwtexchangemodule::source_options ( class(gwtexchangetype this,
integer(i4b), intent(in)  iout 
)

Source the options block

Parameters
thisGwtExchangeType

Definition at line 700 of file exg-gwtgwt.f90.

701  ! -- modules
702  use constantsmodule, only: lenvarname
708  ! -- dummy
709  class(GwtExchangeType) :: this !< GwtExchangeType
710  integer(I4B), intent(in) :: iout
711  ! -- local
712  type(ExgGwtgwtParamFoundType) :: found
713  character(len=LENVARNAME), dimension(4) :: adv_scheme = &
714  &[character(len=LENVARNAME) :: 'UPSTREAM', 'CENTRAL', 'TVD', 'UTVD']
715  character(len=linelength) :: mvt_fname
716  !
717  ! -- update defaults with values sourced from input context
718  call mem_set_value(this%gwfmodelname1, 'GWFMODELNAME1', this%input_mempath, &
719  found%gwfmodelname1)
720  call mem_set_value(this%gwfmodelname2, 'GWFMODELNAME2', this%input_mempath, &
721  found%gwfmodelname2)
722  call mem_set_value(this%iAdvScheme, 'ADV_SCHEME', this%input_mempath, &
723  adv_scheme, found%adv_scheme)
724  call mem_set_value(this%ixt3d, 'DSP_XT3D_OFF', this%input_mempath, &
725  found%dsp_xt3d_off)
726  call mem_set_value(this%ixt3d, 'DSP_XT3D_RHS', this%input_mempath, &
727  found%dsp_xt3d_rhs)
728  !
729  write (iout, '(1x,a)') 'PROCESSING GWT-GWT EXCHANGE OPTIONS'
730  !
731  ! -- source base class options
732  call this%DisConnExchangeType%source_options(iout)
733  !
734  if (found%gwfmodelname1) then
735  write (iout, '(4x,a,a)') &
736  'GWFMODELNAME1 IS SET TO: ', trim(this%gwfmodelname1)
737  end if
738  !
739  if (found%gwfmodelname2) then
740  write (iout, '(4x,a,a)') &
741  'GWFMODELNAME2 IS SET TO: ', trim(this%gwfmodelname2)
742  end if
743  !
744  if (found%adv_scheme) then
745  if (this%iAdvScheme == 0) then
746  call store_error('Unrecognized input value for ADV_SCHEME option.')
747  call store_error_filename(this%filename)
748  else
749  ! -- count from 0
750  this%iAdvScheme = this%iAdvScheme - 1
751  write (iout, '(4x,a,a)') &
752  'ADVECTION SCHEME METHOD HAS BEEN SET TO: ', &
753  trim(adv_scheme(this%iAdvScheme + 1))
754  end if
755  end if
756  !
757  if (found%dsp_xt3d_off .and. found%dsp_xt3d_rhs) then
758  errmsg = 'DSP_XT3D_OFF and DSP_XT3D_RHS cannot both be set as options.'
759  call store_error(errmsg)
760  call store_error_filename(this%filename)
761  else if (found%dsp_xt3d_off) then
762  this%ixt3d = 0
763  write (iout, '(4x,a)') 'XT3D FORMULATION HAS BEEN SHUT OFF.'
764  else if (found%dsp_xt3d_rhs) then
765  this%ixt3d = 2
766  write (iout, '(4x,a)') 'XT3D RIGHT-HAND SIDE FORMULATION IS SELECTED.'
767  end if
768  !
769  ! -- enforce 0 or 1 MVR6_FILENAME entries in option block
770  if (filein_fname(mvt_fname, 'MVT6_FILENAME', this%input_mempath, &
771  this%filename)) then
772  this%inmvt = getunit()
773  call openfile(this%inmvt, iout, mvt_fname, 'MVT')
774  write (iout, '(4x,a)') &
775  'WATER MOVER TRANSPORT INFORMATION WILL BE READ FROM ', trim(mvt_fname)
776  end if
777  !
778  ! -- enforce 0 or 1 OBS6_FILENAME entries in option block
779  if (filein_fname(this%obs%inputFilename, 'OBS6_FILENAME', &
780  this%input_mempath, this%filename)) then
781  this%obs%active = .true.
782  this%obs%inUnitObs = getunit()
783  call openfile(this%obs%inUnitObs, iout, this%obs%inputFilename, 'OBS')
784  end if
785  !
786  write (iout, '(1x,a)') 'END OF GWT-GWT EXCHANGE OPTIONS'
integer(i4b), parameter lenvarname
maximum length of a variable name
Definition: Constants.f90:17
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
This class is used to store a single deferred-length character string. It was designed to work in an ...
Definition: CharString.f90:23
Here is the call graph for this function:

◆ use_interface_model()

logical(lgp) function gwtgwtexchangemodule::use_interface_model ( class(gwtexchangetype this)
private

For now this always returns true, since we do not support a classic-style two-point flux approximation for GWT-GWT. If we ever add logic to support a simpler non-interface model flux calculation, then logic should be added here to set the return accordingly.

Parameters
thisGwtExchangeType
Returns
true when interface model should be used

Definition at line 1075 of file exg-gwtgwt.f90.

1076  ! -- dummy
1077  class(GwtExchangeType) :: this !< GwtExchangeType
1078  ! -- return
1079  logical(LGP) :: use_im !< true when interface model should be used
1080  !
1081  ! For now set use_im to .true. since the interface model approach
1082  ! must currently be used for any GWT-GWT exchange.
1083  use_im = .true.

◆ validate_exchange()

subroutine gwtgwtexchangemodule::validate_exchange ( class(gwtexchangetype this)
Parameters
thisGwtExchangeType

Definition at line 252 of file exg-gwtgwt.f90.

253  ! -- dummy
254  class(GwtExchangeType) :: this !< GwtExchangeType
255  !
256  ! Ensure gwfmodel names were entered
257  if (this%gwfmodelname1 == '') then
258  write (errmsg, '(3a)') 'GWT-GWT exchange ', trim(this%name), &
259  ' requires that GWFMODELNAME1 be entered in the &
260  &OPTIONS block.'
261  call store_error(errmsg)
262  end if
263  if (this%gwfmodelname2 == '') then
264  write (errmsg, '(3a)') 'GWT-GWT exchange ', trim(this%name), &
265  ' requires that GWFMODELNAME2 be entered in the &
266  &OPTIONS block.'
267  call store_error(errmsg)
268  end if
269  !
270  ! Periodic boundary condition in exchange don't allow XT3D (=interface model)
271  if (this%v_model1 == this%v_model2) then
272  if (this%ixt3d > 0) then
273  write (errmsg, '(3a)') 'GWT-GWT exchange ', trim(this%name), &
274  ' is a periodic boundary condition which cannot'// &
275  ' be configured with XT3D'
276  call store_error(errmsg)
277  end if
278  end if
279  !
280  ! Check to see if dispersion is on in either model1 or model2.
281  ! If so, then ANGLDEGX must be provided as an auxiliary variable for this
282  ! GWT-GWT exchange (this%ianglex > 0).
283  if (associated(this%gwtmodel1) .and. associated(this%gwtmodel2)) then
284  if (this%gwtmodel1%indsp /= 0 .or. this%gwtmodel2%indsp /= 0) then
285  if (this%ianglex == 0) then
286  write (errmsg, '(3a)') 'GWT-GWT exchange ', trim(this%name), &
287  ' requires that ANGLDEGX be specified as an'// &
288  ' auxiliary variable because dispersion was '// &
289  'specified in one or both transport models.'
290  call store_error(errmsg)
291  end if
292  end if
293  end if
294  !
295  if (this%ixt3d > 0 .and. this%ianglex == 0) then
296  write (errmsg, '(3a)') 'GWT-GWT exchange ', trim(this%name), &
297  ' requires that ANGLDEGX be specified as an'// &
298  ' auxiliary variable because XT3D is enabled'
299  call store_error(errmsg)
300  end if
301  !
302  if (count_errors() > 0) then
303  call ustop()
304  end if
Here is the call graph for this function: