MODFLOW 6 version 6.9.0.dev0
USGS Modular Hydrologic Model
Loading...
Searching...
No Matches
swficmodule Module Reference

Data Types

type  swfictype

Functions/Subroutines

subroutine, public ic_cr (ic, name_model, input_mempath, inunit, iout, dis)
 Create a new initial conditions object.
subroutine ic_load (this)
 Load data from IDM into package.
subroutine ic_ar (this, x)
 Allocate arrays, load from IDM, and assign head.
subroutine ic_da (this)
 Deallocate.
subroutine allocate_arrays (this, nodes)
 Allocate arrays.
subroutine source_griddata (this)
 Copy grid data from IDM into package.

Function/Subroutine Documentation

◆ allocate_arrays()

subroutine swficmodule::allocate_arrays ( class(swfictype) this,
integer(i4b), intent(in) nodes )
private

Definition at line 122 of file swf-ic.f90.

123 ! -- modules
125 ! -- dummy
126 class(SwfIcType) :: this
127 integer(I4B), intent(in) :: nodes
128 !
129 ! -- Allocate
130 call mem_allocate(this%strt, nodes, 'STRT', this%memoryPath)

◆ ic_ar()

subroutine swficmodule::ic_ar ( class(swfictype) this,
real(dp), dimension(:), intent(inout) x )
private

Definition at line 81 of file swf-ic.f90.

82 ! -- dummy
83 class(SwfIcType) :: this
84 real(DP), dimension(:), intent(inout) :: x
85 ! -- local
86 integer(I4B) :: n
87 !
88 ! -- allocate arrays
89 call this%allocate_arrays(this%dis%nodes)
90 !
91 ! -- load from IDM
92 call this%ic_load()
93 !
94 ! -- assign starting head
95 do n = 1, this%dis%nodes
96 x(n) = this%strt(n)
97 end do

◆ ic_cr()

subroutine, public swficmodule::ic_cr ( type(swfictype), pointer ic,
character(len=*), intent(in) name_model,
character(len=*), intent(in) input_mempath,
integer(i4b), intent(in) inunit,
integer(i4b), intent(in) iout,
class(disbasetype), intent(in), pointer dis )

Definition at line 31 of file swf-ic.f90.

32 ! -- modules
34 ! -- dummy
35 type(SwfIcType), pointer :: ic
36 character(len=*), intent(in) :: name_model
37 character(len=*), intent(in) :: input_mempath
38 integer(I4B), intent(in) :: inunit
39 integer(I4B), intent(in) :: iout
40 class(DisBaseType), pointer, intent(in) :: dis
41 ! -- formats
42 character(len=*), parameter :: fmtic = &
43 "(1x, /1x, 'IC -- Initial Conditions Package, Version 8, 3/28/2015', &
44 &' input read from mempath: ', A, //)"
45 !
46 ! -- create IC object
47 allocate (ic)
48 !
49 ! -- create name and memory path
50 call ic%set_names(1, name_model, 'IC', 'IC', input_mempath)
51 !
52 ! -- allocate scalars
53 call ic%allocate_scalars()
54 !
55 ! -- set variables
56 ic%inunit = inunit
57 ic%iout = iout
58 !
59 ! -- set pointers
60 ic%dis => dis
61 !
62 ! -- check if pkg is enabled,
63 if (inunit > 0) then
64 ! print message identifying pkg
65 write (ic%iout, fmtic) input_mempath
66 end if
Here is the caller graph for this function:

◆ ic_da()

subroutine swficmodule::ic_da ( class(swfictype) this)
private

Definition at line 102 of file swf-ic.f90.

103 ! -- modules
107 ! -- dummy
108 class(SwfIcType) :: this
109 !
110 ! -- deallocate IDM memory
111 call memorystore_remove(this%name_model, 'IC', idm_context)
112 !
113 ! -- deallocate arrays
114 call mem_deallocate(this%strt)
115 !
116 ! -- deallocate parent
117 call this%NumericalPackageType%da()
subroutine, public memorystore_remove(component, subcomponent, context)
This module contains simulation variables.
character(len=linelength) idm_context
Here is the call graph for this function:

◆ ic_load()

subroutine swficmodule::ic_load ( class(swfictype) this)
private

Definition at line 71 of file swf-ic.f90.

72 ! -- modules
73 ! -- dummy
74 class(SwfIcType) :: this
75 !
76 call this%source_griddata()

◆ source_griddata()

subroutine swficmodule::source_griddata ( class(swfictype) this)
private

Definition at line 135 of file swf-ic.f90.

136 ! -- modules
139 ! -- dummy
140 class(SwfIcType) :: this
141 ! -- local
142 character(len=LINELENGTH) :: errmsg
143 logical(LGP) :: found_strt
144 integer(I4B), dimension(:), pointer, contiguous :: map
145 !
146 ! -- set map to convert user to reduced node data
147 map => null()
148 if (this%dis%nodes < this%dis%nodesuser) map => this%dis%nodeuser
149 !
150 ! -- set values
151 call mem_set_value(this%strt, 'STRT', this%input_mempath, map, found_strt)
152 !
153 ! -- ensure STRT was found
154 if (.not. found_strt) then
155 write (errmsg, '(a)') 'Error in GRIDDATA block: STRT not found.'
156 call store_error(errmsg, terminate=.false.)
157 call store_error_filename(this%input_fname)
158 else if (this%iout > 0) then
159 write (this%iout, '(4x,a)') 'STRT set from input file'
160 end if
This module contains simulation methods.
Definition Sim.f90:10
subroutine, public store_error(msg, terminate)
Store an error message.
Definition Sim.f90:94
subroutine, public store_error_filename(filename, terminate)
Store the erroring file name.
Definition Sim.f90:208
Here is the call graph for this function: