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

Data Types

type  gwfmvrtype
 

Functions/Subroutines

subroutine, public mvr_cr (mvrobj, name_parent, inunit, iout, dis, iexgmvr)
 Create a new mvr object. More...
 
subroutine mvr_init (this, name_parent, inunit, iout, dis, iexgmvr)
 
subroutine mvr_ar (this)
 Allocate and read water mover information. More...
 
subroutine mvr_rp (this)
 Read and Prepare. More...
 
subroutine initialize_movers (this, nr_active_movers)
 
subroutine mvr_ad (this)
 
subroutine mvr_fc (this)
 Calculate qfrommvr as a function of qtomvr. More...
 
subroutine mvr_cc (this, innertot, kiter, iend, icnvgmod, cpak, ipak, dpak)
 Extra convergence check for mover. More...
 
subroutine mvr_bd (this)
 Fill the mover budget object. More...
 
subroutine mvr_bdsav (this, icbcfl, ibudfl, isuppress_output)
 Write mover terms. More...
 
subroutine mvr_ot_saveflow (this, icbcfl, ibudfl)
 Write mover terms. More...
 
subroutine mvr_ot_printflow (this, icbcfl, ibudfl)
 Print mover flow table. More...
 
subroutine mvr_ot_bdsummary (this, ibudfl)
 Write mover budget to listing file. More...
 
subroutine mvr_da (this)
 Deallocate. More...
 
subroutine read_options (this)
 Read options specified in the input options block. More...
 
subroutine check_options (this)
 Check MODELNAMES option set correctly. More...
 
subroutine read_dimensions (this)
 Read the dimensions for this package. More...
 
subroutine read_packages (this)
 Read the packages that will be managed by this mover. More...
 
subroutine check_packages (this)
 Check to make sure packages have mover activated. More...
 
subroutine assign_packagemovers (this)
 Assign pointer to each package's packagemover object. More...
 
subroutine allocate_scalars (this)
 Allocate package scalars. More...
 
subroutine allocate_arrays (this)
 Allocate package arrays. More...
 
subroutine mvr_setup_budobj (this)
 Set up the budget object that stores all the mvr flows. More...
 
subroutine fill_budobj (this)
 
subroutine mvr_setup_outputtab (this)
 Set up output table. More...
 
subroutine mvr_print_outputtab (this)
 Set up output table. More...
 
subroutine set_mapped_id (this)
 Set mapped id. More...
 

Function/Subroutine Documentation

◆ allocate_arrays()

subroutine gwfmvrmodule::allocate_arrays ( class(gwfmvrtype this)

Definition at line 1079 of file gwf-mvr.f90.

1080  ! -- modules
1082  use constantsmodule, only: dzero
1084  ! -- dummy
1085  class(GwfMvrType) :: this
1086  ! -- local
1087  integer(I4B) :: i
1088  !
1089  ! -- Allocate
1090  allocate (this%mvr(this%maxmvr))
1091  allocate (this%pckMemPaths(this%maxpackages))
1092  allocate (this%paknames(this%maxpackages))
1093  allocate (this%pakmovers(this%maxpackages))
1094  !
1095  ! -- nullify the pakmovers
1096  do i = 1, this%maxpackages
1097  call nulllify_packagemover_pointer(this%pakmovers(i))
1098  end do
1099  !
1100  ! -- allocate the perioddata object
1101  call this%gwfmvrperioddata%construct(this%maxmvr, this%memoryPath)
1102  !
1103  !
1104  ! -- allocate the object and assign values to object variables
1105  call mem_allocate(this%ientries, this%maxcomb, 'IENTRIES', this%memoryPath)
1106  !
1107  ! -- initialize ientries
1108  do i = 1, this%maxcomb
1109  this%ientries(i) = 0
1110  end do
1111  !
1112  ! -- setup the output table
1113  call this%mvr_setup_outputtab()
1114  !
1115  ! -- Return
1116  return
This module contains simulation constants.
Definition: Constants.f90:9
real(dp), parameter dzero
real constant zero
Definition: Constants.f90:64
subroutine, public nulllify_packagemover_pointer(packagemover)
Here is the call graph for this function:

◆ allocate_scalars()

subroutine gwfmvrmodule::allocate_scalars ( class(gwfmvrtype this)

Definition at line 1038 of file gwf-mvr.f90.

1039  ! -- modules
1040  use constantsmodule, only: done
1042  ! -- dummy
1043  class(GwfMvrType) :: this
1044  !
1045  ! -- allocate scalars in NumericalPackageType
1046  call this%NumericalPackageType%allocate_scalars()
1047  !
1048  ! -- Allocate
1049  call mem_allocate(this%reset_mapped_id, 'RESET_MAPPED_ID', this%memoryPath)
1050  call mem_allocate(this%ibudgetout, 'IBUDGETOUT', this%memoryPath)
1051  call mem_allocate(this%ibudcsv, 'IBUDCSV', this%memoryPath)
1052  call mem_allocate(this%maxmvr, 'MAXMVR', this%memoryPath)
1053  call mem_allocate(this%maxpackages, 'MAXPACKAGES', this%memoryPath)
1054  call mem_allocate(this%maxcomb, 'MAXCOMB', this%memoryPath)
1055  call mem_allocate(this%nmvr, 'NMVR', this%memoryPath)
1056  call mem_allocate(this%iexgmvr, 'IEXGMVR', this%memoryPath)
1057  call mem_allocate(this%imodelnames, 'IMODELNAMES', this%memoryPath)
1058  !
1059  ! -- Initialize
1060  this%reset_mapped_id = .false.
1061  this%ibudgetout = 0
1062  this%ibudcsv = 0
1063  this%maxmvr = -1
1064  this%maxpackages = -1
1065  this%maxcomb = 0
1066  this%nmvr = 0
1067  this%iexgmvr = 0
1068  this%imodelnames = 0
1069  !
1070  ! -- allocate the period data input object
1071  allocate (this%gwfmvrperioddata)
1072  !
1073  ! -- Return
1074  return
real(dp), parameter done
real constant 1
Definition: Constants.f90:75

◆ assign_packagemovers()

subroutine gwfmvrmodule::assign_packagemovers ( class(gwfmvrtype), intent(inout)  this)

Definition at line 1016 of file gwf-mvr.f90.

1017  ! -- modules
1019  ! -- dummy
1020  class(GwfMvrType), intent(inout) :: this
1021  ! -- local
1022  integer(I4B) :: i
1023  !
1024  ! -- Assign the package mover pointer if it hasn't been assigned yet
1025  do i = 1, size(this%pckMemPaths)
1026  if (this%pakmovers(i)%memoryPath == '') then
1027  call set_packagemover_pointer(this%pakmovers(i), &
1028  trim(this%pckMemPaths(i)))
1029  end if
1030  end do
1031  !
1032  ! -- Return
1033  return
subroutine, public set_packagemover_pointer(packagemover, memPath)
Here is the call graph for this function:

◆ check_options()

subroutine gwfmvrmodule::check_options ( class(gwfmvrtype this)

Definition at line 811 of file gwf-mvr.f90.

812  ! -- modules
813  use constantsmodule, only: linelength
815  ! -- dummy
816  class(GwfMvrType) :: this
817  ! -- local
818  character(len=LINELENGTH) :: errmsg
819  !
820  ! -- Check if not exchange mover but model names are specified
821  if (this%iexgmvr == 0 .and. this%imodelnames == 1) then
822  write (errmsg, '(a,a)') &
823  'MODELNAMES cannot be specified unless the '// &
824  'mover package is for an exchange.'
825  call store_error(errmsg)
826  call this%parser%StoreErrorUnit()
827  end if
828  !
829  ! -- Check if exchange mover but model names not specified
830  if (this%iexgmvr /= 0 .and. this%imodelnames == 0) then
831  write (errmsg, '(a,a)') &
832  'MODELNAMES option must be specified because '// &
833  'mover package is for an exchange.'
834  call store_error(errmsg)
835  call this%parser%StoreErrorUnit()
836  end if
837  !
838  ! -- Return
839  return
integer(i4b), parameter linelength
maximum length of a standard line
Definition: Constants.f90:44
This module contains simulation methods.
Definition: Sim.f90:10
subroutine, public store_error(msg, terminate)
Store an error message.
Definition: Sim.f90:92
subroutine, public store_error_unit(iunit, terminate)
Store the file unit number.
Definition: Sim.f90:168
Here is the call graph for this function:

◆ check_packages()

subroutine gwfmvrmodule::check_packages ( class(gwfmvrtype), intent(inout)  this)

Definition at line 980 of file gwf-mvr.f90.

981  ! -- modules
982  use constantsmodule, only: linelength
985  ! -- dummy
986  class(GwfMvrType), intent(inout) :: this
987  ! -- local
988  character(len=LINELENGTH) :: errmsg
989  integer(I4B) :: i
990  integer(I4B), pointer :: imover_ptr
991  !
992  ! -- Check to make sure mover is activated for each package
993  do i = 1, size(this%pckMemPaths)
994  imover_ptr => null()
995  call mem_setptr(imover_ptr, 'IMOVER', trim(this%pckMemPaths(i)))
996  if (imover_ptr == 0) then
997  write (errmsg, '(a, a, a)') &
998  'ERROR. MODEL AND PACKAGE "', &
999  trim(this%pckMemPaths(i)), &
1000  '" DOES NOT HAVE MOVER SPECIFIED IN OPTIONS BLOCK.'
1001  call store_error(errmsg)
1002  end if
1003  end do
1004  !
1005  ! -- Terminate if errors detected.
1006  if (count_errors() > 0) then
1007  call this%parser%StoreErrorUnit()
1008  end if
1009  !
1010  ! -- Return
1011  return
integer(i4b) function, public count_errors()
Return number of errors.
Definition: Sim.f90:59
Here is the call graph for this function:

◆ fill_budobj()

subroutine gwfmvrmodule::fill_budobj ( class(gwfmvrtype this)

Definition at line 1183 of file gwf-mvr.f90.

1184 ! ******************************************************************************
1185 ! mvr_fill_budobj -- copy flow terms into this%budobj
1186 ! ******************************************************************************
1187 !
1188 ! SPECIFICATIONS:
1189 ! ------------------------------------------------------------------------------
1190  ! -- modules
1191  ! -- dummy
1192  class(GwfMvrType) :: this
1193  ! -- local
1194  integer(I4B) :: idx
1195  integer(I4B) :: i
1196  integer(I4B) :: j
1197  integer(I4B) :: n, n1, n2
1198  integer(I4B) :: ipos
1199  integer(I4B) :: ival
1200  integer(I4B) :: nitems
1201  integer(I4B) :: lloc
1202  integer(I4B) :: istart
1203  integer(I4B) :: istop
1204  real(DP) :: rval
1205  character(len=LENMODELNAME) :: modelname1, modelname2
1206  character(len=LENPACKAGENAME) :: packagename1, packagename2
1207  character(len=LENMEMPATH) :: pckMemPathsDummy
1208  real(DP) :: q
1209  !
1210  ! -- initialize counter
1211  idx = 0
1212 
1213  do i = 1, this%maxpackages
1214  ! -- Retrieve modelname1 and packagename1
1215  lloc = 1
1216  call urword(this%pckMemPaths(i), lloc, istart, istop, 1, ival, rval, -1, -1)
1217  pckmempathsdummy = this%pckMemPaths(i)
1218  modelname1 = pckmempathsdummy(istart:istop)
1219  call urword(this%pckMemPaths(i), lloc, istart, istop, 1, ival, rval, -1, -1)
1220  pckmempathsdummy = this%pckMemPaths(i)
1221  packagename1 = pckmempathsdummy(istart:istop)
1222  do j = 1, this%maxpackages
1223  ! -- Retrieve modelname2 and packagename2
1224  lloc = 1
1225  call urword(this%pckMemPaths(j), lloc, istart, istop, 1, ival, rval, &
1226  -1, -1)
1227  pckmempathsdummy = this%pckMemPaths(j)
1228  modelname2 = pckmempathsdummy(istart:istop)
1229  call urword(this%pckMemPaths(j), lloc, istart, istop, 1, ival, rval, &
1230  -1, -1)
1231  pckmempathsdummy = this%pckMemPaths(j)
1232  packagename2 = pckmempathsdummy(istart:istop)
1233  ipos = (i - 1) * this%maxpackages + j
1234  nitems = this%ientries(ipos)
1235  !
1236  ! -- nitems is the number of mover connections for this
1237  ! model-package / model-package combination. Cycle if none.
1238  idx = idx + 1
1239  call this%budobj%budterm(idx)%reset(nitems)
1240  if (nitems < 1) cycle
1241  do n = 1, this%nmvr
1242  !
1243  ! -- pname1 is provider, pname2 is receiver
1244  ! flow is always negative because it is coming from provider
1245  if (this%pckMemPaths(i) == this%mvr(n)%mem_path_src) then
1246  if (this%pckMemPaths(j) == this%mvr(n)%mem_path_tgt) then
1247  !
1248  ! -- set q to qpactual
1249  q = -this%mvr(n)%qpactual
1250  !
1251  ! -- use mapped index (needed for lake to map outlet to lake number)
1252  n1 = this%mvr(n)%iRchNrSrcMapped
1253  !
1254  ! -- set receiver id to irch2
1255  n2 = this%mvr(n)%iRchNrTgt
1256  !
1257  ! -- check record into budget object
1258  call this%budobj%budterm(idx)%update_term(n1, n2, q)
1259  end if
1260  end if
1261  end do
1262  end do
1263  end do
1264  !
1265  ! --Terms are filled, now accumulate them for this time step
1266  call this%budobj%accumulate_terms()
1267  !
1268  ! -- Return
1269  return
Here is the call graph for this function:

◆ initialize_movers()

subroutine gwfmvrmodule::initialize_movers ( class(gwfmvrtype this,
integer(i4b)  nr_active_movers 
)

Definition at line 415 of file gwf-mvr.f90.

416  class(GwfMvrType) :: this
417  integer(I4B) :: nr_active_movers
418  ! local
419  integer(I4B) :: i
420 
421  do i = 1, nr_active_movers
422  call this%mvr(i)%set_values(this%gwfmvrperioddata%mname1(i), &
423  this%gwfmvrperioddata%pname1(i), &
424  this%gwfmvrperioddata%id1(i), &
425  this%gwfmvrperioddata%mname2(i), &
426  this%gwfmvrperioddata%pname2(i), &
427  this%gwfmvrperioddata%id2(i), &
428  this%gwfmvrperioddata%imvrtype(i), &
429  this%gwfmvrperioddata%value(i))
430  end do
431 

◆ mvr_ad()

subroutine gwfmvrmodule::mvr_ad ( class(gwfmvrtype this)
private

Definition at line 434 of file gwf-mvr.f90.

435  ! -- dummy
436  class(GwfMvrType) :: this
437  ! -- locals
438  integer(I4B) :: i
439  !
440  do i = 1, this%nmvr
441  call this%mvr(i)%advance()
442  end do
443  !
444  ! -- Return
445  return

◆ mvr_ar()

subroutine gwfmvrmodule::mvr_ar ( class(gwfmvrtype this)
private

Definition at line 245 of file gwf-mvr.f90.

246  ! -- dummy
247  class(GwfMvrType) :: this
248  !
249  ! -- Print a message identifying the water mover package.
250  write (this%iout, 1) this%inunit
251 1 format(1x, /1x, 'MVR -- WATER MOVER PACKAGE, VERSION 8, 1/29/2016', &
252  ' INPUT READ FROM UNIT ', i0)
253  !
254  ! -- Read and check options
255  call this%read_options()
256  call this%check_options()
257  !
258  ! -- Read options
259  call this%read_dimensions()
260  !
261  ! -- Allocate arrays
262  call this%allocate_arrays()
263  !
264  ! -- Read and check package names
265  call this%read_packages()
266  call this%check_packages()
267  !
268  ! -- Define the budget object to be the size of package names
269  call this%budget%budget_df(this%maxpackages, 'WATER MOVER')
270  call this%budget%set_ibudcsv(this%ibudcsv)
271  !
272  ! -- setup the budget object
273  call this%mvr_setup_budobj()
274  !
275  ! -- Return
276  return

◆ mvr_bd()

subroutine gwfmvrmodule::mvr_bd ( class(gwfmvrtype this)
private

Definition at line 494 of file gwf-mvr.f90.

495  ! -- dummy
496  class(GwfMvrType) :: this
497  ! -- locals
498  ! -- formats
499  !
500  ! -- set the feature maps; for performance reasons,
501  ! this should only be called for the first time
502  ! step of a stress period in which a new set of
503  ! movers was provided in a period block.
504  if (this%reset_mapped_id) then
505  call this%set_mapped_id()
506  this%reset_mapped_id = .false.
507  end if
508  !
509  ! -- fill the budget object
510  call this%fill_budobj()
511  !
512  ! -- Return
513  return

◆ mvr_bdsav()

subroutine gwfmvrmodule::mvr_bdsav ( class(gwfmvrtype this,
integer(i4b), intent(in)  icbcfl,
integer(i4b), intent(in)  ibudfl,
integer(i4b), intent(in)  isuppress_output 
)
private

Definition at line 518 of file gwf-mvr.f90.

519  ! -- modules
520  use tdismodule, only: kstp, kper, delt, pertim, totim
521  ! -- dummy
522  class(GwfMvrType) :: this
523  integer(I4B), intent(in) :: icbcfl
524  integer(I4B), intent(in) :: ibudfl
525  integer(I4B), intent(in) :: isuppress_output
526  ! -- locals
527  integer(I4B) :: ibinun
528  ! -- formats
529  character(len=*), parameter :: fmttkk = &
530  "(1X,/1X,A,' PERIOD ',I0,' STEP ',I0)"
531  !
532  ! -- Print the mover flow table
533  if (ibudfl /= 0 .and. this%iprflow /= 0 .and. isuppress_output == 0) then
534  call this%mvr_print_outputtab()
535  end if
536  !
537  ! -- Save the mover flows from the budobj to a mover binary file
538  ibinun = 0
539  if (this%ibudgetout /= 0) then
540  ibinun = this%ibudgetout
541  end if
542  if (icbcfl == 0) ibinun = 0
543  if (isuppress_output /= 0) ibinun = 0
544  if (ibinun > 0) then
545  call this%budobj%save_flows(this%dis, ibinun, kstp, kper, delt, &
546  pertim, totim, this%iout)
547  end if
548  !
549  ! -- Return
550  return
real(dp), pointer, public pertim
time relative to start of stress period
Definition: tdis.f90:30
real(dp), pointer, public totim
time relative to start of simulation
Definition: tdis.f90:32
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
real(dp), pointer, public delt
length of the current time step
Definition: tdis.f90:29

◆ mvr_cc()

subroutine gwfmvrmodule::mvr_cc ( class(gwfmvrtype this,
integer(i4b), intent(in)  innertot,
integer(i4b), intent(in)  kiter,
integer(i4b), intent(in)  iend,
integer(i4b), intent(in)  icnvgmod,
character(len=lenpakloc), intent(inout)  cpak,
integer(i4b), intent(inout)  ipak,
real(dp), intent(inout)  dpak 
)
private

Definition at line 464 of file gwf-mvr.f90.

465  ! -- dummy
466  class(GwfMvrType) :: this
467  integer(I4B), intent(in) :: innertot
468  integer(I4B), intent(in) :: kiter
469  integer(I4B), intent(in) :: iend
470  integer(I4B), intent(in) :: icnvgmod
471  character(len=LENPAKLOC), intent(inout) :: cpak
472  integer(I4B), intent(inout) :: ipak
473  real(DP), intent(inout) :: dpak
474  ! -- formats
475  character(len=*), parameter :: fmtmvrcnvg = &
476  "(/,1x,'MOVER PACKAGE REQUIRES AT LEAST TWO OUTER ITERATIONS. CONVERGE &
477  &FLAG HAS BEEN RESET TO FALSE.')"
478  !
479  ! -- If there are active movers, then at least 2 outers required
480  if (this%nmvr > 0) then
481  if (icnvgmod == 1 .and. kiter == 1) then
482  dpak = dnodata
483  cpak = trim(this%packName)
484  write (this%iout, fmtmvrcnvg)
485  end if
486  end if
487  !
488  ! -- Return
489  return

◆ mvr_cr()

subroutine, public gwfmvrmodule::mvr_cr ( type(gwfmvrtype), pointer  mvrobj,
character(len=*), intent(in)  name_parent,
integer(i4b), intent(in)  inunit,
integer(i4b), intent(in)  iout,
class(disbasetype), intent(in), pointer  dis,
integer(i4b), optional  iexgmvr 
)

Definition at line 184 of file gwf-mvr.f90.

185  ! -- dummy
186  type(GwfMvrType), pointer :: mvrobj
187  character(len=*), intent(in) :: name_parent
188  integer(I4B), intent(in) :: inunit
189  integer(I4B), intent(in) :: iout
190  class(DisBaseType), pointer, intent(in) :: dis
191  integer(I4B), optional :: iexgmvr
192  !
193  ! -- Create the object
194  allocate (mvrobj)
195  !
196  ! -- Init
197  call mvrobj%mvr_init(name_parent, inunit, iout, dis, iexgmvr)
198  !
199  ! -- Return
200  return
Here is the caller graph for this function:

◆ mvr_da()

subroutine gwfmvrmodule::mvr_da ( class(gwfmvrtype this)

Definition at line 664 of file gwf-mvr.f90.

665  ! -- modules
666  use constantsmodule, only: done
668  ! -- dummy
669  class(GwfMvrType) :: this
670  !
671  ! -- Arrays
672  if (this%inunit > 0) then
673  call mem_deallocate(this%ientries)
674  deallocate (this%mvr)
675  deallocate (this%pckMemPaths)
676  deallocate (this%paknames)
677  deallocate (this%pakmovers)
678  !
679  ! -- allocate the perioddata object
680  call this%gwfmvrperioddata%destroy()
681  deallocate (this%gwfmvrperioddata)
682  nullify (this%gwfmvrperioddata)
683  !
684  ! -- budget object
685  call this%budget%budget_da()
686  deallocate (this%budget)
687  !
688  ! -- budobj
689  call this%budobj%budgetobject_da()
690  deallocate (this%budobj)
691  nullify (this%budobj)
692  !
693  ! -- output table object
694  if (associated(this%outputtab)) then
695  call this%outputtab%table_da()
696  deallocate (this%outputtab)
697  nullify (this%outputtab)
698  end if
699  end if
700  !
701  ! -- Scalars
702  call mem_deallocate(this%reset_mapped_id)
703  call mem_deallocate(this%ibudgetout)
704  call mem_deallocate(this%ibudcsv)
705  call mem_deallocate(this%maxmvr)
706  call mem_deallocate(this%maxpackages)
707  call mem_deallocate(this%maxcomb)
708  call mem_deallocate(this%nmvr)
709  call mem_deallocate(this%iexgmvr)
710  call mem_deallocate(this%imodelnames)
711  !
712  ! -- deallocate scalars in NumericalPackageType
713  call this%NumericalPackageType%da()
714  !
715  ! -- Return
716  return

◆ mvr_fc()

subroutine gwfmvrmodule::mvr_fc ( class(gwfmvrtype this)
private

Definition at line 450 of file gwf-mvr.f90.

451  class(GwfMvrType) :: this
452  ! local
453  integer(I4B) :: i
454 
455  do i = 1, this%nmvr
456  call this%mvr(i)%update_provider()
457  call this%mvr(i)%update_receiver()
458  end do
459 

◆ mvr_init()

subroutine gwfmvrmodule::mvr_init ( class(gwfmvrtype this,
character(len=*), intent(in)  name_parent,
integer(i4b), intent(in)  inunit,
integer(i4b), intent(in)  iout,
class(disbasetype), intent(in), pointer  dis,
integer(i4b), optional  iexgmvr 
)
private

Definition at line 203 of file gwf-mvr.f90.

204  class(GwfMvrType) :: this
205  character(len=*), intent(in) :: name_parent
206  integer(I4B), intent(in) :: inunit
207  integer(I4B), intent(in) :: iout
208  class(DisBaseType), pointer, intent(in) :: dis
209  integer(I4B), optional :: iexgmvr
210  !
211  ! -- create name and memory paths. name_parent will either be model name or the
212  ! exchange name.
213  call this%set_names(1, name_parent, 'MVR', 'MVR')
214  !
215  ! -- Allocate scalars
216  call this%allocate_scalars()
217  !
218  ! -- Set pointer to dis
219  this%dis => dis
220  !
221  ! -- Set variables
222  this%inunit = inunit
223  this%iout = iout
224  !
225  ! -- Set iexgmvr
226  if (present(iexgmvr)) this%iexgmvr = iexgmvr
227  !
228  ! -- Create the budget object
229  if (inunit > 0) then
230  call budget_cr(this%budget, this%memoryPath)
231  !
232  ! -- Initialize block parser
233  call this%parser%Initialize(this%inunit, this%iout)
234  end if
235  !
236  ! -- instantiate the budget object
237  call budgetobject_cr(this%budobj, 'WATER MOVER')
238  !
239  ! -- Return
240  return
Here is the call graph for this function:

◆ mvr_ot_bdsummary()

subroutine gwfmvrmodule::mvr_ot_bdsummary ( class(gwfmvrtype this,
integer(i4b), intent(in)  ibudfl 
)
private

Definition at line 599 of file gwf-mvr.f90.

600  ! -- modules
601  use tdismodule, only: kstp, kper, delt, totim
602  ! -- dummy
603  class(GwfMvrType) :: this
604  integer(I4B), intent(in) :: ibudfl
605  ! -- locals
606  character(len=LENMEMPATH) :: pckMemPath
607  integer(I4B) :: i, j
608  real(DP), allocatable, dimension(:) :: ratin, ratout
609  !
610  ! -- Allocate and initialize ratin/ratout
611  allocate (ratin(this%maxpackages), ratout(this%maxpackages))
612  do j = 1, this%maxpackages
613  ratin(j) = dzero
614  ratout(j) = dzero
615  end do
616  !
617  ! -- Accumulate the rates
618  do i = 1, this%nmvr
619  do j = 1, this%maxpackages
620  if (this%pckMemPaths(j) == this%mvr(i)%mem_path_src) then
621  ratin(j) = ratin(j) + this%mvr(i)%qpactual
622  end if
623  if (this%pckMemPaths(j) == this%mvr(i)%mem_path_tgt) then
624  ratout(j) = ratout(j) + this%mvr(i)%qpactual
625  end if
626  end do
627  end do
628  !
629  ! -- Send rates to budget object
630  call this%budget%reset()
631  do j = 1, this%maxpackages
632  if ((this%iexgmvr) == 1) then
633  pckmempath = this%pckMemPaths(j)
634  else
635  pckmempath = this%paknames(j)
636  end if
637  call this%budget%addentry(ratin(j), ratout(j), delt, pckmempath)
638  end do
639  !
640  ! -- Write the budget
641  call this%budget%finalize_step(delt)
642  if (ibudfl /= 0) then
643  call this%budget%budget_ot(kstp, kper, this%iout)
644  end if
645  !
646  ! -- Write budget csv
647  call this%budget%writecsv(totim)
648  !
649  ! -- Deallocate
650  deallocate (ratin, ratout)
651  !
652  ! -- Output mvr budget
653  ! Not using budobj write_table here because it would result
654  ! in a table that has one entry. A custom table looks
655  ! better here with a row for each package.
656  !call this%budobj%write_budtable(kstp, kper, this%iout)
657  !
658  ! -- Return
659  return

◆ mvr_ot_printflow()

subroutine gwfmvrmodule::mvr_ot_printflow ( class(gwfmvrtype this,
integer(i4b), intent(in)  icbcfl,
integer(i4b), intent(in)  ibudfl 
)

Definition at line 582 of file gwf-mvr.f90.

583  ! -- dummy
584  class(GwfMvrType) :: this
585  integer(I4B), intent(in) :: icbcfl
586  integer(I4B), intent(in) :: ibudfl
587  !
588  ! -- Print the mover flow table
589  if (ibudfl /= 0 .and. this%iprflow /= 0) then
590  call this%mvr_print_outputtab()
591  end if
592  !
593  ! -- Return
594  return

◆ mvr_ot_saveflow()

subroutine gwfmvrmodule::mvr_ot_saveflow ( class(gwfmvrtype this,
integer(i4b), intent(in)  icbcfl,
integer(i4b), intent(in)  ibudfl 
)

Definition at line 555 of file gwf-mvr.f90.

556  ! -- modules
557  use tdismodule, only: kstp, kper, delt, pertim, totim
558  ! -- dummy
559  class(GwfMvrType) :: this
560  integer(I4B), intent(in) :: icbcfl
561  integer(I4B), intent(in) :: ibudfl
562  ! -- locals
563  integer(I4B) :: ibinun
564  !
565  ! -- Save the mover flows from the budobj to a mover binary file
566  ibinun = 0
567  if (this%ibudgetout /= 0) then
568  ibinun = this%ibudgetout
569  end if
570  if (icbcfl == 0) ibinun = 0
571  if (ibinun > 0) then
572  call this%budobj%save_flows(this%dis, ibinun, kstp, kper, delt, &
573  pertim, totim, this%iout)
574  end if
575  !
576  ! -- Return
577  return

◆ mvr_print_outputtab()

subroutine gwfmvrmodule::mvr_print_outputtab ( class(gwfmvrtype), intent(inout)  this)
private

Definition at line 1320 of file gwf-mvr.f90.

1321  ! -- module
1322  use tdismodule, only: kstp, kper
1323  ! -- dummy
1324  class(GwfMvrType), intent(inout) :: this
1325  ! -- local
1326  character(len=LINELENGTH) :: title
1327  integer(I4B) :: i
1328  !
1329  ! -- set table kstp and kper
1330  call this%outputtab%set_kstpkper(kstp, kper)
1331  !
1332  ! -- Add terms and print the table
1333  title = 'WATER MOVER PACKAGE ('//trim(this%packName)// &
1334  ') FLOW RATES'
1335  call this%outputtab%set_title(title)
1336  call this%outputtab%set_maxbound(this%nmvr)
1337  do i = 1, this%nmvr
1338  call this%outputtab%add_term(i)
1339  call this%outputtab%add_term(this%mvr(i)%mem_path_src)
1340  call this%outputtab%add_term(this%mvr(i)%iRchNrSrc)
1341  call this%outputtab%add_term(this%mvr(i)%qavailable)
1342  call this%outputtab%add_term(this%mvr(i)%qpactual)
1343  call this%outputtab%add_term(this%mvr(i)%mem_path_tgt)
1344  call this%outputtab%add_term(this%mvr(i)%iRchNrTgt)
1345  end do
1346  !
1347  ! -- Return
1348  return

◆ mvr_rp()

subroutine gwfmvrmodule::mvr_rp ( class(gwfmvrtype), intent(inout)  this)
private

Read itmp and read new boundaries if itmp > 0

Definition at line 283 of file gwf-mvr.f90.

284  ! -- modules
285  use constantsmodule, only: linelength
286  use tdismodule, only: kper, nper
288  use arrayhandlersmodule, only: ifind
289  ! -- dummy
290  class(GwfMvrType), intent(inout) :: this
291  ! -- local
292  integer(I4B) :: i, ierr, nlist, ipos
293  integer(I4B) :: ii, jj
294  logical :: isfound
295  character(len=LINELENGTH) :: line, errmsg
296  character(len=LENMODELNAME) :: mname
297  ! -- formats
298  character(len=*), parameter :: fmtblkerr = &
299  &"('Error. Looking for BEGIN PERIOD iper. Found ', a, ' instead.')"
300  character(len=*), parameter :: fmtlsp = &
301  &"(1X,/1X,'REUSING ',A,'S FROM LAST STRESS PERIOD')"
302  character(len=*), parameter :: fmtnbd = &
303  "(1X,/1X,'THE NUMBER OF ACTIVE ',A,'S (',I6, &
304  &') IS GREATER THAN MAXIMUM(',I6,')')"
305  !
306  ! -- Set ionper to the stress period number for which a new block of data
307  ! will be read.
308  if (this%inunit == 0) return
309  !
310  ! -- get stress period data
311  if (this%ionper < kper) then
312  !
313  ! -- get period block
314  call this%parser%GetBlock('PERIOD', isfound, ierr, &
315  supportopenclose=.true., &
316  blockrequired=.false.)
317  if (isfound) then
318  !
319  ! -- read ionper and check for increasing period numbers
320  call this%read_check_ionper()
321  else
322  !
323  ! -- PERIOD block not found
324  if (ierr < 0) then
325  ! -- End of file found; data applies for remainder of simulation.
326  this%ionper = nper + 1
327  else
328  ! -- Found invalid block
329  call this%parser%GetCurrentLine(line)
330  write (errmsg, fmtblkerr) adjustl(trim(line))
331  call store_error(errmsg)
332  call this%parser%StoreErrorUnit()
333  end if
334  end if
335  end if
336  !
337  ! -- read data if ionper == kper
338  if (this%ionper == kper) then
339  write (this%iout, '(/,2x,a,i0)') 'READING WATER MOVERS FOR PERIOD ', kper
340  nlist = -1
341  i = 1
342  this%reset_mapped_id = .true.
343  !
344  ! -- set mname to '' if this is an exchange mover, or to the model name
345  if (this%iexgmvr == 0) then
346  mname = this%name_model
347  else
348  mname = ''
349  end if
350  !
351  ! -- Assign a pointer to the package mover object. The pointer assignment
352  ! will happen only the first time
353  call this%assign_packagemovers()
354  !
355  ! -- Call the period data input reader
356  call this%gwfmvrperioddata%read_from_parser(this%parser, nlist, mname)
357  !
358  ! -- Process the input data into the individual mover objects
359  call this%initialize_movers(nlist)
360  !
361  ! -- assign the pointers
362  do i = 1, nlist
363  call this%mvr(i)%prepare(this%parser%iuactive, &
364  this%pckMemPaths, &
365  this%pakmovers)
366  if (this%iprpak == 1) call this%mvr(i)%echo(this%iout)
367  end do
368  write (this%iout, '(/,1x,a,1x,i6,/)') 'END OF DATA FOR PERIOD', kper
369  !
370  ! -- Set the number of movers for this period to nlist
371  this%nmvr = nlist
372  write (this%iout, '(4x, i0, a, i0)') this%nmvr, &
373  ' MOVERS READ FOR PERIOD ', kper
374  !
375  ! -- Check to make sure all providers and receivers are properly stored
376  do i = 1, this%nmvr
377  ipos = ifind(this%pckMemPaths, this%mvr(i)%mem_path_src)
378  if (ipos < 1) then
379  write (errmsg, '(a,a,a)') 'Provider ', &
380  trim(this%mvr(i)%mem_path_src), ' not listed in packages block.'
381  call store_error(errmsg)
382  end if
383  ipos = ifind(this%pckMemPaths, this%mvr(i)%mem_path_tgt)
384  if (ipos < 1) then
385  write (errmsg, '(a,a,a)') 'Receiver ', &
386  trim(this%mvr(i)%mem_path_tgt), ' not listed in packages block.'
387  call store_error(errmsg)
388  end if
389  end do
390  if (count_errors() > 0) then
391  call this%parser%StoreErrorUnit()
392  end if
393  !
394  ! -- reset ientries
395  do i = 1, this%maxcomb
396  this%ientries(i) = 0
397  end do
398  !
399  ! --
400  do i = 1, this%nmvr
401  ii = ifind(this%pckMemPaths, this%mvr(i)%mem_path_src)
402  jj = ifind(this%pckMemPaths, this%mvr(i)%mem_path_tgt)
403  ipos = (ii - 1) * this%maxpackages + jj
404  this%ientries(ipos) = this%ientries(ipos) + 1
405  end do
406  else
407  write (this%iout, fmtlsp) 'MVR'
408  !
409  end if
410  !
411  ! -- Return
412  return
integer(i4b), pointer, public nper
number of stress period
Definition: tdis.f90:21
Here is the call graph for this function:

◆ mvr_setup_budobj()

subroutine gwfmvrmodule::mvr_setup_budobj ( class(gwfmvrtype this)

Definition at line 1121 of file gwf-mvr.f90.

1122  ! -- modules
1123  use constantsmodule, only: lenbudtxt
1125  ! -- dummy
1126  class(GwfMvrType) :: this
1127  ! -- local
1128  integer(I4B) :: nbudterm
1129  integer(I4B) :: ncv
1130  integer(I4B) :: i
1131  integer(I4B) :: j
1132  integer(I4B) :: naux
1133  character(len=LENMODELNAME) :: modelname1, modelname2
1134  character(len=LENPACKAGENAME) :: packagename1, packagename2
1135  integer(I4B) :: maxlist
1136  integer(I4B) :: idx
1137  character(len=LENBUDTXT) :: text
1138  !
1139  ! -- Determine the number of mover budget terms. These are fixed for
1140  ! the simulation and cannot change. A separate term is required
1141  ! for each possible provider/receiver combination.
1142  nbudterm = 0
1143  do i = 1, this%maxpackages
1144  do j = 1, this%maxpackages
1145  nbudterm = nbudterm + 1
1146  end do
1147  end do
1148  !
1149  ! -- Number of control volumes is set to be 0, because there aren't
1150  ! any for the mover
1151  ncv = 0
1152  !
1153  ! -- set up budobj
1154  call this%budobj%budgetobject_df(ncv, nbudterm, 0, 0)
1155  idx = 0
1156  !
1157  ! -- Go through and set up each budget term
1158  text = ' MOVER-FLOW'
1159  maxlist = this%maxmvr
1160  naux = 0
1161  do i = 1, this%maxpackages
1162 
1163  call split_mem_path(this%pckMemPaths(i), modelname1, packagename1)
1164 
1165  do j = 1, this%maxpackages
1166 
1167  idx = idx + 1
1168  call split_mem_path(this%pckMemPaths(j), modelname2, packagename2)
1169  call this%budobj%budterm(idx)%initialize(text, &
1170  modelname1, &
1171  packagename1, &
1172  modelname2, &
1173  packagename2, &
1174  maxlist, .false., .false., &
1175  naux)
1176  end do
1177  end do
1178  !
1179  ! -- Return
1180  return
integer(i4b), parameter lenbudtxt
maximum length of a budget component names
Definition: Constants.f90:36
subroutine split_mem_path(mem_path, component, subcomponent)
Split the memory path into component(s)
Here is the call graph for this function:

◆ mvr_setup_outputtab()

subroutine gwfmvrmodule::mvr_setup_outputtab ( class(gwfmvrtype), intent(inout)  this)
private

Definition at line 1274 of file gwf-mvr.f90.

1275  ! -- dummy
1276  class(GwfMvrType), intent(inout) :: this
1277  ! -- local
1278  character(len=LINELENGTH) :: title
1279  character(len=LINELENGTH) :: text
1280  integer(I4B) :: ntabcol
1281  integer(I4B) :: ilen
1282  !
1283  ! -- allocate and initialize the output table
1284  if (this%iprflow /= 0) then
1285  !
1286  ! -- dimension table
1287  ntabcol = 7
1288  !
1289  ! -- initialize the output table object
1290  title = 'WATER MOVER PACKAGE ('//trim(this%packName)// &
1291  ') FLOW RATES'
1292  call table_cr(this%outputtab, this%packName, title)
1293  call this%outputtab%table_df(this%maxmvr, ntabcol, this%iout, &
1294  transient=.true.)
1295  text = 'NUMBER'
1296  call this%outputtab%initialize_column(text, 10, alignment=tabcenter)
1297  text = 'PROVIDER LOCATION'
1298  ilen = lenmodelname + lenpackagename + 1
1299  call this%outputtab%initialize_column(text, ilen)
1300  text = 'PROVIDER ID'
1301  call this%outputtab%initialize_column(text, 10)
1302  text = 'AVAILABLE RATE'
1303  call this%outputtab%initialize_column(text, 10)
1304  text = 'PROVIDED RATE'
1305  call this%outputtab%initialize_column(text, 10)
1306  text = 'RECEIVER LOCATION'
1307  ilen = lenmodelname + lenpackagename + 1
1308  call this%outputtab%initialize_column(text, ilen)
1309  text = 'RECEIVER ID'
1310  call this%outputtab%initialize_column(text, 10)
1311  !
1312  end if
1313  !
1314  ! -- Return
1315  return
Here is the call graph for this function:

◆ read_dimensions()

subroutine gwfmvrmodule::read_dimensions ( class(gwfmvrtype), intent(inout)  this)

Definition at line 844 of file gwf-mvr.f90.

845  ! -- modules
846  use constantsmodule, only: linelength
848  ! -- dummy
849  class(GwfMvrType), intent(inout) :: this
850  ! -- local
851  character(len=LINELENGTH) :: errmsg, keyword
852  integer(I4B) :: ierr
853  logical :: isfound, endOfBlock
854  integer(I4B) :: i
855  integer(I4B) :: j
856  !
857  ! -- get dimensions block
858  call this%parser%GetBlock('DIMENSIONS', isfound, ierr, &
859  supportopenclose=.true.)
860  !
861  ! -- parse dimensions block if detected
862  if (isfound) then
863  write (this%iout, '(/1x,a)') 'PROCESSING MVR DIMENSIONS'
864  do
865  call this%parser%GetNextLine(endofblock)
866  if (endofblock) exit
867  call this%parser%GetStringCaps(keyword)
868  select case (keyword)
869  case ('MAXMVR')
870  this%maxmvr = this%parser%GetInteger()
871  write (this%iout, '(4x,a,i0)') 'MAXMVR = ', this%maxmvr
872  case ('MAXPACKAGES')
873  this%maxpackages = this%parser%GetInteger()
874  write (this%iout, '(4x,a,i0)') 'MAXPACKAGES = ', this%maxpackages
875  case default
876  write (errmsg, '(a,a)') &
877  'Unknown MVR dimension: ', trim(keyword)
878  call store_error(errmsg)
879  call this%parser%StoreErrorUnit()
880  end select
881  end do
882  write (this%iout, '(1x,a)') 'END OF MVR DIMENSIONS'
883  else
884  call store_error('Required DIMENSIONS block not found.')
885  call this%parser%StoreErrorUnit()
886  end if
887  !
888  ! -- calculate maximum number of combinations
889  this%maxcomb = 0
890  do i = 1, this%maxpackages
891  do j = 1, this%maxpackages
892  this%maxcomb = this%maxcomb + 1
893  end do
894  end do
895  !
896  ! -- verify dimensions were set
897  if (this%maxmvr < 0) then
898  write (errmsg, '(a)') &
899  'MAXMVR was not specified or was specified incorrectly.'
900  call store_error(errmsg)
901  call this%parser%StoreErrorUnit()
902  end if
903  if (this%maxpackages < 0) then
904  write (errmsg, '(a)') &
905  'MAXPACKAGES was not specified or was specified incorrectly.'
906  call store_error(errmsg)
907  call this%parser%StoreErrorUnit()
908  end if
909  !
910  ! -- Return
911  return
Here is the call graph for this function:

◆ read_options()

subroutine gwfmvrmodule::read_options ( class(gwfmvrtype this)

Definition at line 721 of file gwf-mvr.f90.

722  ! -- modules
723  use constantsmodule, only: linelength, dzero, done
724  use openspecmodule, only: access, form
727  ! -- dummy
728  class(GwfMvrType) :: this
729  ! -- local
730  character(len=LINELENGTH) :: errmsg
731  character(len=MAXCHARLEN) :: fname, keyword
732  integer(I4B) :: ierr
733  logical :: isfound, endOfBlock
734  ! -- formats
735  character(len=*), parameter :: fmtmvrbin = &
736  "(4x, 'MVR ', 1x, a, 1x, ' WILL BE SAVED TO FILE: ', a, /4x, 'OPENED ON &
737  &UNIT: ', I0)"
738  !
739  ! -- get options block
740  call this%parser%GetBlock('OPTIONS', isfound, ierr, &
741  supportopenclose=.true., blockrequired=.false.)
742  !
743  ! -- parse options block if detected
744  if (isfound) then
745  write (this%iout, '(1x,a)') 'PROCESSING MVR OPTIONS'
746  do
747  call this%parser%GetNextLine(endofblock)
748  if (endofblock) exit
749  call this%parser%GetStringCaps(keyword)
750  select case (keyword)
751  case ('BUDGET')
752  call this%parser%GetStringCaps(keyword)
753  if (keyword == 'FILEOUT') then
754  call this%parser%GetString(fname)
755  this%ibudgetout = getunit()
756  call openfile(this%ibudgetout, this%iout, fname, 'DATA(BINARY)', &
757  form, access, 'REPLACE')
758  write (this%iout, fmtmvrbin) 'BUDGET', trim(adjustl(fname)), &
759  this%ibudgetout
760  else
761  call store_error('OPTIONAL BUDGET KEYWORD MUST &
762  &BE FOLLOWED BY FILEOUT')
763  end if
764  case ('BUDGETCSV')
765  call this%parser%GetStringCaps(keyword)
766  if (keyword == 'FILEOUT') then
767  call this%parser%GetString(fname)
768  this%ibudcsv = getunit()
769  call openfile(this%ibudcsv, this%iout, fname, 'CSV', &
770  filstat_opt='REPLACE')
771  write (this%iout, fmtmvrbin) 'BUDGET CSV', trim(adjustl(fname)), &
772  this%ibudcsv
773  else
774  call store_error('OPTIONAL BUDGETCSV KEYWORD MUST BE FOLLOWED BY &
775  &FILEOUT')
776  end if
777  case ('PRINT_INPUT')
778  this%iprpak = 1
779  write (this%iout, '(4x,a)') 'WATER MOVER INPUT '// &
780  'WILL BE PRINTED TO LIST FILE.'
781  case ('PRINT_FLOWS')
782  this%iprflow = 1
783  write (this%iout, '(4x,a)') 'LISTS OF WATER MOVER FLOWS '// &
784  'WILL BE PRINTED TO LIST FILE.'
785  case ('MODELNAMES')
786  this%imodelnames = 1
787  write (this%iout, '(4x,a)') 'ALL PACKAGE NAMES ARE PRECEDED '// &
788  'BY THE NAME OF THE MODEL CONTAINING THE PACKAGE.'
789  if (this%iexgmvr == 0) then
790  write (errmsg, '(a,a)') &
791  'MODELNAMES cannot be specified unless the '// &
792  'mover package is for an exchange.'
793  call store_error(errmsg)
794  call this%parser%StoreErrorUnit()
795  end if
796  case default
797  write (errmsg, '(a,a)') 'Unknown MVR option: ', trim(keyword)
798  call store_error(errmsg)
799  call this%parser%StoreErrorUnit()
800  end select
801  end do
802  write (this%iout, '(1x,a)') 'END OF MVR OPTIONS'
803  end if
804  !
805  ! -- Return
806  return
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.
character(len=20) access
Definition: OpenSpec.f90:7
character(len=20) form
Definition: OpenSpec.f90:7
Here is the call graph for this function:

◆ read_packages()

subroutine gwfmvrmodule::read_packages ( class(gwfmvrtype), intent(inout)  this)

Definition at line 916 of file gwf-mvr.f90.

917  ! -- modules
918  use constantsmodule, only: linelength
921  ! -- dummy
922  class(GwfMvrType), intent(inout) :: this
923  ! -- local
924  character(len=LINELENGTH) :: errmsg, word, word1, word2
925  integer(I4B) :: lloc, ierr
926  integer(I4B) :: npak
927  logical :: isfound, endOfBlock
928  !
929  ! -- get packages block
930  call this%parser%GetBlock('PACKAGES', isfound, ierr, &
931  supportopenclose=.true.)
932  !
933  ! -- parse packages block
934  if (isfound) then
935  write (this%iout, '(/1x,a)') 'PROCESSING MVR PACKAGES'
936  npak = 0
937  do
938  call this%parser%GetNextLine(endofblock)
939  if (endofblock) exit
940  call this%parser%GetStringCaps(word1)
941  lloc = 1
942  npak = npak + 1
943  if (npak > this%maxpackages) then
944  call store_error('ERROR. MAXPACKAGES NOT SET LARGE ENOUGH.')
945  call this%parser%StoreErrorUnit()
946  end if
947  if (this%iexgmvr == 0) then
948  this%pckMemPaths(npak) = create_mem_path(this%name_model, word1)
949  word = word1
950  else
951  call this%parser%GetStringCaps(word2)
952  this%pckMemPaths(npak) = create_mem_path(word1, word2)
953  word = word2
954  end if
955  this%paknames(npak) = trim(word)
956  write (this%iout, '(3x,a,a)') 'INCLUDING PACKAGE: ', &
957  trim(this%pckMemPaths(npak))
958  end do
959  write (this%iout, '(1x,a)') 'END OF MVR PACKAGES'
960  else
961  call store_error('ERROR. REQUIRED PACKAGES BLOCK NOT FOUND.')
962  call this%parser%StoreErrorUnit()
963  end if
964  !
965  ! -- Check to make sure npak = this%maxpackages
966  if (npak /= this%maxpackages) then
967  write (errmsg, '(a, i0, a, i0, a)') &
968  'ERROR. NUMBER OF PACKAGES (', npak, ') DOES NOT EQUAL '// &
969  'MAXPACKAGES (', this%maxpackages, ').'
970  call store_error(errmsg)
971  call this%parser%StoreErrorUnit()
972  end if
973  !
974  ! -- Return
975  return
character(len=lenmempath) function create_mem_path(component, subcomponent, context)
returns the path to the memory object
Here is the call graph for this function:

◆ set_mapped_id()

subroutine gwfmvrmodule::set_mapped_id ( class(gwfmvrtype this)

For the budget output, we don't write outlet number, instead we write the lake number. Normally the receiver number is the same as the feature number provided by the user. For moving water from a lake, the user specifies the outlet number, not the lake number, in the mover package. The iRchNrSrcMapped variable contains the lake number, not the outlet number, and is written to the budget files. For other packages, the iRchNrSrcMapped value is simply the well number, the stream reach, or the uzf cell number. This routine needs to be called each time a new set of movers is read. It can't be called from within mvr_rp because the iprmap isn't updated by lake until lak_rp, which is called after mvr_rp.

Definition at line 1367 of file gwf-mvr.f90.

1368  ! -- dummy
1369  class(GwfMvrType) :: this
1370  ! -- locals
1371  integer(I4B) :: i, mapped_id
1372  class(PackageMoverType), pointer :: pkg_mvr
1373  ! -- formats
1374  !
1375  ! -- set the feature maps
1376  allocate (pkg_mvr)
1377  do i = 1, this%nmvr
1378  call set_packagemover_pointer(pkg_mvr, this%mvr(i)%mem_path_src)
1379  mapped_id = pkg_mvr%iprmap(this%mvr(i)%iRchNrSrc)
1380  this%mvr(i)%iRchNrSrcMapped = mapped_id
1381  end do
1382  deallocate (pkg_mvr)
1383  !
1384  ! -- Return
1385  return
Here is the call graph for this function: