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

Data Types

type  prtmiptype

Functions/Subroutines

subroutine, public mip_cr (mip, name_model, input_mempath, inunit, iout, dis)
 Create a model input object.
subroutine mip_da (this)
 Deallocate memory.
subroutine allocate_scalars (this)
subroutine allocate_arrays (this, nodes)
 Allocate arrays.
subroutine mip_ar (this)
 Initialize package inputs.

Function/Subroutine Documentation

◆ allocate_arrays()

subroutine prtmipmodule::allocate_arrays ( class(prtmiptype) this,
integer(i4b), intent(in) nodes )
private

Definition at line 91 of file prt-mip.f90.

92 class(PrtMipType) :: this
93 integer(I4B), intent(in) :: nodes
94 ! local
95 integer(I4B) :: i
96 !
97 ! Allocate
98 call mem_allocate(this%porosity, nodes, 'POROSITY', this%memoryPath)
99 call mem_allocate(this%retfactor, nodes, 'RETFACTOR', this%memoryPath)
100 call mem_allocate(this%izone, nodes, 'IZONE', this%memoryPath)
101 !
102 do i = 1, nodes
103 this%porosity(i) = dzero
104 this%retfactor(i) = done
105 this%izone(i) = 0
106 end do
107

◆ allocate_scalars()

subroutine prtmipmodule::allocate_scalars ( class(prtmiptype) this)
private

Definition at line 85 of file prt-mip.f90.

86 class(PrtMipType) :: this
87 call this%NumericalPackageType%allocate_scalars()

◆ mip_ar()

subroutine prtmipmodule::mip_ar ( class(prtmiptype), intent(inout) this)
private
Parameters
[in,out]thisPrtMipType object

Definition at line 111 of file prt-mip.f90.

112 ! dummy variables
113 class(PrtMipType), intent(inout) :: this !< PrtMipType object
114 ! local variables
115 character(len=LINELENGTH) :: errmsg
116 type(PrtMipParamFoundType) :: found
117 integer(I4B), dimension(:), pointer, contiguous :: map => null()
118 !
119 ! set map to convert user input data into reduced data
120 if (this%dis%nodes < this%dis%nodesuser) map => this%dis%nodeuser
121 !
122 ! Allocate arrays
123 call this%allocate_arrays(this%dis%nodes)
124 !
125 ! Source array inputs from IDM
126 call mem_set_value(this%porosity, 'POROSITY', this%input_mempath, &
127 map, found%porosity)
128 call mem_set_value(this%retfactor, 'RETFACTOR', this%input_mempath, &
129 map, found%retfactor)
130 call mem_set_value(this%izone, 'IZONE', this%input_mempath, map, &
131 found%izone)
132 !
133 ! Ensure POROSITY was found
134 if (.not. found%porosity) then
135 write (errmsg, '(a)') 'Error in GRIDDATA block: POROSITY not found'
136 call store_error(errmsg)
137 end if
138
Here is the call graph for this function:

◆ mip_cr()

subroutine, public prtmipmodule::mip_cr ( type(prtmiptype), pointer mip,
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 33 of file prt-mip.f90.

34 ! dummy
35 type(PrtMipType), pointer :: mip
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 :: fmtheader = &
43 "(1x, /1x, 'MIP MODEL INPUT PACKAGE', &
44 &' INPUT READ FROM MEMPATH: ', A, /)"
45 !
46 ! Create the object
47 allocate (mip)
48 !
49 ! Create name and memory path
50 call mip%set_names(1, name_model, 'MIP', 'MIP', input_mempath)
51 !
52 ! Allocate scalars
53 call mip%allocate_scalars()
54 !
55 ! Set variables
56 mip%inunit = inunit
57 mip%iout = iout
58 !
59 ! Set pointers
60 mip%dis => dis
61 !
62 ! Print a message identifying the package if enabled
63 if (inunit > 0) &
64 write (iout, fmtheader) input_mempath
65
Here is the caller graph for this function:

◆ mip_da()

subroutine prtmipmodule::mip_da ( class(prtmiptype) this)
private

Definition at line 69 of file prt-mip.f90.

70 class(PrtMipType) :: this
71 !
72 ! Deallocate input memory
73 call memorystore_remove(this%name_model, 'MIP', idm_context)
74 !
75 ! Deallocate parent package
76 call this%NumericalPackageType%da()
77 !
78 ! Deallocate arrays
79 call mem_deallocate(this%porosity)
80 call mem_deallocate(this%retfactor)
81 call mem_deallocate(this%izone)
82
Here is the call graph for this function: