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

This module contains the GweGweExchangeModule Module. More...

Data Types

type  gweexchangetype
 Derived type for GwtExchangeType. More...
 

Functions/Subroutines

subroutine, public gweexchange_create (filename, name, id, m1_id, m2_id, input_mempath)
 @ brief Create GWT GWT exchange More...
 
subroutine gwe_gwe_df (this)
 @ brief Define GWE GWE exchange More...
 
subroutine validate_exchange (this)
 validate exchange data after reading More...
 
subroutine gwe_gwe_ar (this)
 @ brief Allocate and read More...
 
subroutine gwe_gwe_rp (this)
 @ brief Read and prepare More...
 
subroutine gwe_gwe_ad (this)
 @ brief Advance More...
 
subroutine gwe_gwe_cf (this, kiter)
 
subroutine gwe_gwe_fc (this, kiter, matrix_sln, rhs_sln, inwtflag)
 @ brief Fill coefficients More...
 
subroutine gwe_gwe_bd (this, icnvg, isuppress_output, isolnid)
 @ brief Budget More...
 
subroutine gwe_gwe_bdsav (this)
 @ brief Budget save More...
 
subroutine gwe_gwe_bdsav_model (this, model)
 @ brief Budget save More...
 
subroutine gwe_gwe_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 gwe_gwe_da (this)
 @ brief Deallocate More...
 
subroutine allocate_arrays (this)
 @ brief Allocate arrays More...
 
subroutine gwe_gwe_df_obs (this)
 @ brief Define observations More...
 
subroutine gwe_gwe_rp_obs (this)
 @ brief Read and prepare observations More...
 
subroutine gwe_gwe_fp (this)
 @ brief Final processing More...
 
logical(lgp) function gwe_gwe_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 gwe_gwe_save_simvals (this)
 @ brief Save simulated flow observations More...
 
subroutine gwe_gwe_process_obsid (obsrv, dis, inunitobs, iout)
 @ brief Obs ID processor More...
 
class(gweexchangetype) function, pointer, public castasgweexchange (obj)
 @ brief Cast polymorphic object as exchange More...
 
class(gweexchangetype) function, pointer, public getgweexchangefromlist (list, idx)
 @ brief Get exchange from list More...
 

Detailed Description

This module contains the code for connecting two GWE 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 GweGweConnection with the more sophisticated interface model coupling approach when XT3D is needed.

Function/Subroutine Documentation

◆ allocate_arrays()

subroutine gwegweexchangemodule::allocate_arrays ( class(gweexchangetype this)

Allocate arrays

Parameters
thisGweExchangeType

Definition at line 888 of file exg-gwegwe.f90.

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

◆ allocate_scalars()

subroutine gwegweexchangemodule::allocate_scalars ( class(gweexchangetype this)
private

Allocate scalar variables

Parameters
thisGwtExchangeType

Definition at line 818 of file exg-gwegwe.f90.

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

◆ castasgweexchange()

class(gweexchangetype) function, pointer, public gwegweexchangemodule::castasgweexchange ( class(*), intent(inout), pointer  obj)

Cast polymorphic object as exchange

Definition at line 1177 of file exg-gwegwe.f90.

1178  implicit none
1179  ! -- dummy
1180  class(*), pointer, intent(inout) :: obj
1181  ! -- return
1182  class(GweExchangeType), pointer :: res
1183  !
1184  res => null()
1185  if (.not. associated(obj)) return
1186  !
1187  select type (obj)
1188  class is (gweexchangetype)
1189  res => obj
1190  end select
Here is the caller graph for this function:

◆ getgweexchangefromlist()

class(gweexchangetype) function, pointer, public gwegweexchangemodule::getgweexchangefromlist ( type(listtype), intent(inout)  list,
integer(i4b), intent(in)  idx 
)

Return an exchange from the list for specified index

Definition at line 1197 of file exg-gwegwe.f90.

1198  implicit none
1199  ! -- dummy
1200  type(ListType), intent(inout) :: list
1201  integer(I4B), intent(in) :: idx
1202  ! -- return
1203  class(GweExchangeType), pointer :: res
1204  ! -- local
1205  class(*), pointer :: obj
1206  !
1207  obj => list%GetItem(idx)
1208  res => castasgweexchange(obj)
Here is the call graph for this function:

◆ gwe_gwe_ad()

subroutine gwegweexchangemodule::gwe_gwe_ad ( class(gweexchangetype this)

Advance mover and obs

Parameters
thisGweExchangeType

Definition at line 350 of file exg-gwegwe.f90.

351  ! -- dummy
352  class(GweExchangeType) :: this !< GweExchangeType
353  !
354  ! -- Advance mover
355  !if(this%inmvt > 0) call this%mvt%mvt_ad()
356  !
357  ! -- Push simulated values to preceding time step
358  call this%obs%obs_ad()

◆ gwe_gwe_ar()

subroutine gwegweexchangemodule::gwe_gwe_ar ( class(gweexchangetype this)
private

Allocated and read and calculate saturated conductance

Parameters
thisGwtExchangeType

Definition at line 315 of file exg-gwegwe.f90.

316  ! -- dummy
317  class(GweExchangeType) :: this !< GwtExchangeType
318  !
319  ! -- If mover is active, then call ar routine
320  if (this%inmvt > 0) call this%mvt%mvt_ar()
321  !
322  ! -- Observation AR
323  call this%obs%obs_ar()

◆ gwe_gwe_bd()

subroutine gwegweexchangemodule::gwe_gwe_bd ( class(gweexchangetype this,
integer(i4b), intent(inout)  icnvg,
integer(i4b), intent(in)  isuppress_output,
integer(i4b), intent(in)  isolnid 
)
private

Accumulate budget terms

Parameters
thisGweExchangeType

Definition at line 406 of file exg-gwegwe.f90.

407  ! -- modules
409  use budgetmodule, only: rate_accumulator
410  ! -- dummy
411  class(GweExchangeType) :: this !< GweExchangeType
412  integer(I4B), intent(inout) :: icnvg
413  integer(I4B), intent(in) :: isuppress_output
414  integer(I4B), intent(in) :: isolnid
415  ! -- local
416  character(len=LENBUDTXT), dimension(1) :: budtxt
417  real(DP), dimension(2, 1) :: budterm
418  real(DP) :: ratin, ratout
419  !
420  ! -- initialize
421  budtxt(1) = ' FLOW-JA-FACE'
422  !
423  ! -- Calculate ratin/ratout and pass to model budgets
424  call rate_accumulator(this%simvals, ratin, ratout)
425  !
426  ! -- Add the budget terms to model 1
427  if (associated(this%gwemodel1)) then
428  budterm(1, 1) = ratin
429  budterm(2, 1) = ratout
430  call this%gwemodel1%model_bdentry(budterm, budtxt, this%name)
431  end if
432  !
433  ! -- Add the budget terms to model 2
434  if (associated(this%gwemodel2)) then
435  budterm(1, 1) = ratout
436  budterm(2, 1) = ratin
437  call this%gwemodel2%model_bdentry(budterm, budtxt, this%name)
438  end if
439  !
440  ! -- Call mvt bd routine
441  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:

◆ gwe_gwe_bdsav()

subroutine gwegweexchangemodule::gwe_gwe_bdsav ( class(gweexchangetype this)

Output individual flows to listing file and binary budget files

Parameters
thisGweExchangeType

Definition at line 448 of file exg-gwegwe.f90.

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

◆ gwe_gwe_bdsav_model()

subroutine gwegweexchangemodule::gwe_gwe_bdsav_model ( class(gweexchangetype this,
class(gwemodeltype), pointer  model 
)
private

Output individual flows to listing file and binary budget files

Parameters
thisGwtExchangeType

Definition at line 482 of file exg-gwegwe.f90.

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

◆ gwe_gwe_cf()

subroutine gwegweexchangemodule::gwe_gwe_cf ( class(gweexchangetype this,
integer(i4b), intent(in)  kiter 
)
private
Parameters
thisGwfExchangeType

Definition at line 361 of file exg-gwegwe.f90.

362  class(GweExchangeType) :: this !< GwfExchangeType
363  integer(I4B), intent(in) :: kiter
364  ! local
365  real(DP), dimension(:), pointer, contiguous :: x_m1, x_m2
366 
367  ! call mvt cf routine
368  if (this%inmvt > 0) then
369  x_m1 => null()
370  x_m2 => null()
371  if (associated(this%gwemodel1)) x_m1 => this%gwemodel1%x
372  if (associated(this%gwemodel2)) x_m2 => this%gwemodel2%x
373  call this%mvt%xmvt_cf(x_m1, x_m2)
374  end if
375 

◆ gwe_gwe_connects_model()

logical(lgp) function gwegweexchangemodule::gwe_gwe_connects_model ( class(gweexchangetype this,
class(basemodeltype), intent(in), pointer  model 
)
private
Parameters
model
thisGweExchangeType
[in]modelthe model to which the exchange might hold a connection
Returns
true, when connected

Definition at line 1051 of file exg-gwegwe.f90.

1052  ! -- dummy
1053  class(GweExchangeType) :: this !< GweExchangeType
1054  class(BaseModelType), pointer, intent(in) :: model !< the model to which the exchange might hold a connection
1055  ! -- return
1056  logical(LGP) :: is_connected !< true, when connected
1057  !
1058  is_connected = .false.
1059  !
1060  ! only connected when model is GwtModelType of course
1061  select type (model)
1062  class is (gwemodeltype)
1063  if (associated(this%gwemodel1, model)) then
1064  is_connected = .true.
1065  else if (associated(this%gwemodel2, model)) then
1066  is_connected = .true.
1067  end if
1068  end select

◆ gwe_gwe_da()

subroutine gwegweexchangemodule::gwe_gwe_da ( class(gweexchangetype this)

Deallocate memory associated with this object

Parameters
thisGwtExchangeType

Definition at line 842 of file exg-gwegwe.f90.

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

◆ gwe_gwe_df()

subroutine gwegweexchangemodule::gwe_gwe_df ( class(gweexchangetype this)

Define GWE to GWE exchange object.

Parameters
thisGwtExchangeType

Definition at line 198 of file exg-gwegwe.f90.

199  ! -- modules
200  use simvariablesmodule, only: iout
202  use ghostnodemodule, only: gnc_cr
203  ! -- dummy
204  class(GweExchangeType) :: this !< GwtExchangeType
205  !
206  ! -- log the exchange
207  write (iout, '(/a,a)') ' Creating exchange: ', this%name
208  !
209  ! -- Ensure models are in same solution
210  if (associated(this%gwemodel1) .and. associated(this%gwemodel2)) then
211  if (this%gwemodel1%idsoln /= this%gwemodel2%idsoln) then
212  call store_error('Two models are connect in a GWE '// &
213  'exchange but they are in different solutions. '// &
214  'GWE models must be in same solution: '// &
215  trim(this%gwemodel1%name)//' '// &
216  trim(this%gwemodel2%name))
217  call store_error_filename(this%filename)
218  end if
219  end if
220  !
221  ! -- source options
222  call this%source_options(iout)
223  !
224  ! -- source dimensions
225  call this%source_dimensions(iout)
226  !
227  ! -- allocate arrays
228  call this%allocate_arrays()
229  !
230  ! -- source exchange data
231  call this%source_data(iout)
232  !
233  ! -- Read mover information
234  if (this%inmvt > 0) then
235  call this%read_mvt(iout)
236  if (this%v_model1%is_local) then
237  call this%mvt%mvt_df(this%gwemodel1%dis)
238  else
239  call this%mvt%mvt_df(this%gwemodel2%dis)
240  end if
241  end if
242  !
243  ! -- Store obs
244  call this%gwe_gwe_df_obs()
245  if (associated(this%gwemodel1)) then
246  call this%obs%obs_df(iout, this%name, 'GWE-GWE', this%gwemodel1%dis)
247  end if
248  !
249  ! -- validate
250  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:

◆ gwe_gwe_df_obs()

subroutine gwegweexchangemodule::gwe_gwe_df_obs ( class(gweexchangetype this)

Define the observations associated with this object

Parameters
thisGweExchangeType

Definition at line 956 of file exg-gwegwe.f90.

957  ! -- dummy
958  class(GweExchangeType) :: this !< GweExchangeType
959  ! -- local
960  integer(I4B) :: indx
961  !
962  ! -- Store obs type and assign procedure pointer
963  ! for gwt-gwt observation type.
964  call this%obs%StoreObsType('flow-ja-face', .true., indx)
965  this%obs%obsData(indx)%ProcessIdPtr => gwe_gwe_process_obsid
Here is the call graph for this function:

◆ gwe_gwe_fc()

subroutine gwegweexchangemodule::gwe_gwe_fc ( class(gweexchangetype 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 382 of file exg-gwegwe.f90.

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

◆ gwe_gwe_fp()

subroutine gwegweexchangemodule::gwe_gwe_fp ( class(gweexchangetype this)

Conduct any final processing

Parameters
thisGwtExchangeType

Definition at line 1043 of file exg-gwegwe.f90.

1044  ! -- dummy
1045  class(GweExchangeType) :: this !< GwtExchangeType

◆ gwe_gwe_ot()

subroutine gwegweexchangemodule::gwe_gwe_ot ( class(gweexchangetype this)

Write output

Parameters
thisGweExchangeType

Definition at line 650 of file exg-gwegwe.f90.

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

◆ gwe_gwe_process_obsid()

subroutine gwegweexchangemodule::gwe_gwe_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 1138 of file exg-gwegwe.f90.

1139  ! -- modules
1140  use constantsmodule, only: linelength
1141  use inputoutputmodule, only: urword
1142  use observemodule, only: observetype
1143  use basedismodule, only: disbasetype
1144  ! -- dummy
1145  type(ObserveType), intent(inout) :: obsrv
1146  class(DisBaseType), intent(in) :: dis
1147  integer(I4B), intent(in) :: inunitobs
1148  integer(I4B), intent(in) :: iout
1149  ! -- local
1150  integer(I4B) :: n, iexg, istat
1151  integer(I4B) :: icol, istart, istop
1152  real(DP) :: r
1153  character(len=LINELENGTH) :: string
1154  !
1155  string = obsrv%IDstring
1156  icol = 1
1157  ! -- get exchange index
1158  call urword(string, icol, istart, istop, 1, n, r, iout, inunitobs)
1159  read (string(istart:istop), '(i10)', iostat=istat) iexg
1160  if (istat == 0) then
1161  obsrv%intPak1 = iexg
1162  else
1163  ! Integer can't be read from string; it's presumed to be an exchange
1164  ! boundary name (already converted to uppercase)
1165  obsrv%FeatureName = trim(adjustl(string))
1166  ! -- Observation may require summing rates from multiple exchange
1167  ! boundaries, so assign intPak1 as a value that indicates observation
1168  ! is for a named exchange boundary or group of exchange boundaries.
1169  obsrv%intPak1 = namedboundflag
1170  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:

◆ gwe_gwe_rp()

subroutine gwegweexchangemodule::gwe_gwe_rp ( class(gweexchangetype this)
private

Read new data for mover and obs

Parameters
thisGweExchangeType

Definition at line 330 of file exg-gwegwe.f90.

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

◆ gwe_gwe_rp_obs()

subroutine gwegweexchangemodule::gwe_gwe_rp_obs ( class(gweexchangetype this)
private

Handle observation exchanges exchange-boundary names.

Parameters
thisGwtExchangeType

Definition at line 972 of file exg-gwegwe.f90.

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

◆ gwe_gwe_save_simvals()

subroutine gwegweexchangemodule::gwe_gwe_save_simvals ( class(gweexchangetype), intent(inout)  this)
private

Save the simulated flows for each exchange

Definition at line 1094 of file exg-gwegwe.f90.

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

◆ gweexchange_create()

subroutine, public gwegweexchangemodule::gweexchange_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 113 of file exg-gwegwe.f90.

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

Read and process movers

Parameters
thisGwtExchangeType

Definition at line 797 of file exg-gwegwe.f90.

798  ! -- modules
799  ! -- dummy
800  class(GweExchangeType) :: this !< GwtExchangeType
801  integer(I4B), intent(in) :: iout
802  ! -- local
803  class(TransportModelType), pointer :: tspmodel1, tspmodel2
804  !
805  ! -- Create and initialize the mover object Here, fmi is set to the one
806  ! for gwtmodel1 so that a call to save flows has an associated dis
807  ! object.
808  tspmodel1 => this%gwemodel1
809  tspmodel2 => this%gwemodel2
810  call xmvt_cr(this%mvt, this%name, tspmodel1, tspmodel2, &
811  this%gwfmodelname1, this%gwfmodelname2, this%inmvt, iout)
Here is the call graph for this function:

◆ source_options()

subroutine gwegweexchangemodule::source_options ( class(gweexchangetype this,
integer(i4b), intent(in)  iout 
)

Source the options block

Parameters
thisGweExchangeType

Definition at line 704 of file exg-gwegwe.f90.

705  ! -- modules
706  use constantsmodule, only: lenvarname
712  ! -- dummy
713  class(GweExchangeType) :: this !< GweExchangeType
714  integer(I4B), intent(in) :: iout
715  ! -- local
716  type(ExgGwegweParamFoundType) :: found
717  character(len=LENVARNAME), dimension(4) :: adv_scheme = &
718  &[character(len=LENVARNAME) :: 'UPSTREAM', 'CENTRAL', 'TVD', 'UTVD']
719  character(len=linelength) :: mvt_fname
720  !
721  ! -- update defaults with values sourced from input context
722  call mem_set_value(this%gwfmodelname1, 'GWFMODELNAME1', this%input_mempath, &
723  found%gwfmodelname1)
724  call mem_set_value(this%gwfmodelname2, 'GWFMODELNAME2', this%input_mempath, &
725  found%gwfmodelname2)
726  call mem_set_value(this%iAdvScheme, 'ADV_SCHEME', this%input_mempath, &
727  adv_scheme, found%adv_scheme)
728  call mem_set_value(this%ixt3d, 'CND_XT3D_OFF', this%input_mempath, &
729  found%cnd_xt3d_off)
730  call mem_set_value(this%ixt3d, 'CND_XT3D_RHS', this%input_mempath, &
731  found%cnd_xt3d_rhs)
732  !
733  write (iout, '(1x,a)') 'PROCESSING GWE-GWE EXCHANGE OPTIONS'
734  !
735  ! -- source base class options
736  call this%DisConnExchangeType%source_options(iout)
737  !
738  if (found%gwfmodelname1) then
739  write (iout, '(4x,a,a)') &
740  'GWFMODELNAME1 IS SET TO: ', trim(this%gwfmodelname1)
741  end if
742  !
743  if (found%gwfmodelname2) then
744  write (iout, '(4x,a,a)') &
745  'GWFMODELNAME2 IS SET TO: ', trim(this%gwfmodelname2)
746  end if
747  !
748  if (found%adv_scheme) then
749  if (this%iAdvScheme == 0) then
750  call store_error('Unrecognized input value for ADV_SCHEME option.')
751  call store_error_filename(this%filename)
752  else
753  ! -- count from 0
754  this%iAdvScheme = this%iAdvScheme - 1
755  write (iout, '(4x,a,a)') &
756  'ADVECTION SCHEME METHOD HAS BEEN SET TO: ', &
757  trim(adv_scheme(this%iAdvScheme + 1))
758  end if
759  end if
760  !
761  if (found%cnd_xt3d_off .and. found%cnd_xt3d_rhs) then
762  errmsg = 'CND_XT3D_OFF and CND_XT3D_RHS cannot both be set as options.'
763  call store_error(errmsg)
764  call store_error_filename(this%filename)
765  else if (found%cnd_xt3d_off) then
766  this%ixt3d = 0
767  write (iout, '(4x,a)') 'XT3D FORMULATION HAS BEEN SHUT OFF.'
768  else if (found%cnd_xt3d_rhs) then
769  this%ixt3d = 2
770  write (iout, '(4x,a)') 'XT3D RIGHT-HAND SIDE FORMULATION IS SELECTED.'
771  end if
772  !
773  ! -- enforce 0 or 1 MVR6_FILENAME entries in option block
774  if (filein_fname(mvt_fname, 'MVE6_FILENAME', this%input_mempath, &
775  this%filename)) then
776  this%inmvt = getunit()
777  call openfile(this%inmvt, iout, mvt_fname, 'MVT')
778  write (iout, '(4x,a)') 'WATER MOVER ENERGY TRANSPORT &
779  &INFORMATION WILL BE READ FROM ', trim(mvt_fname)
780  end if
781  !
782  ! -- enforce 0 or 1 OBS6_FILENAME entries in option block
783  if (filein_fname(this%obs%inputFilename, 'OBS6_FILENAME', &
784  this%input_mempath, this%filename)) then
785  this%obs%active = .true.
786  this%obs%inUnitObs = getunit()
787  call openfile(this%obs%inUnitObs, iout, this%obs%inputFilename, 'OBS')
788  end if
789  !
790  write (iout, '(1x,a)') 'END OF GWE-GWE 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 gwegweexchangemodule::use_interface_model ( class(gweexchangetype 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
thisGweExchangeType
Returns
true when interface model should be used

Definition at line 1079 of file exg-gwegwe.f90.

1080  ! -- dummy
1081  class(GweExchangeType) :: this !< GweExchangeType
1082  ! -- return
1083  logical(LGP) :: use_im !< true when interface model should be used
1084  !
1085  ! For now set use_im to .true. since the interface model approach
1086  ! must currently be used for any GWT-GWT exchange.
1087  use_im = .true.

◆ validate_exchange()

subroutine gwegweexchangemodule::validate_exchange ( class(gweexchangetype this)
Parameters
thisGweExchangeType

Definition at line 255 of file exg-gwegwe.f90.

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