MODFLOW 6  version 6.6.0.dev0
USGS Modular Hydrologic Model
memorymanagerextmodule::mem_set_value Interface Reference
Collaboration diagram for memorymanagerextmodule::mem_set_value:
Collaboration graph

Private Member Functions

subroutine mem_set_value_logical (p_mem, varname, memory_path, found)
 Set pointer to value of memory list logical variable. More...
 
subroutine mem_set_value_int (p_mem, varname, memory_path, found)
 Set pointer to value of memory list int variable. More...
 
subroutine mem_set_value_int_setval (p_mem, varname, memory_path, setval, found)
 
subroutine mem_set_value_str_mapped_int (p_mem, varname, memory_path, str_list, found)
 
subroutine mem_set_value_int1d (p_mem, varname, memory_path, found)
 Set pointer to value of memory list 1d int array variable. More...
 
subroutine mem_set_value_int1d_mapped (p_mem, varname, memory_path, map, found)
 Set pointer to value of memory list 1d int array variable with mapping. More...
 
subroutine mem_set_value_int2d (p_mem, varname, memory_path, found)
 Set pointer to value of memory list 2d int array variable. More...
 
subroutine mem_set_value_int3d (p_mem, varname, memory_path, found)
 Set pointer to value of memory list 3d int array variable. More...
 
subroutine mem_set_value_dbl (p_mem, varname, memory_path, found)
 Set pointer to value of memory list double variable. More...
 
subroutine mem_set_value_dbl1d (p_mem, varname, memory_path, found)
 Set pointer to value of memory list 1d dbl array variable. More...
 
subroutine mem_set_value_dbl1d_mapped (p_mem, varname, memory_path, map, found)
 Set pointer to value of memory list 1d dbl array variable with mapping. More...
 
subroutine mem_set_value_dbl2d (p_mem, varname, memory_path, found)
 Set pointer to value of memory list 2d dbl array variable. More...
 
subroutine mem_set_value_dbl3d (p_mem, varname, memory_path, found)
 Set pointer to value of memory list 3d dbl array variable. More...
 
subroutine mem_set_value_str (p_mem, varname, memory_path, found)
 
subroutine mem_set_value_charstr1d (p_mem, varname, memory_path, found)
 

Detailed Description

Definition at line 14 of file MemoryManagerExt.f90.

Member Function/Subroutine Documentation

◆ mem_set_value_charstr1d()

subroutine memorymanagerextmodule::mem_set_value::mem_set_value_charstr1d ( type(characterstringtype), dimension(:), intent(inout), pointer, contiguous  p_mem,
character(len=*), intent(in)  varname,
character(len=*), intent(in)  memory_path,
logical(lgp), intent(inout)  found 
)
private
Parameters
[in,out]p_mempointer to charstr 1d array
[in]varnamevariable name
[in]memory_pathpath where variable is stored

Definition at line 390 of file MemoryManagerExt.f90.

392  type(CharacterStringType), dimension(:), &
393  pointer, contiguous, intent(inout) :: p_mem !< pointer to charstr 1d array
394  character(len=*), intent(in) :: varname !< variable name
395  character(len=*), intent(in) :: memory_path !< path where variable is stored
396  logical(LGP), intent(inout) :: found
397  type(MemoryType), pointer :: mt
398  logical(LGP) :: checkfail = .false.
399  integer(I4B) :: n
400 
401  call get_from_memorystore(varname, memory_path, mt, found, checkfail)
402  if (.not. found) return
403  if (mt%memtype(1:index(mt%memtype, ' ')) == 'STRING') then
404  do n = 1, size(mt%acharstr1d)
405  p_mem(n) = mt%acharstr1d(n)
406  end do
407  end if
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:

◆ mem_set_value_dbl()

subroutine memorymanagerextmodule::mem_set_value::mem_set_value_dbl ( real(dp), intent(inout), pointer  p_mem,
character(len=*), intent(in)  varname,
character(len=*), intent(in)  memory_path,
logical(lgp), intent(inout)  found 
)
private
Parameters
[in,out]p_mempointer to dbl scalar
[in]varnamevariable name
[in]memory_pathpath where variable is stored

Definition at line 247 of file MemoryManagerExt.f90.

248  real(DP), pointer, intent(inout) :: p_mem !< pointer to dbl scalar
249  character(len=*), intent(in) :: varname !< variable name
250  character(len=*), intent(in) :: memory_path !< path where variable is stored
251  logical(LGP), intent(inout) :: found
252  type(MemoryType), pointer :: mt
253  logical(LGP) :: checkfail = .false.
254 
255  call get_from_memorystore(varname, memory_path, mt, found, checkfail)
256  if (.not. found) return
257  if (mt%memtype(1:index(mt%memtype, ' ')) == 'DOUBLE') then
258  p_mem = mt%dblsclr
259  end if
Here is the call graph for this function:

◆ mem_set_value_dbl1d()

subroutine memorymanagerextmodule::mem_set_value::mem_set_value_dbl1d ( real(dp), dimension(:), intent(inout), pointer, contiguous  p_mem,
character(len=*), intent(in)  varname,
character(len=*), intent(in)  memory_path,
logical(lgp), intent(inout)  found 
)
private
Parameters
[in,out]p_mempointer to 1d dbl array
[in]varnamevariable name
[in]memory_pathpath where variable is stored

Definition at line 264 of file MemoryManagerExt.f90.

265  real(DP), dimension(:), pointer, contiguous, intent(inout) :: p_mem !< pointer to 1d dbl array
266  character(len=*), intent(in) :: varname !< variable name
267  character(len=*), intent(in) :: memory_path !< path where variable is stored
268  logical(LGP), intent(inout) :: found
269  type(MemoryType), pointer :: mt
270  logical(LGP) :: checkfail = .false.
271  integer(I4B) :: n
272 
273  call get_from_memorystore(varname, memory_path, mt, found, checkfail)
274  if (.not. found) return
275  if (mt%memtype(1:index(mt%memtype, ' ')) == 'DOUBLE') then
276  if (size(mt%adbl1d) /= size(p_mem)) then
277  call store_error('mem_set_value() size mismatch dbl1d, varname='//&
278  &trim(varname), terminate=.true.)
279  end if
280  do n = 1, size(mt%adbl1d)
281  p_mem(n) = mt%adbl1d(n)
282  end do
283  end if
Here is the call graph for this function:

◆ mem_set_value_dbl1d_mapped()

subroutine memorymanagerextmodule::mem_set_value::mem_set_value_dbl1d_mapped ( real(dp), dimension(:), intent(inout), pointer, contiguous  p_mem,
character(len=*), intent(in)  varname,
character(len=*), intent(in)  memory_path,
integer(i4b), dimension(:), intent(in), pointer, contiguous  map,
logical(lgp), intent(inout)  found 
)
private
Parameters
[in,out]p_mempointer to 1d dbl array
[in]varnamevariable name
[in]memory_pathpath where variable is stored
[in]mappointer to 1d int mapping array

Definition at line 288 of file MemoryManagerExt.f90.

290  real(DP), dimension(:), pointer, contiguous, intent(inout) :: p_mem !< pointer to 1d dbl array
291  character(len=*), intent(in) :: varname !< variable name
292  character(len=*), intent(in) :: memory_path !< path where variable is stored
293  integer(I4B), dimension(:), pointer, contiguous, intent(in) :: map !< pointer to 1d int mapping array
294  logical(LGP), intent(inout) :: found
295  type(MemoryType), pointer :: mt
296  logical(LGP) :: checkfail = .false.
297  integer(I4B) :: n
298 
299  call get_from_memorystore(varname, memory_path, mt, found, checkfail)
300  if (.not. found) return
301  if (mt%memtype(1:index(mt%memtype, ' ')) == 'DOUBLE') then
302  if (associated(map)) then
303  do n = 1, size(p_mem)
304  p_mem(n) = mt%adbl1d(map(n))
305  end do
306  else
307  if (size(mt%adbl1d) /= size(p_mem)) then
308  call store_error('mem_set_value() size mismatch dbl1d, varname='//&
309  &trim(varname), terminate=.true.)
310  end if
311  do n = 1, size(mt%adbl1d)
312  p_mem(n) = mt%adbl1d(n)
313  end do
314  end if
315  end if
Here is the call graph for this function:

◆ mem_set_value_dbl2d()

subroutine memorymanagerextmodule::mem_set_value::mem_set_value_dbl2d ( real(dp), dimension(:, :), intent(inout), pointer, contiguous  p_mem,
character(len=*), intent(in)  varname,
character(len=*), intent(in)  memory_path,
logical(lgp), intent(inout)  found 
)
private
Parameters
[in,out]p_mempointer to 2d dbl array
[in]varnamevariable name
[in]memory_pathpath where variable is stored

Definition at line 320 of file MemoryManagerExt.f90.

321  real(DP), dimension(:, :), pointer, contiguous, intent(inout) :: p_mem !< pointer to 2d dbl array
322  character(len=*), intent(in) :: varname !< variable name
323  character(len=*), intent(in) :: memory_path !< path where variable is stored
324  logical(LGP), intent(inout) :: found
325  type(MemoryType), pointer :: mt
326  logical(LGP) :: checkfail = .false.
327  integer(I4B) :: i, j
328 
329  call get_from_memorystore(varname, memory_path, mt, found, checkfail)
330  if (.not. found) return
331  if (mt%memtype(1:index(mt%memtype, ' ')) == 'DOUBLE') then
332  if (size(mt%adbl2d, dim=1) /= size(p_mem, dim=1) .or. &
333  size(mt%adbl2d, dim=2) /= size(p_mem, dim=2)) then
334  call store_error('mem_set_value() size mismatch dbl2d, varname='//&
335  &trim(varname), terminate=.true.)
336  end if
337  do j = 1, size(mt%adbl2d, dim=2)
338  do i = 1, size(mt%adbl2d, dim=1)
339  p_mem(i, j) = mt%adbl2d(i, j)
340  end do
341  end do
342  end if
Here is the call graph for this function:

◆ mem_set_value_dbl3d()

subroutine memorymanagerextmodule::mem_set_value::mem_set_value_dbl3d ( real(dp), dimension(:, :, :), intent(inout), pointer, contiguous  p_mem,
character(len=*), intent(in)  varname,
character(len=*), intent(in)  memory_path,
logical(lgp), intent(inout)  found 
)
private
Parameters
[in,out]p_mempointer to 3d dbl array
[in]varnamevariable name
[in]memory_pathpath where variable is stored

Definition at line 347 of file MemoryManagerExt.f90.

348  real(DP), dimension(:, :, :), pointer, contiguous, intent(inout) :: p_mem !< pointer to 3d dbl array
349  character(len=*), intent(in) :: varname !< variable name
350  character(len=*), intent(in) :: memory_path !< path where variable is stored
351  logical(LGP), intent(inout) :: found
352  type(MemoryType), pointer :: mt
353  logical(LGP) :: checkfail = .false.
354  integer(I4B) :: i, j, k
355 
356  call get_from_memorystore(varname, memory_path, mt, found, checkfail)
357  if (.not. found) return
358  if (mt%memtype(1:index(mt%memtype, ' ')) == 'DOUBLE') then
359  if (size(mt%adbl3d, dim=1) /= size(p_mem, dim=1) .or. &
360  size(mt%adbl3d, dim=2) /= size(p_mem, dim=2) .or. &
361  size(mt%adbl3d, dim=3) /= size(p_mem, dim=3)) then
362  call store_error('mem_set_value() size mismatch dbl3d, varname='//&
363  &trim(varname), terminate=.true.)
364  end if
365  do k = 1, size(mt%adbl3d, dim=3)
366  do j = 1, size(mt%adbl3d, dim=2)
367  do i = 1, size(mt%adbl3d, dim=1)
368  p_mem(i, j, k) = mt%adbl3d(i, j, k)
369  end do
370  end do
371  end do
372  end if
Here is the call graph for this function:

◆ mem_set_value_int()

subroutine memorymanagerextmodule::mem_set_value::mem_set_value_int ( integer(i4b), intent(inout), pointer  p_mem,
character(len=*), intent(in)  varname,
character(len=*), intent(in)  memory_path,
logical(lgp), intent(inout)  found 
)
private
Parameters
[in,out]p_mempointer to int scalar
[in]varnamevariable name
[in]memory_pathpath where variable is stored

Definition at line 79 of file MemoryManagerExt.f90.

80  integer(I4B), pointer, intent(inout) :: p_mem !< pointer to int scalar
81  character(len=*), intent(in) :: varname !< variable name
82  character(len=*), intent(in) :: memory_path !< path where variable is stored
83  logical(LGP), intent(inout) :: found
84  type(MemoryType), pointer :: mt
85  logical(LGP) :: checkfail = .false.
86 
87  call get_from_memorystore(varname, memory_path, mt, found, checkfail)
88  if (.not. found) return
89  if (mt%memtype(1:index(mt%memtype, ' ')) == 'INTEGER') then
90  p_mem = mt%intsclr
91  end if
Here is the call graph for this function:

◆ mem_set_value_int1d()

subroutine memorymanagerextmodule::mem_set_value::mem_set_value_int1d ( integer(i4b), dimension(:), intent(inout), pointer, contiguous  p_mem,
character(len=*), intent(in)  varname,
character(len=*), intent(in)  memory_path,
logical(lgp), intent(inout)  found 
)
private
Parameters
[in,out]p_mempointer to 1d int array
[in]varnamevariable name
[in]memory_pathpath where variable is stored

Definition at line 134 of file MemoryManagerExt.f90.

135  integer(I4B), dimension(:), pointer, contiguous, intent(inout) :: p_mem !< pointer to 1d int array
136  character(len=*), intent(in) :: varname !< variable name
137  character(len=*), intent(in) :: memory_path !< path where variable is stored
138  logical(LGP), intent(inout) :: found
139  type(MemoryType), pointer :: mt
140  logical(LGP) :: checkfail = .false.
141  integer(I4B) :: n
142 
143  call get_from_memorystore(varname, memory_path, mt, found, checkfail)
144  if (.not. found) return
145  if (mt%memtype(1:index(mt%memtype, ' ')) == 'INTEGER') then
146  if (size(mt%aint1d) /= size(p_mem)) then
147  call store_error('mem_set_value() size mismatch int1d, varname='//&
148  &trim(varname), terminate=.true.)
149  end if
150  do n = 1, size(mt%aint1d)
151  p_mem(n) = mt%aint1d(n)
152  end do
153  end if
Here is the call graph for this function:

◆ mem_set_value_int1d_mapped()

subroutine memorymanagerextmodule::mem_set_value::mem_set_value_int1d_mapped ( integer(i4b), dimension(:), intent(inout), pointer, contiguous  p_mem,
character(len=*), intent(in)  varname,
character(len=*), intent(in)  memory_path,
integer(i4b), dimension(:), intent(in), pointer, contiguous  map,
logical(lgp), intent(inout)  found 
)
private
Parameters
[in,out]p_mempointer to 1d int array
[in]varnamevariable name
[in]memory_pathpath where variable is stored
[in]mappointer to 1d int mapping array

Definition at line 158 of file MemoryManagerExt.f90.

160  integer(I4B), dimension(:), pointer, contiguous, intent(inout) :: p_mem !< pointer to 1d int array
161  character(len=*), intent(in) :: varname !< variable name
162  character(len=*), intent(in) :: memory_path !< path where variable is stored
163  integer(I4B), dimension(:), pointer, contiguous, intent(in) :: map !< pointer to 1d int mapping array
164  logical(LGP), intent(inout) :: found
165  type(MemoryType), pointer :: mt
166  logical(LGP) :: checkfail = .false.
167  integer(I4B) :: n
168 
169  call get_from_memorystore(varname, memory_path, mt, found, checkfail)
170  if (.not. found) return
171  if (mt%memtype(1:index(mt%memtype, ' ')) == 'INTEGER') then
172  if (associated(map)) then
173  do n = 1, size(p_mem)
174  p_mem(n) = mt%aint1d(map(n))
175  end do
176  else
177  if (size(mt%aint1d) /= size(p_mem)) then
178  call store_error('mem_set_value() size mismatch int1d, varname='//&
179  &trim(varname), terminate=.true.)
180  end if
181  do n = 1, size(mt%aint1d)
182  p_mem(n) = mt%aint1d(n)
183  end do
184  end if
185  end if
Here is the call graph for this function:

◆ mem_set_value_int2d()

subroutine memorymanagerextmodule::mem_set_value::mem_set_value_int2d ( integer(i4b), dimension(:, :), intent(inout), pointer, contiguous  p_mem,
character(len=*), intent(in)  varname,
character(len=*), intent(in)  memory_path,
logical(lgp), intent(inout)  found 
)
private
Parameters
[in,out]p_mempointer to 2d int array
[in]varnamevariable name
[in]memory_pathpath where variable is stored

Definition at line 190 of file MemoryManagerExt.f90.

191  integer(I4B), dimension(:, :), pointer, contiguous, intent(inout) :: p_mem !< pointer to 2d int array
192  character(len=*), intent(in) :: varname !< variable name
193  character(len=*), intent(in) :: memory_path !< path where variable is stored
194  logical(LGP), intent(inout) :: found
195  type(MemoryType), pointer :: mt
196  logical(LGP) :: checkfail = .false.
197  integer(I4B) :: i, j
198 
199  call get_from_memorystore(varname, memory_path, mt, found, checkfail)
200  if (.not. found) return
201  if (mt%memtype(1:index(mt%memtype, ' ')) == 'INTEGER') then
202  if (size(mt%aint2d, dim=1) /= size(p_mem, dim=1) .or. &
203  size(mt%aint2d, dim=2) /= size(p_mem, dim=2)) then
204  call store_error('mem_set_value() size mismatch int2d, varname='//&
205  &trim(varname), terminate=.true.)
206  end if
207  do j = 1, size(mt%aint2d, dim=2)
208  do i = 1, size(mt%aint2d, dim=1)
209  p_mem(i, j) = mt%aint2d(i, j)
210  end do
211  end do
212  end if
Here is the call graph for this function:

◆ mem_set_value_int3d()

subroutine memorymanagerextmodule::mem_set_value::mem_set_value_int3d ( integer(i4b), dimension(:, :, :), intent(inout), pointer, contiguous  p_mem,
character(len=*), intent(in)  varname,
character(len=*), intent(in)  memory_path,
logical(lgp), intent(inout)  found 
)
private
Parameters
[in,out]p_mempointer to 3d int array
[in]varnamevariable name
[in]memory_pathpath where variable is stored

Definition at line 217 of file MemoryManagerExt.f90.

218  integer(I4B), dimension(:, :, :), pointer, contiguous, intent(inout) :: p_mem !< pointer to 3d int array
219  character(len=*), intent(in) :: varname !< variable name
220  character(len=*), intent(in) :: memory_path !< path where variable is stored
221  logical(LGP), intent(inout) :: found
222  type(MemoryType), pointer :: mt
223  logical(LGP) :: checkfail = .false.
224  integer(I4B) :: i, j, k
225 
226  call get_from_memorystore(varname, memory_path, mt, found, checkfail)
227  if (.not. found) return
228  if (mt%memtype(1:index(mt%memtype, ' ')) == 'INTEGER') then
229  if (size(mt%aint3d, dim=1) /= size(p_mem, dim=1) .or. &
230  size(mt%aint3d, dim=2) /= size(p_mem, dim=2) .or. &
231  size(mt%aint3d, dim=3) /= size(p_mem, dim=3)) then
232  call store_error('mem_set_value() size mismatch int3d, varname='//&
233  &trim(varname), terminate=.true.)
234  end if
235  do k = 1, size(mt%aint3d, dim=3)
236  do j = 1, size(mt%aint3d, dim=2)
237  do i = 1, size(mt%aint3d, dim=1)
238  p_mem(i, j, k) = mt%aint3d(i, j, k)
239  end do
240  end do
241  end do
242  end if
Here is the call graph for this function:

◆ mem_set_value_int_setval()

subroutine memorymanagerextmodule::mem_set_value::mem_set_value_int_setval ( integer(i4b), intent(inout), pointer  p_mem,
character(len=*), intent(in)  varname,
character(len=*), intent(in)  memory_path,
integer(i4b), intent(in)  setval,
logical(lgp), intent(inout)  found 
)
private
Parameters
[in,out]p_mempointer to int scalar
[in]varnamevariable name
[in]memory_pathpath where variable is stored
[in]setvalset p_mem to setval if varname found

Definition at line 94 of file MemoryManagerExt.f90.

95  integer(I4B), pointer, intent(inout) :: p_mem !< pointer to int scalar
96  character(len=*), intent(in) :: varname !< variable name
97  character(len=*), intent(in) :: memory_path !< path where variable is stored
98  integer(I4B), intent(in) :: setval !< set p_mem to setval if varname found
99  logical(LGP), intent(inout) :: found
100  type(MemoryType), pointer :: mt
101  logical(LGP) :: checkfail = .false.
102 
103  call get_from_memorystore(varname, memory_path, mt, found, checkfail)
104  if (.not. found) return
105 
106  p_mem = setval
107 
Here is the call graph for this function:

◆ mem_set_value_logical()

subroutine memorymanagerextmodule::mem_set_value::mem_set_value_logical ( logical(lgp), intent(inout), pointer  p_mem,
character(len=*), intent(in)  varname,
character(len=*), intent(in)  memory_path,
logical(lgp), intent(inout)  found 
)
private
Parameters
[in,out]p_mempointer to logical scalar
[in]varnamevariable name
[in]memory_pathpath where variable is stored

Definition at line 58 of file MemoryManagerExt.f90.

59  logical(LGP), pointer, intent(inout) :: p_mem !< pointer to logical scalar
60  character(len=*), intent(in) :: varname !< variable name
61  character(len=*), intent(in) :: memory_path !< path where variable is stored
62  logical(LGP), intent(inout) :: found
63  type(MemoryType), pointer :: mt
64  logical(LGP) :: checkfail = .false.
65 
66  call get_from_memorystore(varname, memory_path, mt, found, checkfail)
67  if (.not. found) return
68  if (mt%memtype(1:index(mt%memtype, ' ')) == 'INTEGER') then
69  if (mt%intsclr == 0) then
70  p_mem = .false.
71  else
72  p_mem = .true.
73  end if
74  end if
Here is the call graph for this function:

◆ mem_set_value_str()

subroutine memorymanagerextmodule::mem_set_value::mem_set_value_str ( character(len=*), intent(inout)  p_mem,
character(len=*), intent(in)  varname,
character(len=*), intent(in)  memory_path,
logical(lgp), intent(inout)  found 
)
private
Parameters
[in,out]p_mempointer to str scalar
[in]varnamevariable name
[in]memory_pathpath where variable is stored

Definition at line 375 of file MemoryManagerExt.f90.

376  character(len=*), intent(inout) :: p_mem !< pointer to str scalar
377  character(len=*), intent(in) :: varname !< variable name
378  character(len=*), intent(in) :: memory_path !< path where variable is stored
379  logical(LGP), intent(inout) :: found
380  type(MemoryType), pointer :: mt
381  logical(LGP) :: checkfail = .false.
382 
383  call get_from_memorystore(varname, memory_path, mt, found, checkfail)
384  if (.not. found) return
385  if (mt%memtype(1:index(mt%memtype, ' ')) == 'STRING') then
386  p_mem = mt%strsclr
387  end if
Here is the call graph for this function:

◆ mem_set_value_str_mapped_int()

subroutine memorymanagerextmodule::mem_set_value::mem_set_value_str_mapped_int ( integer(i4b), intent(inout), pointer  p_mem,
character(len=*), intent(in)  varname,
character(len=*), intent(in)  memory_path,
character(len=*), dimension(:), intent(in)  str_list,
logical(lgp), intent(inout)  found 
)
private
Parameters
[in,out]p_mempointer to int scalar
[in]varnamevariable name
[in]memory_pathpath where variable is stored

Definition at line 110 of file MemoryManagerExt.f90.

112  integer(I4B), pointer, intent(inout) :: p_mem !< pointer to int scalar
113  character(len=*), intent(in) :: varname !< variable name
114  character(len=*), intent(in) :: memory_path !< path where variable is stored
115  character(len=*), dimension(:), intent(in) :: str_list
116  logical(LGP), intent(inout) :: found
117  type(MemoryType), pointer :: mt
118  logical(LGP) :: checkfail = .false.
119  integer(I4B) :: i
120 
121  call get_from_memorystore(varname, memory_path, mt, found, checkfail)
122  if (.not. found) return
123  if (mt%memtype(1:index(mt%memtype, ' ')) == 'STRING') then
124  do i = 1, size(str_list)
125  if (mt%strsclr == str_list(i)) then
126  p_mem = i
127  end if
128  end do
129  end if
Here is the call graph for this function:

The documentation for this interface was generated from the following file: