MODFLOW 6 version 6.9.0.dev0
USGS Modular Hydrologic Model
Loading...
Searching...
No Matches
structarraymodule::structarraytype Type Reference

type for structured array More...

Collaboration diagram for structarraymodule::structarraytype:
Collaboration graph

Public Member Functions

procedure mem_create_vector (this, icol, idt, charlen, varname)
 create new vector in StructArrayType
procedure mem_create_metadata_vector (this, icol, idt, body_start, head_nbody)
 Create a metadata-only StructVector for a KEYWORD indicator column.
procedure count (this)
procedure get (this, idx)
procedure allocate_int_type (this, sv)
 allocate integer input type
procedure allocate_dbl_type (this, sv)
 allocate double input type
procedure allocate_charstr_type (this, sv)
 allocate charstr input type
procedure allocate_int1d_type (this, sv)
 allocate int1d input type
procedure allocate_dbl1d_type (this, sv)
 allocate dbl1d input type
procedure read_param (this, parser, sv_col, irow, timeseries, iout)
procedure read_from_parser (this, parser, timeseries, iout, input_name)
 read from the block parser to fill the StructArrayType
procedure read_from_parser_keystring (this, parser, timeseries, nleading, iout, input_name)
 read keystring period block into the StructArrayType
procedure read_from_binary (this, inunit, iout)
 read from binary input to fill the StructArrayType
procedure memload_vectors (this)
 load deferred vectors into managed memory
procedure load_deferred_vector (this, icol)
procedure log_structarray_vars (this, iout)
 log information about the StructArrayType
procedure check_reallocate (this)
 reallocate local memory for deferred vectors if necessary
procedure ts_update (this, tsmanager, subcomp_name, iprpak, input_name, auxname_cst, clear_strlocs, ifno_map)
 link time-series strings in this struct array to a tsmanager
procedure ts_update_adv (this, icol, tsmanager, subcomp_name, iprpak, nrows, ifno_map, auxname_cst, featarr2d)
 Dedup-aware counterpart to ts_update for one MTYPE_DBL2D (AUX) PERIOD-block column.
procedure ts_update_indexed (this, icol, tsmanager, subcomp_name, iprpak, nrows, row_addr, varname, featarr)
 Dedup-aware resolution of one MTYPE_DBL PERIOD-block column into its permanent array, shared by both loaders. nrows is explicit since the list loader's row_addr is a permanent, maxbound-sized array, not sized to nrows.

Public Attributes

integer(i4b) ncol
integer(i4b) nrow
integer(i4b) blocknum
logical(lgp) deferred_shape = .false.
integer(i4b) deferred_size_init = 5
character(len=lenmempath) mempath
character(len=lenmempath) component_mempath
type(structvectortype), dimension(:), allocatable struct_vectors
integer(i4b), dimension(:), allocatable startidx
integer(i4b), dimension(:), allocatable numcols
type(modflowinputtype) mf6_input

Private Member Functions

procedure, private ts_update_dedup (this, icol, tsmanager, subcomp_name, iprpak, nrows, addr_map, category, names, featarr2d, raw2d)
 Shared dedup-aware TS resolution for one PERIOD-block column: TS-linked rows resolve via their preserved token, remaining literal rows via remove_existing_link, then clear(). naux=1 (via both rank remaps in ts_update_indexed) covers the single-column BND case.

Detailed Description

This type is used to read and store a list that consists of multiple one-dimensional vectors.

Definition at line 47 of file StructArray.f90.

Member Function/Subroutine Documentation

◆ allocate_charstr_type()

procedure structarraymodule::structarraytype::allocate_charstr_type ( class(structarraytype) this,
type(structvectortype), intent(inout) sv )
Parameters
thisStructArrayType

Definition at line 66 of file StructArray.f90.

◆ allocate_dbl1d_type()

procedure structarraymodule::structarraytype::allocate_dbl1d_type ( class(structarraytype) this,
type(structvectortype), intent(inout) sv )
Parameters
thisStructArrayType

Definition at line 68 of file StructArray.f90.

◆ allocate_dbl_type()

procedure structarraymodule::structarraytype::allocate_dbl_type ( class(structarraytype) this,
type(structvectortype), intent(inout) sv )
Parameters
thisStructArrayType

Definition at line 65 of file StructArray.f90.

◆ allocate_int1d_type()

procedure structarraymodule::structarraytype::allocate_int1d_type ( class(structarraytype) this,
type(structvectortype), intent(inout) sv )
Parameters
thisStructArrayType

Definition at line 67 of file StructArray.f90.

◆ allocate_int_type()

procedure structarraymodule::structarraytype::allocate_int_type ( class(structarraytype) this,
type(structvectortype), intent(inout) sv )
Parameters
thisStructArrayType

Definition at line 64 of file StructArray.f90.

◆ check_reallocate()

procedure structarraymodule::structarraytype::check_reallocate ( class(structarraytype) this)
Parameters
thisStructArrayType

Definition at line 76 of file StructArray.f90.

◆ count()

procedure structarraymodule::structarraytype::count ( class(structarraytype) this)
Parameters
thisStructArrayType

Definition at line 62 of file StructArray.f90.

◆ get()

procedure structarraymodule::structarraytype::get ( class(structarraytype) this,
integer(i4b), intent(in) idx )
Parameters
thisStructArrayType

Definition at line 63 of file StructArray.f90.

◆ load_deferred_vector()

procedure structarraymodule::structarraytype::load_deferred_vector ( class(structarraytype) this,
integer(i4b), intent(in) icol )
Parameters
thisStructArrayType

Definition at line 74 of file StructArray.f90.

◆ log_structarray_vars()

procedure structarraymodule::structarraytype::log_structarray_vars ( class(structarraytype) this,
integer(i4b), intent(in) iout )
Parameters
thisStructArrayType
[in]ioutunit number for output

Definition at line 75 of file StructArray.f90.

◆ mem_create_metadata_vector()

procedure structarraymodule::structarraytype::mem_create_metadata_vector ( class(structarraytype) this,
integer(i4b), intent(in) icol,
type(inputparamdefinitiontype), pointer idt,
integer(i4b), intent(in) body_start,
integer(i4b), intent(in) head_nbody )

Sets idt, body_start, and head_nbody but allocates no data arrays. Used for KEYWORD indicator columns that have been consolidated into the SETTING column; these vectors serve only as dispatch-map entries.

Parameters
thisStructArrayType
[in]icolcolumn index
idtinput definition (for tagname lookup)
[in]body_startSA column index of the head's first body (0 if none)
[in]head_nbodynumber of body columns following the head

Definition at line 61 of file StructArray.f90.

◆ mem_create_vector()

procedure structarraymodule::structarraytype::mem_create_vector ( class(structarraytype) this,
integer(i4b), intent(in) icol,
type(inputparamdefinitiontype), pointer idt,
integer(i4b), intent(in), optional charlen,
character(len=*), intent(in), optional varname )
Parameters
thisStructArrayType
[in]icolcolumn to create
[in]charlenoverride character length for charstr1d
[in]varnameoverride the memory-manager name (default idtmf6varname)

Definition at line 60 of file StructArray.f90.

◆ memload_vectors()

procedure structarraymodule::structarraytype::memload_vectors ( class(structarraytype) this)
Parameters
thisStructArrayType

Definition at line 73 of file StructArray.f90.

◆ read_from_binary()

procedure structarraymodule::structarraytype::read_from_binary ( class(structarraytype) this,
integer(i4b), intent(in) inunit,
integer(i4b), intent(in) iout )
Parameters
thisStructArrayType
[in]inunitunit number for binary input
[in]ioutunit number for output

Definition at line 72 of file StructArray.f90.

◆ read_from_parser()

procedure structarraymodule::structarraytype::read_from_parser ( class(structarraytype) this,
type(blockparsertype), intent(inout) parser,
logical(lgp), intent(in) timeseries,
integer(i4b), intent(in) iout,
character(len=*), intent(in) input_name )
Parameters
thisStructArrayType
[in,out]parserblock parser to read from
[in]ioutunit number for output
[in]input_nameinput filename for error messages

Definition at line 70 of file StructArray.f90.

◆ read_from_parser_keystring()

procedure structarraymodule::structarraytype::read_from_parser_keystring ( class(structarraytype) this,
type(blockparsertype), intent(inout) parser,
logical(lgp), intent(in) timeseries,
integer(i4b), intent(in) nleading,
integer(i4b), intent(in) iout,
character(len=*), intent(in) input_name )

Each input line contains nleading fixed columns followed by a dispatch keyword. Two dispatch modes are supported:

Simple dispatch: keyword matches a DOUBLE/STRING/INTEGER column. One value token is read from the parser into that column. All other member columns receive their sentinel for that row.

Compound dispatch: keyword matches a KEYWORD-type column (e.g. FLOWING_WELL). No parser token is read for the KEYWORD column — the dispatch keyword itself is stored. Subsequent non-KEYWORD columns (the compound sub-members, e.g. FWELEV/FWCOND/FWRLEN) are read from the parser in order until the next KEYWORD column or the end of the member columns.

No-value KEYWORD dispatch: a KEYWORD column with no sub-members immediately following stores the dispatch keyword and reads nothing further.

Parameters
thisStructArrayType
[in,out]parserblock parser to read from
[in]timeseries.true. when TS files loaded
[in]nleadingnumber of leading (fixed) columns
[in]ioutunit number for output
[in]input_nameinput filename for error messages

Definition at line 71 of file StructArray.f90.

◆ read_param()

procedure structarraymodule::structarraytype::read_param ( class(structarraytype) this,
type(blockparsertype), intent(inout) parser,
integer(i4b), intent(in) sv_col,
integer(i4b), intent(in) irow,
logical(lgp), intent(in) timeseries,
integer(i4b), intent(in) iout )
Parameters
thisStructArrayType
[in,out]parserblock parser to read from
[in]ioutunit number for output

Definition at line 69 of file StructArray.f90.

◆ ts_update()

procedure structarraymodule::structarraytype::ts_update ( class(structarraytype), intent(inout) this,
type(timeseriesmanagertype), intent(inout), pointer tsmanager,
character(len=*), intent(in) subcomp_name,
integer(i4b), intent(in) iprpak,
character(len=*), intent(in) input_name,
type(characterstringtype), dimension(:), intent(in), optional, pointer auxname_cst,
logical(lgp), intent(in), optional clear_strlocs,
integer(i4b), dimension(:), intent(in), optional ifno_map )

Iterates over struct vectors that carry deferred TS tokens and registers each with the supplied tsmanager. Handles both BND (MTYPE_DBL / dbl1d) and AUX (MTYPE_DBL2D / dbl2d) columns. Pass auxname_cst only when AUX columns may carry time series.

Parameters
[in]clear_strlocsif .false. strlocs are preserved for re-registration (default .true.)
[in]ifno_mapif present, maps ts_strlocrow (block row) to its key, used as the TS link row address

Definition at line 77 of file StructArray.f90.

◆ ts_update_adv()

procedure structarraymodule::structarraytype::ts_update_adv ( class(structarraytype), intent(inout) this,
integer(i4b), intent(in) icol,
type(timeseriesmanagertype), intent(inout), pointer tsmanager,
character(len=*), intent(in) subcomp_name,
integer(i4b), intent(in) iprpak,
integer(i4b), intent(in) nrows,
integer(i4b), dimension(:), intent(in) ifno_map,
type(characterstringtype), dimension(:), intent(in), pointer auxname_cst,
real(dp), dimension(:, :), intent(in), pointer featarr2d )
Parameters
[in]nrowsrows read this period
[in]ifno_mapPERIOD row -> feature index
[in]auxname_cstAUX column names, indexed 1..naux
[in]featarr2dpermanent dbl2d (AUX) target

Definition at line 78 of file StructArray.f90.

◆ ts_update_dedup()

procedure, private structarraymodule::structarraytype::ts_update_dedup ( class(structarraytype), intent(inout) this,
integer(i4b), intent(in) icol,
type(timeseriesmanagertype), intent(inout), pointer tsmanager,
character(len=*), intent(in) subcomp_name,
integer(i4b), intent(in) iprpak,
integer(i4b), intent(in) nrows,
integer(i4b), dimension(:), intent(in) addr_map,
character(len=*), intent(in) category,
character(len=lenvarname), dimension(:), intent(in) names,
real(dp), dimension(:, :), intent(in), pointer featarr2d,
real(dp), dimension(:, :), intent(in), pointer raw2d )
private
Parameters
[in]category'AUX' or 'BND'
[in]nrowsrows read this period
[in]addr_mapPERIOD row -> feature index
[in]namessize naux
[in]featarr2d(naux, nfeatures) permanent target
[in]raw2d(naux, nrows) raw column source

Definition at line 80 of file StructArray.f90.

◆ ts_update_indexed()

procedure structarraymodule::structarraytype::ts_update_indexed ( class(structarraytype), intent(inout) this,
integer(i4b), intent(in) icol,
type(timeseriesmanagertype), intent(inout), pointer tsmanager,
character(len=*), intent(in) subcomp_name,
integer(i4b), intent(in) iprpak,
integer(i4b), intent(in) nrows,
integer(i4b), dimension(:), intent(in) row_addr,
character(len=*), intent(in) varname,
real(dp), dimension(:), intent(in), pointer, contiguous featarr )
Parameters
[in]nrowsrows to process this period

Definition at line 79 of file StructArray.f90.

Member Data Documentation

◆ blocknum

integer(i4b) structarraymodule::structarraytype::blocknum

Definition at line 50 of file StructArray.f90.

50 integer(I4B) :: blocknum

◆ component_mempath

character(len=lenmempath) structarraymodule::structarraytype::component_mempath

Definition at line 54 of file StructArray.f90.

54 character(len=LENMEMPATH) :: component_mempath

◆ deferred_shape

logical(lgp) structarraymodule::structarraytype::deferred_shape = .false.

Definition at line 51 of file StructArray.f90.

◆ deferred_size_init

integer(i4b) structarraymodule::structarraytype::deferred_size_init = 5

Definition at line 52 of file StructArray.f90.

◆ mempath

character(len=lenmempath) structarraymodule::structarraytype::mempath

Definition at line 53 of file StructArray.f90.

53 character(len=LENMEMPATH) :: mempath

◆ mf6_input

type(modflowinputtype) structarraymodule::structarraytype::mf6_input

Definition at line 58 of file StructArray.f90.

58 type(ModflowInputType) :: mf6_input

◆ ncol

integer(i4b) structarraymodule::structarraytype::ncol

Definition at line 48 of file StructArray.f90.

48 integer(I4B) :: ncol

◆ nrow

integer(i4b) structarraymodule::structarraytype::nrow

Definition at line 49 of file StructArray.f90.

49 integer(I4B) :: nrow

◆ numcols

integer(i4b), dimension(:), allocatable structarraymodule::structarraytype::numcols

Definition at line 57 of file StructArray.f90.

57 integer(I4B), dimension(:), allocatable :: numcols

◆ startidx

integer(i4b), dimension(:), allocatable structarraymodule::structarraytype::startidx

Definition at line 56 of file StructArray.f90.

56 integer(I4B), dimension(:), allocatable :: startidx

◆ struct_vectors

type(structvectortype), dimension(:), allocatable structarraymodule::structarraytype::struct_vectors

Definition at line 55 of file StructArray.f90.

55 type(StructVectorType), dimension(:), allocatable :: struct_vectors

The documentation for this type was generated from the following file:
  • /home/runner/work/modflow6/modflow6/src/Utilities/Idm/mf6blockfile/StructArray.f90