20 logical(LGP),
dimension(:),
pointer,
contiguous :: prov_is_m1 => null()
21 real(dp),
dimension(:),
pointer,
contiguous :: qpactual_m1 => null()
22 real(dp),
dimension(:),
pointer,
contiguous :: qpactual_m2 => null()
23 real(dp),
dimension(:),
pointer,
contiguous :: qavailable_m1 => null()
24 real(dp),
dimension(:),
pointer,
contiguous :: qavailable_m2 => null()
25 integer(I4B),
dimension(:),
pointer,
contiguous :: id_mapped_m1 => null()
26 integer(I4B),
dimension(:),
pointer,
contiguous :: id_mapped_m2 => null()
40 subroutine exg_mvr_cr(exg_mvr, name_parent, inunit, iout, dis)
42 character(len=*),
intent(in) :: name_parent
43 integer(I4B),
intent(in) :: inunit
44 integer(I4B),
intent(in) :: iout
50 call exg_mvr%mvr_init(name_parent, inunit, iout, dis, 1)
60 character(len=LENMODELNAME) :: mname
61 character(len=LENPACKAGENAME) :: pname
63 character(len=LINELENGTH) :: errmsg
65 integer(I4B),
pointer :: imover_ptr
67 do i = 1,
size(this%pckMemPaths)
74 call mem_setptr(imover_ptr,
'IMOVER', trim(this%pckMemPaths(i)))
75 if (imover_ptr == 0)
then
76 write (errmsg,
'(a, a, a)') &
77 'ERROR. MODEL AND PACKAGE "', &
78 trim(this%pckMemPaths(i)), &
79 '" DOES NOT HAVE MOVER SPECIFIED IN OPTIONS BLOCK.'
87 if (mname == this%model1%name .or. mname == this%model2%name)
then
90 write (errmsg,
'(a, a, a)')
'The input for an exchange mover &
91 &lists a model name ("', trim(mname),
'") in the PACKAGES &
92 &input block that is not a member of the exchange.'
98 call this%parser%StoreErrorUnit()
109 character(len=LENMODELNAME) :: mname
110 character(len=LENPACKAGENAME) :: pname
113 do i = 1,
size(this%pckMemPaths)
114 if (this%pakmovers(i)%memoryPath ==
'')
then
118 if (vm%is_local)
then
121 trim(this%pckMemPaths(i)))
132 integer(I4B) :: nr_active_movers
135 character(len=LENMODELNAME) :: mname
136 character(len=LENPACKAGENAME) :: pname
140 call this%GwfMvrType%initialize_movers(nr_active_movers)
142 this%prov_is_m1 = .false.
145 do i = 1, nr_active_movers
148 this%mvr(i)%is_provider_active = vm%is_local
149 this%prov_is_m1(i) =
associated(vm, this%model1)
152 this%mvr(i)%is_receiver_active = vm%is_local
159 do i = 1, nr_active_movers
160 if (this%mvr(i)%is_provider_active)
then
163 if (this%prov_is_m1(i))
then
164 this%id_mapped_m1(i) = pkg_mvr%iprmap(this%mvr(i)%iRchNrSrc)
165 this%id_mapped_m2(i) = -1
167 this%id_mapped_m1(i) = -1
168 this%id_mapped_m2(i) = pkg_mvr%iprmap(this%mvr(i)%iRchNrSrc)
183 if (this%mvr(i)%is_provider_active)
then
185 call this%mvr(i)%update_provider()
188 if (this%prov_is_m1(i))
then
189 this%qpactual_m1(i) = this%mvr(i)%qpactual
190 this%qavailable_m1(i) = this%mvr(i)%qavailable
192 this%qavailable_m2(i) =
dnodata
195 this%qavailable_m1(i) =
dnodata
196 this%qpactual_m2(i) = this%mvr(i)%qpactual
197 this%qavailable_m2(i) = this%mvr(i)%qavailable
212 if (this%mvr(i)%is_receiver_active)
then
214 if (this%prov_is_m1(i))
then
215 this%mvr(i)%qpactual = this%qpactual_m1(i)
216 this%mvr(i)%qavailable = this%qavailable_m1(i)
218 this%mvr(i)%qpactual = this%qpactual_m2(i)
219 this%mvr(i)%qavailable = this%qavailable_m2(i)
221 call this%mvr(i)%update_receiver()
236 if (this%prov_is_m1(i))
then
237 this%mvr(i)%iRchNrSrcMapped = this%id_mapped_m1(i)
239 this%mvr(i)%iRchNrSrcMapped = this%id_mapped_m2(i)
243 call this%fill_budobj()
252 call this%GwfMvrType%allocate_arrays()
254 allocate (this%prov_is_m1(this%maxmvr))
255 call mem_allocate(this%qpactual_m1, this%maxmvr,
'QPACTUAL_M1', &
257 call mem_allocate(this%qpactual_m2, this%maxmvr,
'QPACTUAL_M2', &
259 call mem_allocate(this%qavailable_m1, this%maxmvr,
'QAVAILABLE_M1', &
261 call mem_allocate(this%qavailable_m2, this%maxmvr,
'QAVAILABLE_M2', &
263 call mem_allocate(this%id_mapped_m1, this%maxmvr,
'ID_MAPPED_M1', &
265 call mem_allocate(this%id_mapped_m2, this%maxmvr,
'ID_MAPPED_M2', &
268 do i = 1, this%maxmvr
269 this%id_mapped_m1(i) = 0
270 this%id_mapped_m2(i) = 0
273 this%qavailable_m1(i) =
dnodata
274 this%qavailable_m2(i) =
dnodata
282 call this%GwfMvrType%mvr_da()
284 deallocate (this%prov_is_m1)
This module contains simulation constants.
integer(i4b), parameter linelength
maximum length of a standard line
integer(i4b), parameter lenmodelname
maximum length of the model name
integer(i4b), parameter lenpackagename
maximum length of the package name
real(dp), parameter dnodata
real no data constant
real(dp), parameter dzero
real constant zero
subroutine xmvr_initialize_movers(this, nr_active_movers)
Overrides mover initialization in GWF MVR to deactivate remote parts and build up sync....
subroutine xmvr_assign_packagemovers(this)
Overrides GWF MVR routine to skip assigning.
subroutine xmvr_check_packages(this)
subroutine xmvr_fc(this)
Assign synced qpactual to mover and update receiver.
subroutine xmvr_cf(this)
Calculates qpactual and stores it for synchronization.
subroutine xmvr_bd(this)
Overrides budget routine to first assign the.
subroutine, public exg_mvr_cr(exg_mvr, name_parent, inunit, iout, dis)
subroutine xmvr_allocate_arrays(this)
subroutine mvr_da(this)
Deallocate.
subroutine initialize_movers(this, nr_active_movers)
subroutine check_packages(this)
Check to make sure packages have mover activated.
subroutine mvr_bd(this)
Fill the mover budget object.
subroutine assign_packagemovers(this)
Assign pointer to each package's packagemover object.
subroutine mvr_fc(this)
Calculate qfrommvr as a function of qtomvr.
subroutine allocate_arrays(this)
Allocate package arrays.
This module defines variable data types.
subroutine split_mem_path(mem_path, component, subcomponent)
Split the memory path into component(s)
subroutine, public set_packagemover_pointer(packagemover, memPath)
This module contains simulation methods.
subroutine, public store_error(msg, terminate)
Store an error message.
integer(i4b) function, public count_errors()
Return number of errors.
subroutine, public store_error_unit(iunit, terminate)
Store the file unit number.
Extends model mover for exchanges to also handle the.