45 call model_dynamic_input%df()
61 call model_dynamic_input%rp()
77 call model_dynamic_input%ad()
92 integer(I4B),
intent(in) :: iout
95 character(len=LENCOMPONENTNAME) :: exg_comp, exg_subcomp
96 character(len=LENMEMPATH) :: input_mempath, mempath
104 call mem_setptr(mempaths,
'EXGMEMPATHS', input_mempath)
105 do n = 1,
size(mempaths)
106 mempath = mempaths(n)
107 if (mempath /=
'')
then
128 integer(I4B),
intent(in) :: itype
129 integer(I4B),
intent(in) :: ipkg
130 integer(I4B),
intent(in) :: iout
136 nullify (dynamic_pkgs)
141 model_pkg_inputs%pkglist(itype)%subcomponent_type, &
142 model_pkg_inputs%modelname, &
143 model_pkg_inputs%pkglist(itype)%pkgnames(ipkg), &
144 model_pkg_inputs%pkglist(itype)%pkgtype, &
145 model_pkg_inputs%pkglist(itype)%filenames(ipkg), &
146 model_pkg_inputs%modelfname)
149 dynamic_loader => static_loader%load(iout)
151 if (
associated(dynamic_loader))
then
155 static_loader%component_input_name, &
159 call dynamic_pkgs%add(dynamic_loader)
164 call static_loader%destroy()
165 deallocate (static_loader)
178 integer(i4B),
intent(in) :: iout
179 integer(I4B) :: itype, ipkg
182 do itype = 1,
size(model_pkg_inputs%pkglist)
185 do ipkg = 1, model_pkg_inputs%pkglist(itype)%pnum
188 model_pkg_inputs%pkglist(itype)%subcomponent_type)) &
196 model_pkg_inputs%pkglist(itype)%inunits(ipkg) = &
198 model_pkg_inputs%pkglist(itype)%filenames(ipkg), &
199 model_pkg_inputs%modelfname, iout)
220 integer(I4B),
dimension(:),
intent(in) :: model_loadmask
221 integer(I4B),
intent(in) :: iout
223 character(len=LENMEMPATH) :: input_mempath
230 character(len=LINELENGTH) :: mtype, mfname
231 character(len=LENMODELNAME) :: mname
239 call mem_setptr(mtypes,
'MTYPE', input_mempath)
240 call mem_setptr(mfnames,
'MFNAME', input_mempath)
241 call mem_setptr(mnames,
'MNAME', input_mempath)
243 do n = 1,
size(mtypes)
251 if (model_loadmask(n) > 0)
then
257 allocate (model_pkg_inputs)
258 call model_pkg_inputs%init(mtype, mfname, mname, iout)
264 call model_pkg_inputs%memload()
267 call model_pkg_inputs%destroy()
268 deallocate (model_pkg_inputs)
288 integer(I4B),
dimension(:),
intent(in) :: model_loadmask
289 integer(I4B),
intent(in) :: iout
307 character(len=LENMEMPATH) :: input_mempath, mempath
308 integer(I4B),
pointer :: exgid, ncelldim
309 character(len=LINELENGTH) :: exgtype, efname, mfname
310 character(len=LENMODELNAME) :: mname1, mname2, mname
311 character(len=LENCOMPONENTNAME) :: sc_type, sc_name, mtype
314 integer(I4B) :: n, m1_idx, m2_idx, irem, isize
320 call mem_setptr(etypes,
'EXGTYPE', input_mempath)
321 call mem_setptr(efiles,
'EXGFILE', input_mempath)
322 call mem_setptr(emnames_a,
'EXGMNAMEA', input_mempath)
323 call mem_setptr(emnames_b,
'EXGMNAMEB', input_mempath)
324 call mem_setptr(mtypes,
'MTYPE', input_mempath)
325 call mem_setptr(mfnames,
'MFNAME', input_mempath)
326 call mem_setptr(mnames,
'MNAME', input_mempath)
333 do n = 1,
size(etypes)
338 mname1 = emnames_a(n)
339 mname2 = emnames_b(n)
349 if (m1_idx <= 0 .or. m2_idx <= 0)
then
350 errmsg =
'Exchange has invalid (unrecognized) model name(s):'
351 if (m1_idx <= 0) errmsg = trim(errmsg)//
' '//trim(mname1)
352 if (m2_idx <= 0) errmsg = trim(errmsg)//
' '//trim(mname2)
358 if (model_loadmask(m1_idx) > 0 .or. model_loadmask(m2_idx) > 0)
then
361 if (model_loadmask(m1_idx) == 0)
then
363 else if (model_loadmask(m2_idx) == 0)
then
370 mfname = mfnames(irem)
373 call get_isize(
'NCELLDIM', mempath, isize)
378 call mem_setptr(ncelldim,
'NCELLDIM', mempath)
386 write (sc_name,
'(a,i0)') trim(sc_type)//
'_', n
390 emempaths(n) = mempath
400 dynamic_loader => static_loader%load(iout)
402 if (
associated(dynamic_loader))
then
403 errmsg =
'IDM unimplemented. Dynamic Exchanges not supported.'
407 call static_loader%destroy()
408 deallocate (static_loader)
416 do n = 1,
size(mnames)
417 if (model_loadmask(n) == 0)
then
420 call get_isize(
'NCELLDIM', mempath, isize)
422 call mem_setptr(ncelldim,
'NCELLDIM', mempath)
436 integer(I4B),
intent(inout) :: paramlog
469 result(model_dynamic_input)
471 character(len=*),
intent(in) :: modelname
472 character(len=*),
intent(in) :: modelfname
473 integer(I4B),
intent(in) :: iout
479 nullify (model_dynamic_input)
484 if (temp%modelname == modelname)
then
485 model_dynamic_input => temp
491 if (.not.
associated(model_dynamic_input))
then
492 allocate (model_dynamic_input)
493 call model_dynamic_input%init(modelname, modelfname, iout)
505 integer(I4B),
intent(in) :: iout
511 call model_dynamic_input%destroy()
512 deallocate (model_dynamic_input)
513 nullify (model_dynamic_input)
528 character(len=LENMEMPATH) :: simnam_mempath
529 integer(I4B) :: paramlog
530 integer(I4B),
pointer :: p
534 call mem_setptr(p,
'PRINT_INPUT', simnam_mempath)
548 character(len=LENMEMPATH) :: sim_mempath, simnam_mempath
553 integer(I4B),
pointer :: nummodels
554 integer(I4B),
pointer :: numexchanges
558 nullify (numexchanges)
565 call mem_setptr(mtypes,
'MTYPE', simnam_mempath)
566 call mem_setptr(etypes,
'EXGTYPE', simnam_mempath)
570 call mem_allocate(numexchanges,
'NUMEXCHANGES', sim_mempath)
573 nummodels =
size(mtypes)
574 numexchanges =
size(etypes)
585 character(len=LENMEMPATH),
intent(in) :: input_mempath
587 integer(I4B),
pointer :: intvar
590 call mem_allocate(intvar, idt%mf6varname, input_mempath)
592 select case (idt%mf6varname)
604 write (errmsg,
'(a,a)') &
605 'Idm SIMNAM Load default value setting '&
606 &
'is unhandled for this variable: ', &
623 character(len=LENMEMPATH),
intent(in) :: input_mempath
625 character(len=LINELENGTH),
pointer :: cstr
627 pointer,
contiguous :: acharstr1d
632 case (
'KEYWORD',
'INTEGER')
634 if (idt%in_record)
then
644 if (idt%in_record)
then
658 write (errmsg,
'(a,a)') &
659 'IdmLoad allocate simnam param unhandled datatype: ', &
676 character(len=LENMEMPATH) :: input_mempath
679 integer(I4B) :: iparam, isize
688 do iparam = 1,
size(mf6_input%param_dfns)
691 idt => mf6_input%param_dfns(iparam)
694 call get_isize(idt%mf6varname, input_mempath, isize)
This module contains simulation constants.
integer(i4b), parameter linelength
maximum length of a standard line
integer(i4b), parameter lencomponentname
maximum length of a component name
integer(i4b), parameter lenmodelname
maximum length of the model name
integer(i4b), parameter lenexchangename
maximum length of the exchange name
integer(i4b), parameter lenmempath
maximum length of the memory path
This module contains the DefinitionSelectModule.
character(len=linelength) function, public idt_datatype(idt)
return input definition type datatype
logical function, public idm_integrated(component, subcomponent)
This module contains the IdmLoadModule.
subroutine, public simnam_load(paramlog)
MODFLOW 6 mfsim.nam input load routine.
type(listtype) model_dynamic_pkgs
integer(i4b) function input_param_log()
return sim input context PRINT_INTPUT value
subroutine load_model_pkgs(model_pkg_inputs, iout)
load integrated model package files
subroutine, public idm_da(iout)
idm deallocate routine
subroutine, public idm_df()
advance package dynamic data for period steps
subroutine, public simtdis_load()
MODFLOW 6 tdis input load routine.
subroutine, public idm_rp()
load package dynamic data for period
subroutine, public idm_ad()
advance package dynamic data for period steps
subroutine simnam_load_dim()
load simulation summary info to input context
subroutine model_pkg_load(model_pkg_inputs, itype, ipkg, iout)
load an integrated model package from supported source
subroutine allocate_simnam_int(input_mempath, idt)
set sim nam input context default integer value
subroutine, public load_models(model_loadmask, iout)
load model namfiles and model package files
subroutine dynamic_da(iout)
deallocate all model dynamic loader collections
class(modeldynamicpkgstype) function, pointer dynamic_model_pkgs(modelname, modelfname, iout)
retrieve list of model dynamic loaders
subroutine simnam_allocate()
MODFLOW 6 mfsim.nam input context parameter allocation.
subroutine, public load_exchanges(model_loadmask, iout)
load exchange files
subroutine allocate_simnam_param(input_mempath, idt)
MODFLOW 6 mfsim.nam parameter allocate and set.
This module defines variable data types.
character(len=lenmempath) function create_mem_path(component, subcomponent, context)
returns the path to the memory object
subroutine split_mem_path(mem_path, component, subcomponent)
Split the memory path into component(s)
subroutine, public memorylist_remove(component, subcomponent, context)
subroutine, public get_isize(name, mem_path, isize)
@ brief Get the number of elements for this variable
This module contains simulation methods.
subroutine, public store_error(msg, terminate)
Store an error message.
subroutine, public store_error_filename(filename, terminate)
Store the erroring file name.
This module contains simulation variables.
character(len=maxcharlen) errmsg
error message string
character(len=linelength) idm_context
integer(i4b) isimcheck
simulation input check flag (1) to check input, (0) to ignore checks
integer(i4b) isimcontinue
simulation continue flag (1) to continue if isimcnvg = 0, (0) to terminate
character(len=linelength) simfile
simulation name file
This module contains the SourceCommonModule.
character(len=lencomponentname) function, public idm_subcomponent_type(component, subcomponent)
component from package or model type
character(len=lencomponentname) function, public idm_component_type(component)
component from package or model type
integer(i4b) function, public ifind_charstr(array, str)
This module contains the SourceLoadModule.
subroutine, public load_simnam()
class(staticpkgloadbasetype) function, pointer, public create_input_loader(component_type, subcomponent_type, component_name, subcomponent_name, input_type, input_fname, component_fname)
factory function to create and setup model package static loader
integer(i4b) function, public open_source_file(pkgtype, filename, modelfname, iout)
subroutine, public load_simtdis()
integer(i4b) function, public remote_model_ndim(mtype, mfname)
subroutine, public load_modelnam(mtype, mfname, mname, iout)
This class is used to store a single deferred-length character string. It was designed to work in an ...
A generic heterogeneous doubly-linked list.