371 character(len=LENMEMPATH) :: input_mempath
372 type(CharacterStringType),
dimension(:),
contiguous, &
374 type(CharacterStringType),
dimension(:),
contiguous, &
376 type(CharacterStringType),
dimension(:),
contiguous, &
378 type(CharacterStringType),
dimension(:),
contiguous, &
380 type(CharacterStringType),
dimension(:),
contiguous, &
382 character(len=LINELENGTH) :: exgtype
383 integer(I4B) :: exg_id
384 integer(I4B) :: m1_id, m2_id
385 character(len=LINELENGTH) :: fname, name1, name2
386 character(len=LENEXCHANGENAME) :: exg_name
387 character(len=LENMEMPATH) :: exg_mempath
389 character(len=LINELENGTH) :: errmsg
390 logical(LGP) :: terminate = .true.
391 logical(LGP) :: both_remote, both_local
393 character(len=*),
parameter :: fmtmerr =
"('Error in simulation control ', &
394 &'file. Could not find model: ', a)"
400 call mem_setptr(etypes,
'EXGTYPE', input_mempath)
401 call mem_setptr(efiles,
'EXGFILE', input_mempath)
402 call mem_setptr(emnames_a,
'EXGMNAMEA', input_mempath)
403 call mem_setptr(emnames_b,
'EXGMNAMEB', input_mempath)
404 call mem_setptr(emempaths,
'EXGMEMPATHS', input_mempath)
407 write (iout,
'(/1x,a)')
'READING SIMULATION EXCHANGES'
413 do n = 1,
size(etypes)
420 exg_mempath = emempaths(n)
425 m1_id = ifind(model_names, name1)
427 write (errmsg, fmtmerr) trim(name1)
428 call store_error(errmsg, terminate)
430 m2_id = ifind(model_names, name2)
432 write (errmsg, fmtmerr) trim(name2)
433 call store_error(errmsg, terminate)
437 both_remote = (model_loc_idx(m1_id) == -1 .and. &
438 model_loc_idx(m2_id) == -1)
439 both_local = (model_loc_idx(m1_id) > 0 .and. &
440 model_loc_idx(m2_id) > 0)
441 if (.not. both_remote)
then
442 write (iout,
'(4x,a,a,i0,a,i0,a,i0)') trim(exgtype),
' exchange ', &
443 exg_id,
' will be created to connect model ', m1_id, &
444 ' with model ', m2_id
447 select case (exgtype)
449 write (exg_name,
'(a,i0)')
'GWF-GWF_', exg_id
450 if (.not. both_remote)
then
457 call gwfgwt_cr(fname, exg_id, m1_id, m2_id)
461 call gwfgwe_cr(fname, exg_id, m1_id, m2_id)
464 call gwfprt_cr(fname, exg_id, m1_id, m2_id)
466 write (exg_name,
'(a,i0)')
'GWT-GWT_', exg_id
467 if (.not. both_remote)
then
473 write (exg_name,
'(a,i0)')
'GWE-GWE_', exg_id
474 if (.not. both_remote)
then
480 write (exg_name,
'(a,i0)')
'SWF-GWF_', exg_id
482 call swfgwf_cr(fname, exg_name, exg_id, m1_id, m2_id, exg_mempath)
485 write (errmsg,
'(a,a)') &
486 'Unknown simulation exchange type: ', trim(exgtype)
487 call store_error(errmsg, terminate)
492 write (iout,
'(1x,a)')
'END OF SIMULATION EXCHANGES'
This module contains the GweGweExchangeModule Module.
subroutine, public gweexchange_create(filename, name, id, m1_id, m2_id, input_mempath)
@ brief Create GWT GWT exchange
subroutine, public gwfgwe_cr(filename, id, m1_id, m2_id)
Create a new GWF to GWE exchange object.
This module contains the GwfGwfExchangeModule Module.
subroutine, public gwfexchange_create(filename, name, id, m1_id, m2_id, input_mempath)
@ brief Create GWF GWF exchange
subroutine, public gwfgwt_cr(filename, id, m1_id, m2_id)
Create a new GWF to GWT exchange object.
subroutine, public gwfprt_cr(filename, id, m1id, m2id)
Create a new GWF to PRT exchange object.
This module contains the GwtGwtExchangeModule Module.
subroutine, public gwtexchange_create(filename, name, id, m1_id, m2_id, input_mempath)
@ brief Create GWT GWT exchange
This module contains the SwfGwfExchangeModule Module.
subroutine, public swfgwf_cr(filename, name, id, m1_id, m2_id, input_mempath)
@ brief Create SWF GWF exchange
subroutine, public add_virtual_gwe_exchange(name, exchange_id, model1_id, model2_id)
Add a virtual GWE-GWE exchange to the simulation.
subroutine, public add_virtual_gwf_exchange(name, exchange_id, model1_id, model2_id)
Add a virtual GWF-GWF exchange to the simulation.
subroutine, public add_virtual_gwt_exchange(name, exchange_id, model1_id, model2_id)
Add a virtual GWT-GWT exchange to the simulation.