MODFLOW 6  version 6.5.0.dev2
MODFLOW 6 Code Documentation
loadmf6filemodule Module Reference

This module contains the LoadMf6FileModule. More...

Data Types

type  loadmf6filetype
 Static parser based input loader. More...
 

Functions/Subroutines

subroutine load (this, parser, mf6_input, filename, iout)
 load all static input blocks More...
 
subroutine init (this, parser, mf6_input, filename, iout)
 init More...
 
subroutine load_block (this, iblk)
 load a single block More...
 
subroutine finalize (this)
 finalize More...
 
subroutine block_post_process (this, iblk)
 Post parse block handling. More...
 
recursive subroutine parse_block (this, iblk, recursive_call)
 parse block More...
 
subroutine parse_io_tag (this, iblk, pkgtype, which, tag)
 
subroutine parse_keyword_tag (this, iblk, tag, idt)
 
recursive subroutine parse_tag (this, iblk, recursive_call)
 load an individual input record into memory More...
 
type(inputparamdefinitiontype) function block_index_dfn (this, iblk)
 
subroutine parse_structarray_block (this, iblk)
 parse a structured array record into memory manager More...
 
subroutine load_keyword_type (parser, idt, memoryPath, iout)
 load type keyword More...
 
subroutine load_string_type (parser, idt, memoryPath, iout)
 load type string More...
 
subroutine load_io_tag (parser, idt, memoryPath, which, iout)
 load type string More...
 
subroutine load_auxvar_names (parser, idt, memoryPath, iout)
 load aux variable names More...
 
subroutine load_integer_type (parser, idt, memoryPath, iout)
 load type integer More...
 
subroutine load_integer1d_type (parser, idt, memoryPath, mshape, export, iout)
 load type 1d integer More...
 
subroutine load_integer2d_type (parser, idt, memoryPath, mshape, export, iout)
 load type 2d integer More...
 
subroutine load_integer3d_type (parser, idt, memoryPath, mshape, export, iout)
 load type 3d integer More...
 
subroutine load_double_type (parser, idt, memoryPath, iout)
 load type double More...
 
subroutine load_double1d_type (parser, idt, memoryPath, mshape, export, iout)
 load type 1d double More...
 
subroutine load_double2d_type (parser, idt, memoryPath, mshape, export, iout)
 load type 2d double More...
 
subroutine load_double3d_type (parser, idt, memoryPath, mshape, export, iout)
 load type 3d double More...
 
subroutine get_layered_shape (mshape, nlay, layer_shape)
 

Detailed Description

This module contains the input data model routines for loading static data from a MODFLOW 6 input file using the block parser.

Function/Subroutine Documentation

◆ block_index_dfn()

