MODFLOW 6  version 6.7.0.dev3
USGS Modular Hydrologic Model
InputLoadType.f90
Go to the documentation of this file.
1 !> @brief This module contains the InputLoadTypeModule
2 !!
3 !! This module defines types that support generic IDM
4 !! static and dynamic input loading.
5 !!
6 !<
8 
9  use kindmodule, only: dp, i4b, lgp
12  use simvariablesmodule, only: errmsg
15  use listmodule, only: listtype
18 
19  implicit none
20  private
21  public :: staticpkgloadbasetype
22  public :: dynamicpkgloadbasetype
23  public :: modeldynamicpkgstype
26  public :: model_inputs
27 
28  !> @brief type representing package subpackage list
30  character(len=LENCOMPONENTNAME), dimension(:), allocatable :: pkgtypes
31  character(len=LENCOMPONENTNAME), dimension(:), allocatable :: component_types
32  character(len=LENCOMPONENTNAME), dimension(:), &
33  allocatable :: subcomponent_types
34  character(len=LINELENGTH), dimension(:), allocatable :: filenames
35  character(len=LENMEMPATH) :: mempath
36  character(len=LENCOMPONENTNAME) :: component_name
37  integer(I4B) :: pnum
38  contains
39  procedure :: create => subpkg_create
40  procedure :: add => subpkg_add
41  procedure :: destroy => subpkg_destroy
42  end type subpackagelisttype
43 
44  !> @brief Static loader type
45  !!
46  !! This type is a base concrete type for a static input loader
47  !!
48  !<
50  type(modflowinputtype) :: mf6_input !< description of modflow6 input
51  type(ncpackagevarstype), pointer :: nc_vars => null()
52  character(len=LENCOMPONENTNAME) :: component_name !< name of component
53  character(len=LINELENGTH) :: component_input_name !< component input name, e.g. model name file
54  character(len=LINELENGTH) :: input_name !< input name, e.g. package *.chd file
55  integer(I4B) :: iperblock !< index of period block on block definition list
56  type(subpackagelisttype) :: subpkg_list !< list of input subpackages
57  contains
58  procedure :: init => static_init
59  procedure :: create_subpkg_list
60  procedure :: destroy => static_destroy
61  end type staticpkgloadtype
62 
63  !> @brief Base abstract type for static input loader
64  !!
65  !! IDM sources should extend and implement this type
66  !!
67  !<
68  type, abstract, extends(staticpkgloadtype) :: staticpkgloadbasetype
69  contains
70  procedure(load_if), deferred :: load
71  end type staticpkgloadbasetype
72 
73  !> @brief Dynamic loader type
74  !!
75  !! This type is a base concrete type for a dynamic (period) input loader
76  !!
77  !<
79  type(modflowinputtype) :: mf6_input !< description of modflow6 input
80  type(ncpackagevarstype), pointer :: nc_vars => null()
81  character(len=LENCOMPONENTNAME) :: component_name !< name of component
82  character(len=LINELENGTH) :: component_input_name !< component input name, e.g. model name file
83  character(len=LINELENGTH) :: input_name !< input name, e.g. package *.chd file
84  character(len=LINELENGTH), dimension(:), allocatable :: param_names !< dynamic param tagnames
85  logical(LGP) :: readasarrays !< readasarrays style input package
86  logical(LGP) :: readarraygrid !< readarraygrid style input package
87  logical(LGP) :: has_setting !< period block contains setting keystring param
88  integer(I4B) :: iperblock !< index of period block on block definition list
89  integer(I4B) :: iout !< inunit number for logging
90  integer(I4B) :: nparam !< number of in scope params
91  contains
92  procedure :: init => dynamic_init
93  procedure :: df => dynamic_df
94  procedure :: ad => dynamic_ad
95  procedure :: destroy => dynamic_destroy
96  end type dynamicpkgloadtype
97 
98  !> @brief Base abstract type for dynamic input loader
99  !!
100  !! IDM sources should extend and implement this type
101  !!
102  !<
103  type, abstract, extends(dynamicpkgloadtype) :: dynamicpkgloadbasetype
104  contains
105  procedure(period_load_if), deferred :: rp
106  end type dynamicpkgloadbasetype
107 
108  !> @brief load interfaces for source static and dynamic types
109  !<
110  abstract interface
111  function load_if(this, iout) result(dynamic_loader)
113  class(staticpkgloadbasetype), intent(inout) :: this
114  integer(I4B), intent(in) :: iout
115  class(dynamicpkgloadbasetype), pointer :: dynamic_loader
116  end function load_if
117  subroutine period_load_if(this)
118  import dynamicpkgloadbasetype, i4b
119  class(dynamicpkgloadbasetype), intent(inout) :: this
120  end subroutine
121  end interface
122 
123  !> @brief type for storing a dynamic package load list
124  !!
125  !! This type is used to store a list of package
126  !! dynamic load types for a model
127  !!
128  !<
130  character(len=LENCOMPONENTNAME) :: modeltype !< type of model
131  character(len=LENMODELNAME) :: modelname !< name of model
132  character(len=LINELENGTH) :: modelfname !< name of model input file
133  type(listtype) :: pkglist !< model package list
134  character(len=LINELENGTH) :: nc_fname !< name of model netcdf input
135  integer(I4B) :: ncid !< netcdf file handle
136  integer(I4B) :: iout
137  contains
138  procedure :: init => dynamicpkgs_init
139  procedure :: add => dynamicpkgs_add
140  procedure :: get => dynamicpkgs_get
141  procedure :: rp => dynamicpkgs_rp
142  procedure :: df => dynamicpkgs_df
143  procedure :: ad => dynamicpkgs_ad
144  procedure :: size => dynamicpkgs_size
145  procedure :: destroy => dynamicpkgs_destroy
146  end type modeldynamicpkgstype
147 
149 
150 contains
151 
152  !> @brief create a new package type
153  !<
154  subroutine subpkg_create(this, mempath, component_name)
155  class(subpackagelisttype) :: this
156  character(len=*), intent(in) :: mempath
157  character(len=*), intent(in) :: component_name
158 
159  ! initialize
160  this%pnum = 0
161  this%mempath = mempath
162  this%component_name = component_name
163 
164  ! allocate arrays
165  allocate (this%pkgtypes(0))
166  allocate (this%component_types(0))
167  allocate (this%subcomponent_types(0))
168  allocate (this%filenames(0))
169  end subroutine subpkg_create
170 
171  !> @brief create a new package type
172  !<
173  subroutine subpkg_add(this, pkgtype, component_type, subcomponent_type, &
174  tagname, filename)
179  class(subpackagelisttype) :: this
180  character(len=*), intent(in) :: pkgtype
181  character(len=*), intent(in) :: component_type
182  character(len=*), intent(in) :: subcomponent_type
183  character(len=*), intent(in) :: tagname
184  character(len=*), intent(in) :: filename
185  character(len=LENVARNAME) :: mempath_tag
186  character(len=LENMEMPATH), pointer :: subpkg_mempath
187  character(len=LINELENGTH), pointer :: input_fname
188  integer(I4B) :: idx, trimlen
189 
190  ! reallocate
191  call expandarray(this%pkgtypes)
192  call expandarray(this%component_types)
193  call expandarray(this%subcomponent_types)
194  call expandarray(this%filenames)
195 
196  ! add new package instance
197  this%pnum = this%pnum + 1
198  this%pkgtypes(this%pnum) = pkgtype
199  this%component_types(this%pnum) = component_type
200  this%subcomponent_types(this%pnum) = subcomponent_type
201  this%filenames(this%pnum) = filename
202 
203  ! initialize mempath tag
204  mempath_tag = tagname
205  trimlen = len_trim(tagname)
206  idx = 0
207 
208  ! create mempath tagname
209  idx = index(tagname, '_')
210  if (idx > 0) then
211  if (tagname(idx + 1:trimlen) == 'FILENAME') then
212  write (mempath_tag, '(a)') tagname(1:idx)//'MEMPATH'
213  end if
214  end if
215 
216  ! allocate mempath variable for subpackage
217  call mem_allocate(subpkg_mempath, lenmempath, mempath_tag, &
218  this%mempath)
219 
220  ! create and set the mempath
221  subpkg_mempath = &
222  create_mem_path(this%component_name, &
223  subcomponent_type, idm_context)
224 
225  ! allocate and initialize filename for subpackage
226  call mem_allocate(input_fname, linelength, 'INPUT_FNAME', subpkg_mempath)
227  input_fname = filename
228  end subroutine subpkg_add
229 
230  !> @brief create a new package type
231  !<
232  subroutine subpkg_destroy(this)
233  class(subpackagelisttype) :: this
234  ! allocate arrays
235  deallocate (this%pkgtypes)
236  deallocate (this%component_types)
237  deallocate (this%subcomponent_types)
238  deallocate (this%filenames)
239  end subroutine subpkg_destroy
240 
241  !> @brief initialize static package loader
242  !!
243  !<
244  subroutine static_init(this, mf6_input, component_name, component_input_name, &
245  input_name)
246  class(staticpkgloadtype), intent(inout) :: this
247  type(modflowinputtype), intent(in) :: mf6_input
248  character(len=*), intent(in) :: component_name
249  character(len=*), intent(in) :: component_input_name
250  character(len=*), intent(in) :: input_name
251  integer(I4B) :: iblock
252 
253  this%mf6_input = mf6_input
254  this%component_name = component_name
255  this%component_input_name = component_input_name
256  this%input_name = input_name
257  this%iperblock = 0
258 
259  ! create subpackage list
260  call this%subpkg_list%create(this%mf6_input%mempath, &
261  this%mf6_input%component_name)
262 
263  ! identify period block definition
264  do iblock = 1, size(mf6_input%block_dfns)
265  if (mf6_input%block_dfns(iblock)%blockname == 'PERIOD') then
266  this%iperblock = iblock
267  exit
268  end if
269  end do
270  end subroutine static_init
271 
272  !> @brief create the subpackage list
273  !!
274  !<
275  subroutine create_subpkg_list(this)
279  class(staticpkgloadtype), intent(inout) :: this
280  character(len=16), dimension(:), pointer :: subpkgs
281  character(len=LINELENGTH) :: tag, fname, pkgtype
282  character(len=LENFTYPE) :: c_type, sc_type
283  character(len=16) :: subpkg
284  integer(I4B) :: idx, n
285 
286  ! set pointer to package (idm integrated) subpackage list
287  subpkgs => idm_subpackages(this%mf6_input%component_type, &
288  this%mf6_input%subcomponent_type)
289 
290  ! check if tag matches subpackage
291  do n = 1, size(subpkgs)
292  subpkg = subpkgs(n)
293  idx = index(subpkg, '-')
294  ! split sp string into component/subcomponent
295  if (idx > 0) then
296  ! split string in component/subcomponent types
297  c_type = subpkg(1:idx - 1)
298  sc_type = subpkg(idx + 1:len_trim(subpkg))
299  if (idm_integrated(c_type, sc_type)) then
300  ! set pkgtype and input filename tag
301  pkgtype = trim(sc_type)//'6'
302  tag = trim(pkgtype)//'_FILENAME'
303  ! support single instance of each subpackage
304  if (idm_multi_package(c_type, sc_type)) then
305  errmsg = 'Multi-instance subpackages not supported. Remove dfn &
306  &subpackage tagline for package "'//trim(subpkg)//'".'
307  call store_error(errmsg)
308  call store_error_filename(this%input_name)
309  else
310  if (filein_fname(fname, tag, this%mf6_input%mempath, &
311  this%input_name)) then
312  call this%subpkg_list%add(pkgtype, c_type, sc_type, &
313  trim(tag), trim(fname))
314  end if
315  end if
316  else
317  errmsg = 'Identified subpackage is not IDM integrated. Remove dfn &
318  &subpackage tagline for package "'//trim(subpkg)//'".'
319  call store_error(errmsg)
320  call store_error_filename(this%input_name)
321  end if
322  end if
323  end do
324  end subroutine create_subpkg_list
325 
326  subroutine static_destroy(this)
327  class(staticpkgloadtype), intent(inout) :: this
328  call this%subpkg_list%destroy()
329  if (associated(this%nc_vars)) then
330  call this%nc_vars%destroy()
331  deallocate (this%nc_vars)
332  nullify (this%nc_vars)
333  end if
334  end subroutine static_destroy
335 
336  !> @brief initialize dynamic package loader
337  !!
338  !! Any managed memory pointed to from model/package context
339  !! must be allocated when dynamic loader is initialized.
340  !!
341  !<
342  subroutine dynamic_init(this, mf6_input, component_name, component_input_name, &
343  input_name, iperblock, iout)
344  use simvariablesmodule, only: errmsg
347  class(dynamicpkgloadtype), intent(inout) :: this
348  type(modflowinputtype), intent(in) :: mf6_input
349  character(len=*), intent(in) :: component_name
350  character(len=*), intent(in) :: component_input_name
351  character(len=*), intent(in) :: input_name
352  integer(I4B), intent(in) :: iperblock
353  integer(I4B), intent(in) :: iout
354  type(inputparamdefinitiontype), pointer :: idt
355  integer(I4B) :: iparam, ilen
356 
357  this%mf6_input = mf6_input
358  this%component_name = component_name
359  this%component_input_name = component_input_name
360  this%input_name = input_name
361  this%readasarrays = .false.
362  this%readarraygrid = .false.
363  this%has_setting = .false.
364  this%iperblock = iperblock
365  this%nparam = 0
366  this%iout = iout
367  nullify (idt)
368 
369  ! throw error and exit if not found
370  if (this%iperblock == 0) then
371  write (errmsg, '(a,a)') &
372  'Programming error. (IDM) PERIOD block not found in '&
373  &'dynamic package input block dfns: ', &
374  trim(mf6_input%subcomponent_name)
375  call store_error(errmsg)
376  call store_error_filename(this%input_name)
377  end if
378 
379  ! set readasarrays and readarraygrid
380  if (mf6_input%block_dfns(iperblock)%aggregate) then
381  ! no-op
382  else
383  do iparam = 1, size(mf6_input%param_dfns)
384  idt => mf6_input%param_dfns(iparam)
385  if (idt%blockname == 'OPTIONS') then
386  select case (idt%tagname)
387  case ('READASARRAYS')
388  this%readasarrays = .true.
389  case ('READARRAYGRID')
390  this%readarraygrid = .true.
391  case default
392  ! no-op
393  end select
394  end if
395  end do
396  end if
397 
398  ! determine if has setting type
399  do iparam = 1, size(mf6_input%param_dfns)
400  idt => mf6_input%param_dfns(iparam)
401  if (idt%blockname == 'PERIOD') then
402  if (idt_datatype(idt) == 'KEYSTRING') then
403  ilen = len_trim(idt%tagname)
404  if (idt%tagname(ilen - 6:ilen) == 'SETTING') then
405  this%has_setting = .true.
406  end if
407  end if
408  end if
409  end do
410  end subroutine dynamic_init
411 
412  !> @brief dynamic package loader define
413  !!
414  !<
415  subroutine dynamic_df(this)
416  class(dynamicpkgloadtype), intent(inout) :: this
417  ! override in derived type
418  end subroutine dynamic_df
419 
420  !> @brief dynamic package loader advance
421  !!
422  !<
423  subroutine dynamic_ad(this)
424  class(dynamicpkgloadtype), intent(inout) :: this
425  ! override in derived type
426  end subroutine dynamic_ad
427 
428  !> @brief dynamic package loader destroy
429  !!
430  !<
431  subroutine dynamic_destroy(this)
435  class(dynamicpkgloadtype), intent(inout) :: this
436 
437  ! clean up netcdf variables structure
438  if (associated(this%nc_vars)) then
439  call this%nc_vars%destroy()
440  deallocate (this%nc_vars)
441  nullify (this%nc_vars)
442  end if
443 
444  ! deallocate package static and dynamic input context
445  call memorystore_remove(this%mf6_input%component_name, &
446  this%mf6_input%subcomponent_name, &
447  idm_context)
448  end subroutine dynamic_destroy
449 
450  !> @brief model dynamic packages init
451  !!
452  !<
453  subroutine dynamicpkgs_init(this, modeltype, modelname, modelfname, nc_fname, &
454  ncid, iout)
455  class(modeldynamicpkgstype), intent(inout) :: this
456  character(len=*), intent(in) :: modeltype
457  character(len=*), intent(in) :: modelname
458  character(len=*), intent(in) :: modelfname
459  character(len=*), intent(in) :: nc_fname
460  integer(I4B), intent(in) :: ncid
461  integer(I4B), intent(in) :: iout
462  this%modeltype = modeltype
463  this%modelname = modelname
464  this%modelfname = modelfname
465  this%nc_fname = nc_fname
466  this%ncid = ncid
467  this%iout = iout
468  end subroutine dynamicpkgs_init
469 
470  !> @brief add package to model dynamic packages list
471  !!
472  !<
473  subroutine dynamicpkgs_add(this, dynamic_pkg)
474  class(modeldynamicpkgstype), intent(inout) :: this
475  class(dynamicpkgloadbasetype), pointer, intent(inout) :: dynamic_pkg
476  class(*), pointer :: obj
477  obj => dynamic_pkg
478  call this%pkglist%add(obj)
479  end subroutine dynamicpkgs_add
480 
481  !> @brief retrieve package from model dynamic packages list
482  !!
483  !<
484  function dynamicpkgs_get(this, idx) result(res)
485  class(modeldynamicpkgstype), intent(inout) :: this
486  integer(I4B), intent(in) :: idx
487  class(dynamicpkgloadbasetype), pointer :: res
488  class(*), pointer :: obj
489  nullify (res)
490  obj => this%pkglist%GetItem(idx)
491  if (associated(obj)) then
492  select type (obj)
493  class is (dynamicpkgloadbasetype)
494  res => obj
495  end select
496  end if
497  end function dynamicpkgs_get
498 
499  !> @brief read and prepare model dynamic packages
500  !!
501  !<
502  subroutine dynamicpkgs_rp(this)
504  class(modeldynamicpkgstype), intent(inout) :: this
505  class(dynamicpkgloadbasetype), pointer :: dynamic_pkg
506  integer(I4B) :: n
507  call idm_log_period_header(this%modelname, this%iout)
508  do n = 1, this%pkglist%Count()
509  dynamic_pkg => this%get(n)
510  call dynamic_pkg%rp()
511  end do
512  call idm_log_period_close(this%iout)
513  end subroutine dynamicpkgs_rp
514 
515  !> @brief define model dynamic packages
516  !!
517  !<
518  subroutine dynamicpkgs_df(this)
519  class(modeldynamicpkgstype), intent(inout) :: this
520  class(dynamicpkgloadbasetype), pointer :: dynamic_pkg
521  integer(I4B) :: n
522  do n = 1, this%pkglist%Count()
523  dynamic_pkg => this%get(n)
524  call dynamic_pkg%df()
525  end do
526  end subroutine dynamicpkgs_df
527 
528  !> @brief advance model dynamic packages
529  !!
530  !<
531  subroutine dynamicpkgs_ad(this)
532  class(modeldynamicpkgstype), intent(inout) :: this
533  class(dynamicpkgloadbasetype), pointer :: dynamic_pkg
534  integer(I4B) :: n
535  do n = 1, this%pkglist%Count()
536  dynamic_pkg => this%get(n)
537  call dynamic_pkg%ad()
538  end do
539  end subroutine dynamicpkgs_ad
540 
541  !> @brief get size of model dynamic packages list
542  !!
543  !<
544  function dynamicpkgs_size(this) result(size)
545  class(modeldynamicpkgstype), intent(inout) :: this
546  integer(I4B) :: size
547  size = this%pkglist%Count()
548  end function dynamicpkgs_size
549 
550  !> @brief destroy model dynamic packages object
551  !!
552  !<
553  subroutine dynamicpkgs_destroy(this)
554  class(modeldynamicpkgstype), intent(inout) :: this
555  class(dynamicpkgloadbasetype), pointer :: dynamic_pkg
556  integer(I4B) :: n
557  ! destroy dynamic loaders
558  do n = 1, this%pkglist%Count()
559  dynamic_pkg => this%get(n)
560  call dynamic_pkg%destroy()
561  deallocate (dynamic_pkg)
562  nullify (dynamic_pkg)
563  end do
564  call this%pkglist%Clear()
565  end subroutine dynamicpkgs_destroy
566 
567  !> @brief add model dynamic packages object to list
568  !!
569  !<
570  subroutine adddynamicmodeltolist(list, model_dynamic)
571  type(listtype), intent(inout) :: list !< package list
572  class(modeldynamicpkgstype), pointer, intent(inout) :: model_dynamic
573  class(*), pointer :: obj
574  obj => model_dynamic
575  call list%Add(obj)
576  end subroutine adddynamicmodeltolist
577 
578  !> @brief get model dynamic packages object from list
579  !!
580  !<
581  function getdynamicmodelfromlist(list, idx) result(res)
582  type(listtype), intent(inout) :: list !< spd list
583  integer(I4B), intent(in) :: idx !< package number
584  class(modeldynamicpkgstype), pointer :: res
585  class(*), pointer :: obj
586  ! initialize res
587  nullify (res)
588  ! get the object from the list
589  obj => list%GetItem(idx)
590  if (associated(obj)) then
591  select type (obj)
592  class is (modeldynamicpkgstype)
593  res => obj
594  end select
595  end if
596  end function getdynamicmodelfromlist
597 
598 end module inputloadtypemodule
subroutine init()
Definition: GridSorting.f90:24
load interfaces for source static and dynamic types
This module contains simulation constants.
Definition: Constants.f90:9
integer(i4b), parameter linelength
maximum length of a standard line
Definition: Constants.f90:45
integer(i4b), parameter lencomponentname
maximum length of a component name
Definition: Constants.f90:18
integer(i4b), parameter lenmodelname
maximum length of the model name
Definition: Constants.f90:22
integer(i4b), parameter lenvarname
maximum length of a variable name
Definition: Constants.f90:17
integer(i4b), parameter lenftype
maximum length of a package type (DIS, WEL, OC, etc.)
Definition: Constants.f90:39
integer(i4b), parameter lenmempath
maximum length of the memory path
Definition: Constants.f90:27
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)
logical function, public idm_multi_package(component, subcomponent)
character(len=16) function, dimension(:), pointer, public idm_subpackages(component, subcomponent)
This module contains the Input Data Model Logger Module.
Definition: IdmLogger.f90:7
subroutine, public idm_log_period_header(component, iout)
@ brief log a dynamic header message
Definition: IdmLogger.f90:67
subroutine, public idm_log_period_close(iout)
@ brief log the period closing message
Definition: IdmLogger.f90:79
This module contains the InputDefinitionModule.
This module contains the InputLoadTypeModule.
subroutine dynamic_ad(this)
dynamic package loader advance
subroutine static_init(this, mf6_input, component_name, component_input_name, input_name)
initialize static package loader
subroutine subpkg_destroy(this)
create a new package type
subroutine dynamicpkgs_init(this, modeltype, modelname, modelfname, nc_fname, ncid, iout)
model dynamic packages init
class(modeldynamicpkgstype) function, pointer, public getdynamicmodelfromlist(list, idx)
get model dynamic packages object from list
subroutine create_subpkg_list(this)
create the subpackage list
integer(i4b) function dynamicpkgs_size(this)
get size of model dynamic packages list
subroutine dynamic_init(this, mf6_input, component_name, component_input_name, input_name, iperblock, iout)
initialize dynamic package loader
type(listtype), public model_inputs
subroutine, public adddynamicmodeltolist(list, model_dynamic)
add model dynamic packages object to list
subroutine dynamicpkgs_add(this, dynamic_pkg)
add package to model dynamic packages list
subroutine dynamicpkgs_rp(this)
read and prepare model dynamic packages
subroutine subpkg_create(this, mempath, component_name)
create a new package type
subroutine static_destroy(this)
subroutine subpkg_add(this, pkgtype, component_type, subcomponent_type, tagname, filename)
create a new package type
subroutine dynamicpkgs_destroy(this)
destroy model dynamic packages object
class(dynamicpkgloadbasetype) function, pointer dynamicpkgs_get(this, idx)
retrieve package from model dynamic packages list
subroutine dynamicpkgs_ad(this)
advance model dynamic packages
subroutine dynamic_destroy(this)
dynamic package loader destroy
subroutine dynamic_df(this)
dynamic package loader define
subroutine dynamicpkgs_df(this)
define model dynamic packages
This module defines variable data types.
Definition: kind.f90:8
character(len=lenmempath) function create_mem_path(component, subcomponent, context)
returns the path to the memory object
subroutine, public memorystore_remove(component, subcomponent, context)
This module contains the ModflowInputModule.
Definition: ModflowInput.f90:9
This module contains the NCFileVarsModule.
Definition: NCFileVars.f90:7
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_filename(filename, terminate)
Store the erroring file name.
Definition: Sim.f90:203
This module contains simulation variables.
Definition: SimVariables.f90:9
character(len=maxcharlen) errmsg
error message string
character(len=linelength) idm_context
This module contains the SourceCommonModule.
Definition: SourceCommon.f90:7
logical(lgp) function, public filein_fname(filename, tagname, input_mempath, input_fname)
enforce and set a single input filename provided via FILEIN keyword
Base abstract type for dynamic input loader.
type for storing a dynamic package load list
Base abstract type for static input loader.
type representing package subpackage list
A generic heterogeneous doubly-linked list.
Definition: List.f90:14
derived type for storing input definition for a file
Type describing input variables for a package in NetCDF file.
Definition: NCFileVars.f90:22