366 character(len=LENMEMPATH) :: input_mempath
367 type(CharacterStringType),
dimension(:),
contiguous, &
369 type(CharacterStringType),
dimension(:),
contiguous, &
371 type(CharacterStringType),
dimension(:),
contiguous, &
373 type(CharacterStringType),
dimension(:),
contiguous, &
375 type(CharacterStringType),
dimension(:),
contiguous, &
377 character(len=LINELENGTH) :: exgtype
378 integer(I4B) :: exg_id
379 integer(I4B) :: m1_id, m2_id
380 character(len=LINELENGTH) :: fname, name1, name2
381 character(len=LENEXCHANGENAME) :: exg_name
382 character(len=LENMEMPATH) :: exg_mempath
384 character(len=LINELENGTH) :: errmsg
385 logical(LGP) :: terminate = .true.
386 logical(LGP) :: both_remote, both_local
388 character(len=*),
parameter :: fmtmerr =
"('Error in simulation control ', &
389 &'file. Could not find model: ', a)"
395 call mem_setptr(etypes,
'EXGTYPE', input_mempath)
396 call mem_setptr(efiles,
'EXGFILE', input_mempath)
397 call mem_setptr(emnames_a,
'EXGMNAMEA', input_mempath)
398 call mem_setptr(emnames_b,
'EXGMNAMEB', input_mempath)
399 call mem_setptr(emempaths,
'EXGMEMPATHS', input_mempath)
402 write (iout,
'(/1x,a)')
'READING SIMULATION EXCHANGES'
408 do n = 1,
size(etypes)
415 exg_mempath = emempaths(n)
420 m1_id = ifind(model_names, name1)
422 write (errmsg, fmtmerr) trim(name1)
423 call store_error(errmsg, terminate)
425 m2_id = ifind(model_names, name2)
427 write (errmsg, fmtmerr) trim(name2)
428 call store_error(errmsg, terminate)
432 both_remote = (model_loc_idx(m1_id) == -1 .and. &
433 model_loc_idx(m2_id) == -1)
434 both_local = (model_loc_idx(m1_id) > 0 .and. &
435 model_loc_idx(m2_id) > 0)
436 if (.not. both_remote)
then
437 write (iout,
'(4x,a,a,i0,a,i0,a,i0)') trim(exgtype),
' exchange ', &
438 exg_id,
' will be created to connect model ', m1_id, &
439 ' with model ', m2_id
442 select case (exgtype)
444 write (exg_name,
'(a,i0)')
'CHF-GWF_', exg_id
446 call chfgwf_cr(fname, exg_name, exg_id, m1_id, m2_id, exg_mempath)
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)')
'OLF-GWF_', exg_id
482 call olfgwf_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 ChfGwfExchangeModule Module.
subroutine, public chfgwf_cr(filename, name, id, m1_id, m2_id, input_mempath)
@ brief Create CHF GWF exchange
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
character(len=lenmempath) function create_mem_path(component, subcomponent, context)
returns the path to the memory object
This module contains the OlfGwfExchangeModule Module.
subroutine, public olfgwf_cr(filename, name, id, m1_id, m2_id, input_mempath)
@ brief Create OLF GWF exchange
This module contains simulation variables.
character(len=linelength) idm_context
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.