type(inputparamdefinitiontype) function loadmf6filemodule::block_index_dfn ( class(loadmf6filetype this,
integer(i4b), intent(in)  iblk 
)
private
Returns
input data type object describing this record

Definition at line 511 of file LoadMf6File.f90.

512  ! -- modules
513  ! -- dummy
514  class(LoadMf6FileType) :: this
515  integer(I4B), intent(in) :: iblk
516  ! -- local
517  type(InputParamDefinitionType) :: idt !< input data type object describing this record
518  character(len=LENVARNAME) :: varname
519  integer(I4B) :: ilen
520  character(len=3) :: block_suffix = 'NUM'
521  !
522  ! -- assign first column as the block number
523  ilen = len_trim(this%mf6_input%block_dfns(iblk)%blockname)
524  !
525  if (ilen > (lenvarname - len(block_suffix))) then
526  varname = &
527  this%mf6_input%block_dfns(iblk)% &
528  blockname(1:(lenvarname - len(block_suffix)))//block_suffix
529  else
530  varname = trim(this%mf6_input%block_dfns(iblk)%blockname)//block_suffix
531  end if
532  !
533  idt%component_type = trim(this%mf6_input%component_type)
534  idt%subcomponent_type = trim(this%mf6_input%subcomponent_type)
535  idt%blockname = trim(this%mf6_input%block_dfns(iblk)%blockname)
536  idt%tagname = varname
537  idt%mf6varname = varname
538  idt%datatype = 'INTEGER'
539  !
540  ! -- return
541  return

◆ block_post_process()

subroutine loadmf6filemodule::block_post_process ( class(loadmf6filetype this,
integer(i4b), intent(in)  iblk 
)

Definition at line 209 of file LoadMf6File.f90.

210  ! -- modules
211  use memorymanagermodule, only: get_isize
213  ! -- dummy
214  class(LoadMf6FileType) :: this
215  integer(I4B), intent(in) :: iblk
216  ! -- local
217  type(InputParamDefinitionType), pointer :: idt
218  integer(I4B) :: iparam, ts6_size, export_size
219  !
220  select case (this%mf6_input%block_dfns(iblk)%blockname)
221  case ('OPTIONS')
222  ! -- allocate naux and set to 0 if not allocated
223  do iparam = 1, size(this%mf6_input%param_dfns)
224  idt => this%mf6_input%param_dfns(iparam)
225  !
226  if (idt%blockname == 'OPTIONS' .and. &
227  idt%tagname == 'AUXILIARY') then
228  call mem_allocate_naux(this%mf6_input%mempath)
229  exit
230  end if
231  end do
232  !
233  ! -- determine if TS6 files were provided in OPTIONS block
234  call get_isize('TS6_FILENAME', this%mf6_input%mempath, ts6_size)
235  !
236  if (ts6_size > 0) then
237  this%ts_active = .true.
238  end if
239  !
240  ! -- determine if EXPORT options were provided
241  call get_isize('EXPORT_ASCII', this%mf6_input%mempath, export_size)
242  !
243  if (export_size > 0) then
244  this%export = .true.
245  end if
246  !
247  case ('DIMENSIONS')
248  ! -- set model shape if discretization dimensions have been read
249  if (this%mf6_input%pkgtype(1:3) == 'DIS') then
250  call set_model_shape(this%mf6_input%pkgtype, this%filename, &
251  this%mf6_input%component_mempath, &
252  this%mf6_input%mempath, this%mshape)
253  end if
254  case default
255  end select
256  !
257  ! -- return
258  return
subroutine, public get_isize(name, mem_path, isize)
@ brief Get the number of elements for this variable
This module contains the SourceCommonModule.
Definition: SourceCommon.f90:7
subroutine, public set_model_shape(ftype, fname, model_mempath, dis_mempath, model_shape)
routine for setting the model shape
subroutine, public mem_allocate_naux(mempath)
Here is the call graph for this function:

◆ finalize()

subroutine loadmf6filemodule::finalize ( class(loadmf6filetype this)

init / finalize are only used when load_block() will be called

Definition at line 185 of file LoadMf6File.f90.

186  ! -- modules
188  ! -- dummy
189  class(LoadMf6FileType) :: this
190  ! -- local
191  !
192  ! -- cleanup
193  if (associated(this%structarray)) then
194  ! -- destroy the structured array reader
195  call destructstructarray(this%structarray)
196  end if
197  !
198  ! -- close logging block
199  call idm_log_close(this%mf6_input%component_name, &
200  this%mf6_input%subcomponent_name, this%iout)
201  !
202  ! -- return
203  return
This module contains the StructArrayModule.
Definition: StructArray.f90:8
subroutine, public destructstructarray(struct_array)
destructor for a struct_array
Here is the call graph for this function:

◆ get_layered_shape()

subroutine loadmf6filemodule::get_layered_shape ( integer(i4b), dimension(:), intent(in)  mshape,
integer(i4b), intent(out)  nlay,
integer(i4b), dimension(:), intent(out), allocatable  layer_shape 
)

Definition at line 1112 of file LoadMf6File.f90.

1113  integer(I4B), dimension(:), intent(in) :: mshape
1114  integer(I4B), intent(out) :: nlay
1115  integer(I4B), dimension(:), allocatable, intent(out) :: layer_shape
1116  integer(I4B) :: ndim
1117 
1118  ndim = size(mshape)
1119  nlay = 0
1120 
1121  if (ndim == 1) then ! disu
1122  nlay = 1
1123  allocate (layer_shape(1))
1124  layer_shape(1) = mshape(1)
1125  else if (ndim == 2) then ! disv
1126  nlay = mshape(1)
1127  allocate (layer_shape(1))
1128  layer_shape(1) = mshape(2)
1129  else if (ndim == 3) then ! disu
1130  nlay = mshape(1)
1131  allocate (layer_shape(2))
1132  layer_shape(1) = mshape(3) ! ncol
1133  layer_shape(2) = mshape(2) ! nrow
1134  end if
1135 
Here is the caller graph for this function:

◆ init()

subroutine loadmf6filemodule::init ( class(loadmf6filetype this,
type(blockparsertype), intent(inout), target  parser,
type(modflowinputtype), intent(in)  mf6_input,
character(len=*), intent(in)  filename,
integer(i4b), intent(in)  iout 
)

init / finalize are only used when load_block() will be called

Definition at line 115 of file LoadMf6File.f90.

116  ! -- modules
117  use memorymanagermodule, only: get_isize
118  ! -- dummy
119  class(LoadMf6FileType) :: this
120  type(BlockParserType), target, intent(inout) :: parser
121  type(ModflowInputType), intent(in) :: mf6_input
122  character(len=*), intent(in) :: filename
123  integer(I4B), intent(in) :: iout
124  ! -- local
125  integer(I4B) :: isize
126  !
127  this%parser => parser
128  this%mf6_input = mf6_input
129  this%filename = filename
130  this%ts_active = .false.
131  this%export = .false.
132  this%iout = iout
133  !
134  call get_isize('MODEL_SHAPE', mf6_input%component_mempath, isize)
135  !
136  if (isize > 0) then
137  call mem_setptr(this%mshape, 'MODEL_SHAPE', mf6_input%component_mempath)
138  end if
139  !
140  ! -- log lst file header
141  call idm_log_header(this%mf6_input%component_name, &
142  this%mf6_input%subcomponent_name, this%iout)
143  !
144  ! -- return
145  return
Here is the call graph for this function:

◆ load()

subroutine loadmf6filemodule::load ( class(loadmf6filetype this,
type(blockparsertype), intent(inout), target  parser,
type(modflowinputtype), intent(in)  mf6_input,
character(len=*), intent(in)  filename,
integer(i4b), intent(in)  iout 
)
private

Invoke this routine to load all static input blocks in single call.

Definition at line 77 of file LoadMf6File.f90.

78  ! -- modules
80  ! -- dummy
81  class(LoadMf6FileType) :: this
82  type(BlockParserType), target, intent(inout) :: parser
83  type(ModflowInputType), intent(in) :: mf6_input
84  character(len=*), intent(in) :: filename
85  integer(I4B), intent(in) :: iout
86  ! -- local
87  integer(I4B) :: iblk
88  !
89  ! -- initialize static load
90  call this%init(parser, mf6_input, filename, iout)
91  !
92  ! -- process blocks
93  do iblk = 1, size(this%mf6_input%block_dfns)
94  !
95  ! -- don't load dynamic input data
96  if (this%mf6_input%block_dfns(iblk)%blockname == 'PERIOD') exit
97  !
98  ! -- load the block
99  call this%load_block(iblk)
100  !
101  end do
102  !
103  ! -- finalize static load
104  call this%finalize()
105  !
106  ! --return
107  return
Here is the call graph for this function:

◆ load_auxvar_names()

subroutine loadmf6filemodule::load_auxvar_names ( type(blockparsertype), intent(inout)  parser,
type(inputparamdefinitiontype), intent(in)  idt,
character(len=*), intent(in)  memoryPath,
integer(i4b), intent(in)  iout 
)
Parameters
[in,out]parserblock parser
[in]idtinput data type object describing this record
[in]memorypathmemorypath to put loaded information
[in]ioutunit number for output

Definition at line 716 of file LoadMf6File.f90.

718  use inputoutputmodule, only: urdaux
720  type(BlockParserType), intent(inout) :: parser !< block parser
721  type(InputParamDefinitionType), intent(in) :: idt !< input data type object describing this record
722  character(len=*), intent(in) :: memoryPath !< memorypath to put loaded information
723  integer(I4B), intent(in) :: iout !< unit number for output
724  character(len=:), allocatable :: line
725  character(len=LENAUXNAME), dimension(:), allocatable :: caux
726  integer(I4B) :: lloc
727  integer(I4B) :: istart
728  integer(I4B) :: istop
729  integer(I4B) :: i
730  character(len=LENPACKAGENAME) :: text = ''
731  integer(I4B), pointer :: intvar
732  type(CharacterStringType), dimension(:), &
733  pointer, contiguous :: acharstr1d !< variable for allocation
734  call mem_allocate(intvar, idt%shape, memorypath)
735  intvar = 0
736  call parser%GetRemainingLine(line)
737  lloc = 1
738  call urdaux(intvar, parser%iuactive, iout, lloc, &
739  istart, istop, caux, line, text)
740  call mem_allocate(acharstr1d, lenauxname, intvar, idt%mf6varname, memorypath)
741  do i = 1, intvar
742  acharstr1d(i) = caux(i)
743  end do
744  deallocate (line)
745  deallocate (caux)
746  return
This module contains simulation constants.
Definition: Constants.f90:9
integer(i4b), parameter linelength
maximum length of a standard line
Definition: Constants.f90:44
integer(i4b), parameter lenpackagename
maximum length of the package name
Definition: Constants.f90:22
integer(i4b), parameter lenauxname
maximum length of a aux variable
Definition: Constants.f90:34
subroutine, public urdaux(naux, inunit, iout, lloc, istart, istop, auxname, line, text)
Read auxiliary variables from an input line.
This class is used to store a single deferred-length character string. It was designed to work in an ...
Definition: CharString.f90:23
Here is the call graph for this function:
Here is the caller graph for this function:

◆ load_block()

subroutine loadmf6filemodule::load_block ( class(loadmf6filetype this,
integer(i4b), intent(in)  iblk 
)

Assumed in order load of single (next) block. If a StructArray object is allocated to load this block it persists until this routine (or finalize) is called again.

Definition at line 156 of file LoadMf6File.f90.

157  ! -- modules
159  ! -- dummy
160  class(LoadMf6FileType) :: this
161  integer(I4B), intent(in) :: iblk
162  ! -- local
163  !
164  ! -- reset structarray if it was created for previous block
165  if (associated(this%structarray)) then
166  ! -- destroy the structured array reader
167  call destructstructarray(this%structarray)
168  end if
169  !
170  ! -- load the block
171  call this%parse_block(iblk, .false.)
172  !
173  ! -- post process block
174  call this%block_post_process(iblk)
175  !
176  ! --return
177  return
Here is the call graph for this function:

◆ load_double1d_type()

subroutine loadmf6filemodule::load_double1d_type ( type(blockparsertype), intent(inout)  parser,
type(inputparamdefinitiontype), intent(in)  idt,
character(len=*), intent(in)  memoryPath,
integer(i4b), dimension(:), intent(in), pointer, contiguous  mshape,
logical(lgp), intent(in)  export,
integer(i4b), intent(in)  iout 
)
private
Parameters
[in,out]parserblock parser
[in]idtinput data type object describing this record
[in]memorypathmemorypath to put loaded information
[in]mshapemodel shape
[in]exportexport to ascii layer files
[in]ioutunit number for output

Definition at line 947 of file LoadMf6File.f90.

949  type(BlockParserType), intent(inout) :: parser !< block parser
950  type(InputParamDefinitionType), intent(in) :: idt !< input data type object describing this record
951  character(len=*), intent(in) :: memoryPath !< memorypath to put loaded information
952  integer(I4B), dimension(:), contiguous, pointer, intent(in) :: mshape !< model shape
953  logical(LGP), intent(in) :: export !< export to ascii layer files
954  integer(I4B), intent(in) :: iout !< unit number for output
955  real(DP), dimension(:), pointer, contiguous :: dbl1d
956  !integer(I4B), pointer :: nsize1
957  integer(I4B) :: nlay
958  integer(I4B) :: nvals
959  integer(I4B), dimension(:), allocatable :: array_shape
960  integer(I4B), dimension(:), allocatable :: layer_shape
961  character(len=LINELENGTH) :: keyword
962 
963  ! Check if it is a full grid sized array (NODES)
964  if (idt%shape == 'NODES') then
965  nvals = product(mshape)
966  else
967  call get_shape_from_string(idt%shape, array_shape, memorypath)
968  nvals = array_shape(1)
969  end if
970 
971  ! allocate memory for the array
972  call mem_allocate(dbl1d, nvals, idt%mf6varname, memorypath)
973 
974  ! check to see if the user specified "LAYERED" input
975  keyword = ''
976  if (idt%layered) then
977  call parser%GetStringCaps(keyword)
978  end if
979 
980  ! read the array from the input file
981  if (keyword == 'LAYERED' .and. idt%layered) then
982  call get_layered_shape(mshape, nlay, layer_shape)
983  call read_dbl1d_layered(parser, dbl1d, idt%mf6varname, nlay, layer_shape)
984  else
985  call read_dbl1d(parser, dbl1d, idt%mf6varname)
986  end if
987 
988  ! log information on the loaded array to the list file
989  call idm_log_var(dbl1d, idt%tagname, memorypath, iout)
990 
991  ! create export file for griddata parameters if optioned
992  if (export) then
993  if (idt%blockname == 'GRIDDATA') then
994  call idm_export(dbl1d, idt%tagname, memorypath, idt%shape, iout)
995  end if
996  end if
997 
998  return
subroutine, public get_shape_from_string(shape_string, array_shape, memoryPath)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ load_double2d_type()

subroutine loadmf6filemodule::load_double2d_type ( type(blockparsertype), intent(inout)  parser,
type(inputparamdefinitiontype), intent(in)  idt,
character(len=*), intent(in)  memoryPath,
integer(i4b), dimension(:), intent(in), pointer, contiguous  mshape,
logical(lgp), intent(in)  export,
integer(i4b), intent(in)  iout 
)
Parameters
[in,out]parserblock parser
[in]idtinput data type object describing this record
[in]memorypathmemorypath to put loaded information
[in]mshapemodel shape
[in]exportexport to ascii layer files
[in]ioutunit number for output

Definition at line 1003 of file LoadMf6File.f90.

1005  type(BlockParserType), intent(inout) :: parser !< block parser
1006  type(InputParamDefinitionType), intent(in) :: idt !< input data type object describing this record
1007  character(len=*), intent(in) :: memoryPath !< memorypath to put loaded information
1008  integer(I4B), dimension(:), contiguous, pointer, intent(in) :: mshape !< model shape
1009  logical(LGP), intent(in) :: export !< export to ascii layer files
1010  integer(I4B), intent(in) :: iout !< unit number for output
1011  real(DP), dimension(:, :), pointer, contiguous :: dbl2d
1012  integer(I4B) :: nlay
1013  integer(I4B) :: nsize1, nsize2
1014  integer(I4B), dimension(:), allocatable :: array_shape
1015  integer(I4B), dimension(:), allocatable :: layer_shape
1016  character(len=LINELENGTH) :: keyword
1017 
1018  ! determine the array shape from the input data definition (idt%shape),
1019  ! which looks like "NCOL, NROW, NLAY"
1020  call get_shape_from_string(idt%shape, array_shape, memorypath)
1021  nsize1 = array_shape(1)
1022  nsize2 = array_shape(2)
1023 
1024  ! create a new 3d memory managed variable
1025  call mem_allocate(dbl2d, nsize1, nsize2, idt%mf6varname, memorypath)
1026 
1027  ! check to see if the user specified "LAYERED" input
1028  keyword = ''
1029  if (idt%layered) then
1030  call parser%GetStringCaps(keyword)
1031  end if
1032 
1033  ! read the array from the input file
1034  if (keyword == 'LAYERED' .and. idt%layered) then
1035  call get_layered_shape(mshape, nlay, layer_shape)
1036  call read_dbl2d_layered(parser, dbl2d, idt%mf6varname, nlay, layer_shape)
1037  else
1038  call read_dbl2d(parser, dbl2d, idt%mf6varname)
1039  end if
1040 
1041  ! log information on the loaded array to the list file
1042  call idm_log_var(dbl2d, idt%tagname, memorypath, iout)
1043 
1044  ! create export file for griddata parameters if optioned
1045  if (export) then
1046  if (idt%blockname == 'GRIDDATA') then
1047  call idm_export(dbl2d, idt%tagname, memorypath, idt%shape, iout)
1048  end if
1049  end if
1050 
1051  return
Here is the call graph for this function:
Here is the caller graph for this function:

◆ load_double3d_type()

subroutine loadmf6filemodule::load_double3d_type ( type(blockparsertype), intent(inout)  parser,
type(inputparamdefinitiontype), intent(in)  idt,
character(len=*), intent(in)  memoryPath,
integer(i4b), dimension(:), intent(in), pointer, contiguous  mshape,
logical(lgp), intent(in)  export,
integer(i4b), intent(in)  iout 
)
Parameters
[in,out]parserblock parser
[in]idtinput data type object describing this record
[in]memorypathmemorypath to put loaded information
[in]mshapemodel shape
[in]exportexport to ascii layer files
[in]ioutunit number for output

Definition at line 1056 of file LoadMf6File.f90.

1058  type(BlockParserType), intent(inout) :: parser !< block parser
1059  type(InputParamDefinitionType), intent(in) :: idt !< input data type object describing this record
1060  character(len=*), intent(in) :: memoryPath !< memorypath to put loaded information
1061  integer(I4B), dimension(:), contiguous, pointer, intent(in) :: mshape !< model shape
1062  logical(LGP), intent(in) :: export !< export to ascii layer files
1063  integer(I4B), intent(in) :: iout !< unit number for output
1064  real(DP), dimension(:, :, :), pointer, contiguous :: dbl3d
1065  integer(I4B) :: nlay
1066  integer(I4B) :: nsize1, nsize2, nsize3
1067  integer(I4B), dimension(:), allocatable :: array_shape
1068  integer(I4B), dimension(:), allocatable :: layer_shape
1069  character(len=LINELENGTH) :: keyword
1070  real(DP), dimension(:), pointer, contiguous :: dbl1d_ptr
1071 
1072  ! determine the array shape from the input data definition (idt%shape),
1073  ! which looks like "NCOL, NROW, NLAY"
1074  call get_shape_from_string(idt%shape, array_shape, memorypath)
1075  nsize1 = array_shape(1)
1076  nsize2 = array_shape(2)
1077  nsize3 = array_shape(3)
1078 
1079  ! create a new 3d memory managed variable
1080  call mem_allocate(dbl3d, nsize1, nsize2, nsize3, idt%mf6varname, &
1081  memorypath)
1082 
1083  ! check to see if the user specified "LAYERED" input
1084  keyword = ''
1085  if (idt%layered) then
1086  call parser%GetStringCaps(keyword)
1087  end if
1088 
1089  ! read the array from the input file
1090  if (keyword == 'LAYERED' .and. idt%layered) then
1091  call get_layered_shape(mshape, nlay, layer_shape)
1092  call read_dbl3d_layered(parser, dbl3d, idt%mf6varname, nlay, &
1093  layer_shape)
1094  else
1095  dbl1d_ptr(1:nsize1 * nsize2 * nsize3) => dbl3d(:, :, :)
1096  call read_dbl1d(parser, dbl1d_ptr, idt%mf6varname)
1097  end if
1098 
1099  ! log information on the loaded array to the list file
1100  call idm_log_var(dbl3d, idt%tagname, memorypath, iout)
1101 
1102  ! create export file for griddata parameters if optioned
1103  if (export) then
1104  if (idt%blockname == 'GRIDDATA') then
1105  call idm_export(dbl3d, idt%tagname, memorypath, idt%shape, iout)
1106  end if
1107  end if
1108 
1109  return
Here is the call graph for this function:
Here is the caller graph for this function:

◆ load_double_type()

subroutine loadmf6filemodule::load_double_type ( type(blockparsertype), intent(inout)  parser,
type(inputparamdefinitiontype), intent(in)  idt,
character(len=*), intent(in)  memoryPath,
integer(i4b), intent(in)  iout 
)
Parameters
[in,out]parserblock parser
[in]idtinput data type object describing this record
[in]memorypathmemorypath to put loaded information
[in]ioutunit number for output

Definition at line 933 of file LoadMf6File.f90.

934  type(BlockParserType), intent(inout) :: parser !< block parser
935  type(InputParamDefinitionType), intent(in) :: idt !< input data type object describing this record
936  character(len=*), intent(in) :: memoryPath !< memorypath to put loaded information
937  integer(I4B), intent(in) :: iout !< unit number for output
938  real(DP), pointer :: dblvar
939  call mem_allocate(dblvar, idt%mf6varname, memorypath)
940  dblvar = parser%GetDouble()
941  call idm_log_var(dblvar, idt%tagname, memorypath, iout)
942  return
Here is the caller graph for this function:

◆ load_integer1d_type()

subroutine loadmf6filemodule::load_integer1d_type ( type(blockparsertype), intent(inout)  parser,
type(inputparamdefinitiontype), intent(in)  idt,
character(len=*), intent(in)  memoryPath,
integer(i4b), dimension(:), intent(in), pointer, contiguous  mshape,
logical(lgp), intent(in)  export,
integer(i4b), intent(in)  iout 
)
private
Parameters
[in,out]parserblock parser
[in]idtinput data type object describing this record
[in]memorypathmemorypath to put loaded information
[in]mshapemodel shape
[in]exportexport to ascii layer files
[in]ioutunit number for output

Definition at line 765 of file LoadMf6File.f90.

767  type(BlockParserType), intent(inout) :: parser !< block parser
768  type(InputParamDefinitionType), intent(in) :: idt !< input data type object describing this record
769  character(len=*), intent(in) :: memoryPath !< memorypath to put loaded information
770  integer(I4B), dimension(:), contiguous, pointer, intent(in) :: mshape !< model shape
771  logical(LGP), intent(in) :: export !< export to ascii layer files
772  integer(I4B), intent(in) :: iout !< unit number for output
773  integer(I4B), dimension(:), pointer, contiguous :: int1d
774  !integer(I4B), pointer :: nsize1
775  integer(I4B) :: nlay
776  integer(I4B) :: nvals
777  integer(I4B), dimension(:), allocatable :: array_shape
778  integer(I4B), dimension(:), allocatable :: layer_shape
779  character(len=LINELENGTH) :: keyword
780 
781  ! Check if it is a full grid sized array (NODES), otherwise use
782  ! idt%shape to construct shape from variables in memoryPath
783  if (idt%shape == 'NODES') then
784  nvals = product(mshape)
785  else
786  call get_shape_from_string(idt%shape, array_shape, memorypath)
787  nvals = array_shape(1)
788  end if
789 
790  ! allocate memory for the array
791  call mem_allocate(int1d, nvals, idt%mf6varname, memorypath)
792 
793  ! check to see if the user specified "LAYERED" input
794  keyword = ''
795  if (idt%layered) then
796  call parser%GetStringCaps(keyword)
797  end if
798 
799  ! read the array from the input file
800  if (keyword == 'LAYERED' .and. idt%layered) then
801  call get_layered_shape(mshape, nlay, layer_shape)
802  call read_int1d_layered(parser, int1d, idt%mf6varname, nlay, layer_shape)
803  else
804  call read_int1d(parser, int1d, idt%mf6varname)
805  end if
806 
807  ! log information on the loaded array to the list file
808  call idm_log_var(int1d, idt%tagname, memorypath, iout)
809 
810  ! create export file for griddata parameters if optioned
811  if (export) then
812  if (idt%blockname == 'GRIDDATA') then
813  call idm_export(int1d, idt%tagname, memorypath, idt%shape, iout)
814  end if
815  end if
816 
817  return
Here is the call graph for this function:
Here is the caller graph for this function:

◆ load_integer2d_type()

subroutine loadmf6filemodule::load_integer2d_type ( type(blockparsertype), intent(inout)  parser,
type(inputparamdefinitiontype), intent(in)  idt,
character(len=*), intent(in)  memoryPath,
integer(i4b), dimension(:), intent(in), pointer, contiguous  mshape,
logical(lgp), intent(in)  export,
integer(i4b), intent(in)  iout 
)
Parameters
[in,out]parserblock parser
[in]idtinput data type object describing this record
[in]memorypathmemorypath to put loaded information
[in]mshapemodel shape
[in]exportexport to ascii layer files
[in]ioutunit number for output

Definition at line 822 of file LoadMf6File.f90.

824  type(BlockParserType), intent(inout) :: parser !< block parser
825  type(InputParamDefinitionType), intent(in) :: idt !< input data type object describing this record
826  character(len=*), intent(in) :: memoryPath !< memorypath to put loaded information
827  integer(I4B), dimension(:), contiguous, pointer, intent(in) :: mshape !< model shape
828  logical(LGP), intent(in) :: export !< export to ascii layer files
829  integer(I4B), intent(in) :: iout !< unit number for output
830  integer(I4B), dimension(:, :), pointer, contiguous :: int2d
831  integer(I4B) :: nlay
832  integer(I4B) :: nsize1, nsize2
833  integer(I4B), dimension(:), allocatable :: array_shape
834  integer(I4B), dimension(:), allocatable :: layer_shape
835  character(len=LINELENGTH) :: keyword
836 
837  ! determine the array shape from the input data definition (idt%shape),
838  ! which looks like "NCOL, NROW, NLAY"
839  call get_shape_from_string(idt%shape, array_shape, memorypath)
840  nsize1 = array_shape(1)
841  nsize2 = array_shape(2)
842 
843  ! create a new 3d memory managed variable
844  call mem_allocate(int2d, nsize1, nsize2, idt%mf6varname, memorypath)
845 
846  ! check to see if the user specified "LAYERED" input
847  keyword = ''
848  if (idt%layered) then
849  call parser%GetStringCaps(keyword)
850  end if
851 
852  ! read the array from the input file
853  if (keyword == 'LAYERED' .and. idt%layered) then
854  call get_layered_shape(mshape, nlay, layer_shape)
855  call read_int2d_layered(parser, int2d, idt%mf6varname, nlay, layer_shape)
856  else
857  call read_int2d(parser, int2d, idt%mf6varname)
858  end if
859 
860  ! log information on the loaded array to the list file
861  call idm_log_var(int2d, idt%tagname, memorypath, iout)
862 
863  ! create export file for griddata parameters if optioned
864  if (export) then
865  if (idt%blockname == 'GRIDDATA') then
866  call idm_export(int2d, idt%tagname, memorypath, idt%shape, iout)
867  end if
868  end if
869 
870  return
Here is the call graph for this function:
Here is the caller graph for this function:

◆ load_integer3d_type()

subroutine loadmf6filemodule::load_integer3d_type ( type(blockparsertype), intent(inout)  parser,
type(inputparamdefinitiontype), intent(in)  idt,
character(len=*), intent(in)  memoryPath,
integer(i4b), dimension(:), intent(in), pointer, contiguous  mshape,
logical(lgp), intent(in)  export,
integer(i4b), intent(in)  iout 
)
Parameters
[in,out]parserblock parser
[in]idtinput data type object describing this record
[in]memorypathmemorypath to put loaded information
[in]mshapemodel shape
[in]exportexport to ascii layer files
[in]ioutunit number for output

Definition at line 875 of file LoadMf6File.f90.

877  type(BlockParserType), intent(inout) :: parser !< block parser
878  type(InputParamDefinitionType), intent(in) :: idt !< input data type object describing this record
879  character(len=*), intent(in) :: memoryPath !< memorypath to put loaded information
880  integer(I4B), dimension(:), contiguous, pointer, intent(in) :: mshape !< model shape
881  logical(LGP), intent(in) :: export !< export to ascii layer files
882  integer(I4B), intent(in) :: iout !< unit number for output
883  integer(I4B), dimension(:, :, :), pointer, contiguous :: int3d
884  integer(I4B) :: nlay
885  integer(I4B) :: nsize1, nsize2, nsize3
886  integer(I4B), dimension(:), allocatable :: array_shape
887  integer(I4B), dimension(:), allocatable :: layer_shape
888  character(len=LINELENGTH) :: keyword
889  integer(I4B), dimension(:), pointer, contiguous :: int1d_ptr
890 
891  ! determine the array shape from the input data definition (idt%shape),
892  ! which looks like "NCOL, NROW, NLAY"
893  call get_shape_from_string(idt%shape, array_shape, memorypath)
894  nsize1 = array_shape(1)
895  nsize2 = array_shape(2)
896  nsize3 = array_shape(3)
897 
898  ! create a new 3d memory managed variable
899  call mem_allocate(int3d, nsize1, nsize2, nsize3, idt%mf6varname, &
900  memorypath)
901 
902  ! check to see if the user specified "LAYERED" input
903  keyword = ''
904  if (idt%layered) then
905  call parser%GetStringCaps(keyword)
906  end if
907 
908  ! read the array from the input file
909  if (keyword == 'LAYERED' .and. idt%layered) then
910  call get_layered_shape(mshape, nlay, layer_shape)
911  call read_int3d_layered(parser, int3d, idt%mf6varname, nlay, &
912  layer_shape)
913  else
914  int1d_ptr(1:nsize1 * nsize2 * nsize3) => int3d(:, :, :)
915  call read_int1d(parser, int1d_ptr, idt%mf6varname)
916  end if
917 
918  ! log information on the loaded array to the list file
919  call idm_log_var(int3d, idt%tagname, memorypath, iout)
920 
921  ! create export file for griddata parameters if optioned
922  if (export) then
923  if (idt%blockname == 'GRIDDATA') then
924  call idm_export(int3d, idt%tagname, memorypath, idt%shape, iout)
925  end if
926  end if
927 
928  return
Here is the call graph for this function:
Here is the caller graph for this function:

◆ load_integer_type()

subroutine loadmf6filemodule::load_integer_type ( type(blockparsertype), intent(inout)  parser,
type(inputparamdefinitiontype), intent(in)  idt,
character(len=*), intent(in)  memoryPath,
integer(i4b), intent(in)  iout 
)
Parameters
[in,out]parserblock parser
[in]idtinput data type object describing this record
[in]memorypathmemorypath to put loaded information
[in]ioutunit number for output

Definition at line 751 of file LoadMf6File.f90.

752  type(BlockParserType), intent(inout) :: parser !< block parser
753  type(InputParamDefinitionType), intent(in) :: idt !< input data type object describing this record
754  character(len=*), intent(in) :: memoryPath !< memorypath to put loaded information
755  integer(I4B), intent(in) :: iout !< unit number for output
756  integer(I4B), pointer :: intvar
757  call mem_allocate(intvar, idt%mf6varname, memorypath)
758  intvar = parser%GetInteger()
759  call idm_log_var(intvar, idt%tagname, memorypath, idt%datatype, iout)
760  return
Here is the caller graph for this function:

◆ load_io_tag()

subroutine loadmf6filemodule::load_io_tag ( type(blockparsertype), intent(inout)  parser,
type(inputparamdefinitiontype), intent(in)  idt,
character(len=*), intent(in)  memoryPath,
character(len=*), intent(in)  which,
integer(i4b), intent(in)  iout 
)
private
Parameters
[in,out]parserblock parser
[in]idtinput data type object describing this record
[in]memorypathmemorypath to put loaded information
[in]ioutunit number for output

Definition at line 681 of file LoadMf6File.f90.

685  type(BlockParserType), intent(inout) :: parser !< block parser
686  type(InputParamDefinitionType), intent(in) :: idt !< input data type object describing this record
687  character(len=*), intent(in) :: memoryPath !< memorypath to put loaded information
688  character(len=*), intent(in) :: which
689  integer(I4B), intent(in) :: iout !< unit number for output
690  character(len=LINELENGTH) :: cstr
691  type(CharacterStringType), dimension(:), pointer, contiguous :: charstr1d
692  integer(I4B) :: ilen, isize, idx
693  ilen = linelength
694  if (which == 'FILEIN') then
695  call get_isize(idt%mf6varname, memorypath, isize)
696  if (isize < 0) then
697  call mem_allocate(charstr1d, ilen, 1, idt%mf6varname, memorypath)
698  idx = 1
699  else
700  call mem_setptr(charstr1d, idt%mf6varname, memorypath)
701  call mem_reallocate(charstr1d, ilen, isize + 1, idt%mf6varname, &
702  memorypath)
703  idx = isize + 1
704  end if
705  call parser%GetString(cstr, (.not. idt%preserve_case))
706  charstr1d(idx) = cstr
707  else if (which == 'FILEOUT') then
708  call load_string_type(parser, idt, memorypath, iout)
709  end if
710  return
Here is the call graph for this function:
Here is the caller graph for this function:

◆ load_keyword_type()

subroutine loadmf6filemodule::load_keyword_type ( type(blockparsertype), intent(inout)  parser,
type(inputparamdefinitiontype), intent(in)  idt,
character(len=*), intent(in)  memoryPath,
integer(i4b), intent(in)  iout 
)
Parameters
[in,out]parserblock parser
[in]idtinput data type object describing this record
[in]memorypathmemorypath to put loaded information
[in]ioutunit number for output

Definition at line 651 of file LoadMf6File.f90.

652  type(BlockParserType), intent(inout) :: parser !< block parser
653  type(InputParamDefinitionType), intent(in) :: idt !< input data type object describing this record
654  character(len=*), intent(in) :: memoryPath !< memorypath to put loaded information
655  integer(I4B), intent(in) :: iout !< unit number for output
656  integer(I4B), pointer :: intvar
657  call mem_allocate(intvar, idt%mf6varname, memorypath)
658  intvar = 1
659  call idm_log_var(intvar, idt%tagname, memorypath, idt%datatype, iout)
660  return
Here is the caller graph for this function:

◆ load_string_type()

subroutine loadmf6filemodule::load_string_type ( type(blockparsertype), intent(inout)  parser,
type(inputparamdefinitiontype), intent(in)  idt,
character(len=*), intent(in)  memoryPath,
integer(i4b), intent(in)  iout 
)
private
Parameters
[in,out]parserblock parser
[in]idtinput data type object describing this record
[in]memorypathmemorypath to put loaded information
[in]ioutunit number for output

Definition at line 665 of file LoadMf6File.f90.

666  type(BlockParserType), intent(inout) :: parser !< block parser
667  type(InputParamDefinitionType), intent(in) :: idt !< input data type object describing this record
668  character(len=*), intent(in) :: memoryPath !< memorypath to put loaded information
669  integer(I4B), intent(in) :: iout !< unit number for output
670  character(len=LINELENGTH), pointer :: cstr
671  integer(I4B) :: ilen
672  ilen = linelength
673  call mem_allocate(cstr, ilen, idt%mf6varname, memorypath)
674  call parser%GetString(cstr, (.not. idt%preserve_case))
675  call idm_log_var(cstr, idt%tagname, memorypath, iout)
676  return
Here is the caller graph for this function:

◆ parse_block()

recursive subroutine loadmf6filemodule::parse_block ( class(loadmf6filetype this,
integer(i4b), intent(in)  iblk,
logical(lgp), intent(in)  recursive_call 
)
Parameters
[in]recursive_calltrue if recursive call

Definition at line 264 of file LoadMf6File.f90.

265  ! -- modules
266  use memorytypemodule, only: memorytype
268  ! -- dummy
269  class(LoadMf6FileType) :: this
270  integer(I4B), intent(in) :: iblk
271  logical(LGP), intent(in) :: recursive_call !< true if recursive call
272  ! -- local
273  logical(LGP) :: isblockfound
274  logical(LGP) :: endOfBlock
275  logical(LGP) :: supportOpenClose
276  integer(I4B) :: ierr
277  logical(LGP) :: found, required
278  type(MemoryType), pointer :: mt
279  !
280  ! -- disu vertices/cell2d blocks are contingent on NVERT dimension
281  if (this%mf6_input%pkgtype == 'DISU6' .or. &
282  this%mf6_input%pkgtype == 'DISV1D6' .or. &
283  this%mf6_input%pkgtype == 'DISV2D6') then
284  if (this%mf6_input%block_dfns(iblk)%blockname == 'VERTICES' .or. &
285  this%mf6_input%block_dfns(iblk)%blockname == 'CELL2D') then
286  call get_from_memorylist('NVERT', this%mf6_input%mempath, mt, found, &
287  .false.)
288  if (.not. found) return
289  if (mt%intsclr == 0) return
290  end if
291  end if
292  !
293  ! -- block open/close support
294  supportopenclose = (this%mf6_input%block_dfns(iblk)%blockname /= 'GRIDDATA')
295  !
296  ! -- parser search for block
297  required = this%mf6_input%block_dfns(iblk)%required .and. .not. recursive_call
298  call this%parser%GetBlock(this%mf6_input%block_dfns(iblk)%blockname, &
299  isblockfound, ierr, &
300  supportopenclose=supportopenclose, &
301  blockrequired=required)
302  !
303  ! -- process block
304  if (isblockfound) then
305  if (this%mf6_input%block_dfns(iblk)%aggregate) then
306  !
307  ! -- process block recarray type, set of variable 1d/2d types
308  call this%parse_structarray_block(iblk)
309  !
310  else
311  do
312  ! process each line in block
313  call this%parser%GetNextLine(endofblock)
314  if (endofblock) exit
315  !
316  ! -- process line as tag(s)
317  call this%parse_tag(iblk, .false.)
318  !
319  end do
320  end if
321  end if
322  !
323  ! -- recurse if block is reloadable and was just read
324  if (this%mf6_input%block_dfns(iblk)%block_variable) then
325  if (isblockfound) then
326  call this%parse_block(iblk, .true.)
327  end if
328  end if
329  !
330  ! -- return
331  return
subroutine, public get_from_memorylist(name, mem_path, mt, found, check)
@ brief Get a memory type entry from the memory list
Here is the call graph for this function:

◆ parse_io_tag()

subroutine loadmf6filemodule::parse_io_tag ( class(loadmf6filetype this,
integer(i4b), intent(in)  iblk,
character(len=*), intent(in)  pkgtype,
character(len=*), intent(in)  which,
character(len=*), intent(in)  tag 
)

Definition at line 334 of file LoadMf6File.f90.

335  ! -- modules
336  ! -- dummy
337  class(LoadMf6FileType) :: this
338  integer(I4B), intent(in) :: iblk
339  character(len=*), intent(in) :: pkgtype
340  character(len=*), intent(in) :: which
341  character(len=*), intent(in) :: tag
342  ! -- local
343  type(InputParamDefinitionType), pointer :: idt !< input data type object describing this record
344  !
345  ! -- matches, read and load file name
346  idt => &
347  get_param_definition_type(this%mf6_input%param_dfns, &
348  this%mf6_input%component_type, &
349  this%mf6_input%subcomponent_type, &
350  this%mf6_input%block_dfns(iblk)%blockname, &
351  tag, this%filename)
352  !
353  ! -- load io tag
354  call load_io_tag(this%parser, idt, this%mf6_input%mempath, which, this%iout)
355  !
356  ! -- return
357  return
Here is the call graph for this function:

◆ parse_keyword_tag()

subroutine loadmf6filemodule::parse_keyword_tag ( class(loadmf6filetype this,
integer(i4b), intent(in)  iblk,
character(len=linelength), intent(in)  tag,
type(inputparamdefinitiontype), intent(in), pointer  idt 
)
private

Definition at line 360 of file LoadMf6File.f90.

361  ! -- modules
363  ! -- dummy
364  class(LoadMf6FileType) :: this
365  integer(I4B), intent(in) :: iblk
366  character(len=LINELENGTH), intent(in) :: tag
367  type(InputParamDefinitionType), pointer, intent(in) :: idt
368  ! -- local
369  character(len=40), dimension(:), allocatable :: words
370  integer(I4B) :: nwords
371  character(len=LINELENGTH) :: io_tag
372  logical(LGP) :: found
373  !
374  ! -- initialization
375  found = .false.
376  !
377  ! -- if in record tag check and load if input/output file
378  if (idt%in_record) then
379  !
380  ! -- get tokens in matching definition
381  call split_record_definition(this%mf6_input%param_dfns, &
382  this%mf6_input%component_type, &
383  this%mf6_input%subcomponent_type, &
384  tag, nwords, words)
385  !
386  ! -- a filein/fileout record tag definition has 4 tokens
387  if (nwords == 4) then
388  !
389  ! -- verify third definition token is FILEIN/FILEOUT
390  if (words(3) == 'FILEIN' .or. words(3) == 'FILEOUT') then
391  !
392  ! -- read 3rd token
393  call this%parser%GetStringCaps(io_tag)
394  !
395  ! -- check if 3rd token matches definition
396  if (io_tag == words(3)) then
397  call this%parse_io_tag(iblk, words(2), words(3), words(4))
398  found = .true.
399  else
400  errmsg = 'Expected "'//trim(words(3))//'" following keyword "'// &
401  trim(tag)//'" but instead found "'//trim(io_tag)//'"'
402  call store_error(errmsg)
403  call this%parser%StoreErrorUnit()
404  end if
405  !
406  end if
407  end if
408  !
409  ! -- deallocate words
410  if (allocated(words)) deallocate (words)
411  end if
412  !
413  if (.not. found) then
414  ! -- load standard keyword tag
415  call load_keyword_type(this%parser, idt, this%mf6_input%mempath, this%iout)
416  !
417  ! -- check/set as dev option
418  if (idt%tagname(1:4) == 'DEV_' .and. &
419  this%mf6_input%block_dfns(iblk)%blockname == 'OPTIONS') then
420  call this%parser%DevOpt()
421  end if
422  end if
423  !
424  ! -- return
425  return
This module contains the DefinitionSelectModule.
subroutine, public split_record_definition(input_definition_types, component_type, subcomponent_type, tagname, nwords, words)
Return aggregate definition.
Here is the call graph for this function:

◆ parse_structarray_block()

subroutine loadmf6filemodule::parse_structarray_block ( class(loadmf6filetype this,
integer(i4b), intent(in)  iblk 
)
private

A structarray is similar to a numpy recarray. It it used to load a list of data in which each column in the list may be a different type. Each column in the list is stored as a 1d vector.

Definition at line 552 of file LoadMf6File.f90.

553  ! -- modules
555  ! -- dummy
556  class(LoadMf6FileType) :: this
557  integer(I4B), intent(in) :: iblk
558  ! -- local
559  type(InputParamDefinitionType), pointer :: idt !< input data type object describing this record
560  type(InputParamDefinitionType), target :: blockvar_idt
561  integer(I4B) :: blocknum, iwords
562  integer(I4B), pointer :: nrow
563  integer(I4B) :: nrows, nrowsread
564  integer(I4B) :: icol
565  integer(I4B) :: ncol
566  integer(I4B) :: nwords
567  character(len=16), dimension(:), allocatable :: words
568  character(len=:), allocatable :: parse_str
569  !
570  ! -- set input definition for this block
571  idt => &
572  get_aggregate_definition_type(this%mf6_input%aggregate_dfns, &
573  this%mf6_input%component_type, &
574  this%mf6_input%subcomponent_type, &
575  this%mf6_input%block_dfns(iblk)%blockname)
576  !
577  ! -- if block is reloadable read the block number
578  if (this%mf6_input%block_dfns(iblk)%block_variable) then
579  blocknum = this%parser%GetInteger()
580  else
581  blocknum = 0
582  end if
583  !
584  ! -- identify variable names, ignore first RECARRAY column
585  parse_str = trim(idt%datatype)//' '
586  call parseline(parse_str, nwords, words)
587  ncol = nwords - 1
588  !
589  ! -- a column will be prepended if block is reloadable
590  if (blocknum > 0) ncol = ncol + 1
591  !
592  ! -- use shape to set the max num of rows
593  if (idt%shape /= '') then
594  call mem_setptr(nrow, idt%shape, this%mf6_input%mempath)
595  nrows = nrow
596  else
597  nrows = 0
598  end if
599  !
600  ! -- create a structured array
601  this%structarray => constructstructarray(this%mf6_input, ncol, nrows, &
602  blocknum, this%mf6_input%mempath, &
603  this%mf6_input%component_mempath)
604  !
605  ! -- create structarray vectors for each column
606  do icol = 1, ncol
607  !
608  ! -- if block is reloadable, block number is first column
609  if (blocknum > 0) then
610  if (icol == 1) then
611  !
612  blockvar_idt = this%block_index_dfn(iblk)
613  idt => blockvar_idt
614  !
615  call this%structarray%mem_create_vector(icol, idt)
616  !
617  ! -- continue as this column managed by internally SA object
618  cycle
619  end if
620  !
621  ! -- set indexes (where first column is blocknum)
622  iwords = icol
623  else
624  !
625  ! -- set indexes (no blocknum column)
626  iwords = icol + 1
627  end if
628  !
629  ! -- set pointer to input definition for this 1d vector
630  idt => &
631  get_param_definition_type(this%mf6_input%param_dfns, &
632  this%mf6_input%component_type, &
633  this%mf6_input%subcomponent_type, &
634  this%mf6_input%block_dfns(iblk)%blockname, &
635  words(iwords), this%filename)
636  !
637  ! -- allocate variable in memory manager
638  call this%structarray%mem_create_vector(icol, idt)
639  end do
640  !
641  ! -- read the structured array
642  nrowsread = this%structarray%read_from_parser(this%parser, this%ts_active, &
643  this%iout)
644  !
645  ! -- return
646  return
type(structarraytype) function, pointer, public constructstructarray(mf6_input, ncol, nrow, blocknum, mempath, component_mempath)
constructor for a struct_array
Definition: StructArray.f90:74
type for structured array
Definition: StructArray.f90:37
Here is the call graph for this function:

◆ parse_tag()

recursive subroutine loadmf6filemodule::parse_tag ( class(loadmf6filetype this,
integer(i4b), intent(in)  iblk,
logical(lgp), intent(in)  recursive_call 
)

Load an individual input record into the memory manager. Allow for recursive calls in the case that multiple tags are on a single line.

Parameters
[in]recursive_calltrue if recursive call

Definition at line 435 of file LoadMf6File.f90.

436  ! -- modules
437  ! -- dummy
438  class(LoadMf6FileType) :: this
439  integer(I4B), intent(in) :: iblk
440  logical(LGP), intent(in) :: recursive_call !< true if recursive call
441  ! -- local
442  character(len=LINELENGTH) :: tag
443  type(InputParamDefinitionType), pointer :: idt !< input data type object describing this record
444  !
445  ! -- read tag name
446  call this%parser%GetStringCaps(tag)
447  if (recursive_call) then
448  if (tag == '') then
449  ! no data on line so return
450  return
451  end if
452  end if
453  !
454  ! -- find keyword in input definition
455  idt => get_param_definition_type(this%mf6_input%param_dfns, &
456  this%mf6_input%component_type, &
457  this%mf6_input%subcomponent_type, &
458  this%mf6_input%block_dfns(iblk)%blockname, &
459  tag, this%filename)
460  !
461  ! -- allocate and load data type
462  select case (idt%datatype)
463  case ('KEYWORD')
464  call this%parse_keyword_tag(iblk, tag, idt)
465  case ('STRING')
466  if (idt%shape == 'NAUX') then
467  call load_auxvar_names(this%parser, idt, this%mf6_input%mempath, &
468  this%iout)
469  else
470  call load_string_type(this%parser, idt, this%mf6_input%mempath, this%iout)
471  end if
472  case ('INTEGER')
473  call load_integer_type(this%parser, idt, this%mf6_input%mempath, this%iout)
474  case ('INTEGER1D')
475  call load_integer1d_type(this%parser, idt, this%mf6_input%mempath, &
476  this%mshape, this%export, this%iout)
477  case ('INTEGER2D')
478  call load_integer2d_type(this%parser, idt, this%mf6_input%mempath, &
479  this%mshape, this%export, this%iout)
480  case ('INTEGER3D')
481  call load_integer3d_type(this%parser, idt, this%mf6_input%mempath, &
482  this%mshape, this%export, this%iout)
483  case ('DOUBLE')
484  call load_double_type(this%parser, idt, this%mf6_input%mempath, this%iout)
485  case ('DOUBLE1D')
486  call load_double1d_type(this%parser, idt, this%mf6_input%mempath, &
487  this%mshape, this%export, this%iout)
488  case ('DOUBLE2D')
489  call load_double2d_type(this%parser, idt, this%mf6_input%mempath, &
490  this%mshape, this%export, this%iout)
491  case ('DOUBLE3D')
492  call load_double3d_type(this%parser, idt, this%mf6_input%mempath, &
493  this%mshape, this%export, this%iout)
494  case default
495  write (errmsg, '(a,a)') 'Failure reading data for tag: ', trim(tag)
496  call store_error(errmsg)
497  call this%parser%StoreErrorUnit()
498  end select
499  !
500  ! -- continue line if in same record
501  if (idt%in_record) then
502  !
503  ! recursively call parse tag again to read rest of line
504  call this%parse_tag(iblk, .true.)
505  end if
506  !
507  ! -- return
508  return
Here is the call graph for this function: