146 character(len=*),
intent(in) :: name
147 character(len=*),
intent(in) :: mem_path
148 character(len=LENMEMTYPE),
intent(out) :: var_type
151 logical(LGP) :: found
157 var_type = mt%memtype
166 character(len=*),
intent(in) :: name
167 character(len=*),
intent(in) :: mem_path
168 integer(I4B),
intent(out) :: rank
171 logical(LGP) :: found
182 if (
associated(mt%logicalsclr)) rank = 0
183 if (
associated(mt%intsclr)) rank = 0
184 if (
associated(mt%dblsclr)) rank = 0
185 if (
associated(mt%aint1d)) rank = 1
186 if (
associated(mt%aint2d)) rank = 2
187 if (
associated(mt%aint3d)) rank = 3
188 if (
associated(mt%adbl1d)) rank = 1
189 if (
associated(mt%adbl2d)) rank = 2
190 if (
associated(mt%adbl3d)) rank = 3
191 if (
associated(mt%strsclr)) rank = 0
192 if (
associated(mt%astr1d)) rank = 1
193 if (
associated(mt%acharstr1d)) rank = 1
202 character(len=*),
intent(in) :: name
203 character(len=*),
intent(in) :: mem_path
204 integer(I4B),
intent(out) :: size
207 logical(LGP) :: found
218 size = mt%element_size
228 character(len=*),
intent(in) :: name
229 character(len=*),
intent(in) :: mem_path
230 integer(I4B),
dimension(:),
intent(out) :: mem_shape
233 logical(LGP) :: found
241 if (
associated(mt%logicalsclr)) mem_shape = shape(mt%logicalsclr)
242 if (
associated(mt%intsclr)) mem_shape = shape(mt%logicalsclr)
243 if (
associated(mt%dblsclr)) mem_shape = shape(mt%dblsclr)
244 if (
associated(mt%aint1d)) mem_shape = shape(mt%aint1d)
245 if (
associated(mt%aint2d)) mem_shape = shape(mt%aint2d)
246 if (
associated(mt%aint3d)) mem_shape = shape(mt%aint3d)
247 if (
associated(mt%adbl1d)) mem_shape = shape(mt%adbl1d)
248 if (
associated(mt%adbl2d)) mem_shape = shape(mt%adbl2d)
249 if (
associated(mt%adbl3d)) mem_shape = shape(mt%adbl3d)
250 if (
associated(mt%strsclr)) mem_shape = shape(mt%strsclr)
251 if (
associated(mt%astr1d)) mem_shape = shape(mt%astr1d)
252 if (
associated(mt%acharstr1d)) mem_shape = shape(mt%acharstr1d)
265 character(len=*),
intent(in) :: name
266 character(len=*),
intent(in) :: mem_path
267 integer(I4B),
intent(out) :: isize
270 logical(LGP) :: found
271 logical(LGP) :: terminate
295 character(len=*),
intent(in) :: name
296 character(len=*),
intent(in) :: mem_path
297 type(
memorytype),
pointer,
intent(inout) :: mt
298 logical(LGP),
intent(out) :: found
299 logical(LGP),
intent(in),
optional :: check
302 logical(LGP) check_opt
305 found =
associated(mt)
308 if (
present(check))
then
312 if (.not. found)
then
313 errmsg =
"Programming error in memory manager. Variable '"// &
314 trim(name)//
"' in '"//trim(mem_path)//
"' cannot be "// &
315 "assigned because it does not exist in memory manager."
324 character(len=*),
intent(in) :: varname
325 character(len=*),
intent(in) :: mem_path
326 integer(I4B),
intent(in) :: istat
327 integer(I4B),
intent(in) :: isize
329 character(len=20) :: csize
330 character(len=20) :: cstat
334 write (csize,
'(i0)') isize
335 write (cstat,
'(i0)') istat
338 errmsg =
"Error trying to allocate memory. Path '"//trim(mem_path)// &
339 "' variable name '"//trim(varname)//
"' size '"//trim(csize)// &
340 "'. Error message is '"//trim(adjustl(
errmsg))// &
341 "'. Status code is "//trim(cstat)//
'.'
350 logical(LGP),
pointer,
intent(inout) :: sclr
351 character(len=*),
intent(in) :: name
352 character(len=*),
intent(in) :: mem_path
354 integer(I4B) :: istat
374 mt%logicalsclr => sclr
375 mt%element_size = lgp
379 write (mt%memtype,
"(a)")
'LOGICAL'
388 integer(I4B),
intent(in) :: ilen
389 character(len=ilen),
pointer,
intent(inout) :: sclr
390 character(len=*),
intent(in) :: name
391 character(len=*),
intent(in) :: mem_path
393 integer(I4B) :: istat
400 errmsg =
'Programming error in allocate_str. ILEN must be greater than 0.'
408 allocate (
character(len=ilen) :: sclr, stat=istat,
errmsg=
errmsg)
424 mt%element_size = ilen
428 write (mt%memtype,
"(a,' LEN=',i0)")
'STRING', ilen
437 integer(I4B),
intent(in) :: ilen
438 character(len=ilen),
dimension(:), &
439 pointer,
contiguous,
intent(inout) :: astr1d
440 integer(I4B),
intent(in) :: nrow
441 character(len=*),
intent(in) :: name
442 character(len=*),
intent(in) :: mem_path
445 character(len=ilen) :: string
447 integer(I4B) :: istat
448 integer(I4B) :: isize
456 errmsg =
'Programming error in allocate_str1d. '// &
457 'ILEN must be greater than 0.'
468 allocate (
character(len=ilen) :: astr1d(nrow), stat=istat,
errmsg=
errmsg)
490 mt%element_size = ilen
494 write (mt%memtype,
"(a,' LEN=',i0,' (',i0,')')")
'STRING', ilen, nrow
504 pointer,
contiguous,
intent(inout) :: acharstr1d
505 integer(I4B),
intent(in) :: ilen
506 integer(I4B),
intent(in) :: nrow
507 character(len=*),
intent(in) :: name
508 character(len=*),
intent(in) :: mem_path
510 character(len=ilen) :: string
513 integer(I4B) :: istat
514 integer(I4B) :: isize
536 acharstr1d(n) = string
546 mt%acharstr1d => acharstr1d
547 mt%element_size = ilen
551 write (mt%memtype,
"(a,' LEN=',i0,' (',i0,')')")
'STRING', ilen, nrow
560 integer(I4B),
pointer,
intent(inout) :: sclr
561 character(len=*),
intent(in) :: name
562 character(len=*),
intent(in) :: mem_path
565 integer(I4B) :: istat
585 mt%element_size = i4b
589 write (mt%memtype,
"(a)")
'INTEGER'
598 integer(I4B),
dimension(:),
pointer,
contiguous,
intent(inout) :: aint
599 integer(I4B),
intent(in) :: nrow
600 character(len=*),
intent(in) :: name
601 character(len=*),
intent(in) :: mem_path
604 integer(I4B) :: istat
605 integer(I4B) :: isize
628 mt%element_size = i4b
632 write (mt%memtype,
"(a,' (',i0,')')")
'INTEGER', isize
641 integer(I4B),
dimension(:, :),
pointer,
contiguous,
intent(inout) :: aint
642 integer(I4B),
intent(in) :: ncol
643 integer(I4B),
intent(in) :: nrow
644 character(len=*),
intent(in) :: name
645 character(len=*),
intent(in) :: mem_path
648 integer(I4B) :: istat
649 integer(I4B) :: isize
672 mt%element_size = i4b
676 write (mt%memtype,
"(a,' (',i0,',',i0,')')")
'INTEGER', ncol, nrow
685 integer(I4B),
dimension(:, :, :),
pointer,
contiguous,
intent(inout) :: aint
686 integer(I4B),
intent(in) :: ncol
687 integer(I4B),
intent(in) :: nrow
688 integer(I4B),
intent(in) :: nlay
689 character(len=*),
intent(in) :: name
690 character(len=*),
intent(in) :: mem_path
693 integer(I4B) :: istat
694 integer(I4B) :: isize
701 isize = ncol * nrow * nlay
704 allocate (aint(ncol, nrow, nlay), stat=istat,
errmsg=
errmsg)
717 mt%element_size = i4b
721 write (mt%memtype,
"(a,' (',i0,',',i0,',',i0,')')")
'INTEGER', ncol, &
731 real(DP),
pointer,
intent(inout) :: sclr
732 character(len=*),
intent(in) :: name
733 character(len=*),
intent(in) :: mem_path
736 integer(I4B) :: istat
760 write (mt%memtype,
"(a)")
'DOUBLE'
769 real(DP),
dimension(:),
pointer,
contiguous,
intent(inout) :: adbl
770 integer(I4B),
intent(in) :: nrow
771 character(len=*),
intent(in) :: name
772 character(len=*),
intent(in) :: mem_path
775 integer(I4B) :: istat
776 integer(I4B) :: isize
803 write (mt%memtype,
"(a,' (',i0,')')")
'DOUBLE', isize
812 real(DP),
dimension(:, :),
pointer,
contiguous,
intent(inout) :: adbl
813 integer(I4B),
intent(in) :: ncol
814 integer(I4B),
intent(in) :: nrow
815 character(len=*),
intent(in) :: name
816 character(len=*),
intent(in) :: mem_path
819 integer(I4B) :: istat
820 integer(I4B) :: isize
847 write (mt%memtype,
"(a,' (',i0,',',i0,')')")
'DOUBLE', ncol, nrow
856 real(DP),
dimension(:, :, :),
pointer,
contiguous,
intent(inout) :: adbl
857 integer(I4B),
intent(in) :: ncol
858 integer(I4B),
intent(in) :: nrow
859 integer(I4B),
intent(in) :: nlay
860 character(len=*),
intent(in) :: name
861 character(len=*),
intent(in) :: mem_path
864 integer(I4B) :: istat
865 integer(I4B) :: isize
872 isize = ncol * nrow * nlay
875 allocate (adbl(ncol, nrow, nlay), stat=istat,
errmsg=
errmsg)
892 write (mt%memtype,
"(a,' (',i0,',',i0,',',i0,')')")
'DOUBLE', ncol, &
902 integer(I4B),
dimension(:),
pointer,
contiguous,
intent(in) :: aint
903 character(len=*),
intent(in) :: name
904 character(len=*),
intent(in) :: mem_path
905 character(len=*),
intent(in) :: name2
906 character(len=*),
intent(in) :: mem_path2
909 integer(I4B) :: isize
923 mt%element_size = i4b
927 write (mt%memtype,
"(a,' (',i0,')')")
'INTEGER', isize
931 mt%mastername = name2
932 mt%masterPath = mem_path2
941 integer(I4B),
dimension(:, :),
pointer,
contiguous,
intent(inout) :: aint2d
942 character(len=*),
intent(in) :: name
943 character(len=*),
intent(in) :: mem_path
944 character(len=*),
intent(in) :: name2
945 character(len=*),
intent(in) :: mem_path2
948 integer(I4B) :: ncol, nrow, isize
955 ncol =
size(aint2d, dim=1)
956 nrow =
size(aint2d, dim=2)
967 write (mt%memtype,
"(a,' (',i0,',',i0,')')")
'INTEGER', ncol, nrow
971 mt%mastername = name2
972 mt%masterPath = mem_path2
981 real(DP),
dimension(:),
pointer,
contiguous,
intent(inout) :: adbl
982 character(len=*),
intent(in) :: name
983 character(len=*),
intent(in) :: mem_path
984 character(len=*),
intent(in) :: name2
985 character(len=*),
intent(in) :: mem_path2
988 integer(I4B) :: isize
1002 mt%element_size = dp
1006 write (mt%memtype,
"(a,' (',i0,')')")
'DOUBLE', isize
1010 mt%mastername = name2
1011 mt%masterPath = mem_path2
1020 real(DP),
dimension(:, :),
pointer,
contiguous,
intent(inout) :: adbl2d
1021 character(len=*),
intent(in) :: name
1022 character(len=*),
intent(in) :: mem_path
1023 character(len=*),
intent(in) :: name2
1024 character(len=*),
intent(in) :: mem_path2
1027 integer(I4B) :: ncol, nrow, isize
1034 ncol =
size(adbl2d, dim=1)
1035 nrow =
size(adbl2d, dim=2)
1046 write (mt%memtype,
"(a,' (',i0,',',i0,')')")
'DOUBLE', ncol, nrow
1050 mt%mastername = name2
1051 mt%masterPath = mem_path2
1061 pointer,
contiguous,
intent(inout) :: acharstr1d
1062 integer(I4B),
intent(in) :: ilen
1063 character(len=*),
intent(in) :: name
1064 character(len=*),
intent(in) :: mem_path
1065 character(len=*),
intent(in) :: name2
1066 character(len=*),
intent(in) :: mem_path2
1069 integer(I4B) :: isize
1076 isize =
size(acharstr1d)
1082 mt%acharstr1d => acharstr1d
1083 mt%element_size = ilen
1087 write (mt%memtype,
"(a,' LEN=',i0,' (',i0,')')")
'STRING', ilen, isize
1091 mt%mastername = name2
1092 mt%masterPath = mem_path2
1101 integer(I4B),
intent(in) :: ilen
1102 integer(I4B),
intent(in) :: nrow
1103 character(len=ilen),
dimension(:),
pointer,
contiguous,
intent(inout) :: astr
1104 character(len=*),
intent(in) :: name
1105 character(len=*),
intent(in) :: mem_path
1108 logical(LGP) :: found
1109 character(len=ilen),
dimension(:),
allocatable :: astrtemp
1110 integer(I4B) :: istat
1111 integer(I4B) :: isize
1112 integer(I4B) :: isize_old
1113 integer(I4B) :: nrow_old
1121 isize_old = mt%isize
1122 if (isize_old > 0)
then
1123 nrow_old =
size(astr)
1133 if (istat /= 0)
then
1139 astrtemp(n) = astr(n)
1143 do n = nrow_old + 1, nrow
1152 if (istat /= 0)
then
1158 astr(n) = astrtemp(n)
1162 deallocate (astrtemp)
1165 mt%element_size = ilen
1167 mt%nrealloc = mt%nrealloc + 1
1170 write (mt%memtype,
"(a,' LEN=',i0,' (',i0,')')")
'STRING', ilen, nrow
1172 errmsg =
"Programming error, variable '"//trim(name)//
"' from '"// &
1173 trim(mem_path)//
"' is not defined in the memory manager. Use "// &
1174 "mem_allocate instead."
1183 intent(inout) :: acharstr1d
1184 integer(I4B),
intent(in) :: ilen
1185 integer(I4B),
intent(in) :: nrow
1186 character(len=*),
intent(in) :: name
1187 character(len=*),
intent(in) :: mem_path
1190 logical(LGP) :: found
1192 character(len=ilen) :: string
1193 integer(I4B) :: istat
1194 integer(I4B) :: isize
1195 integer(I4B) :: isize_old
1196 integer(I4B) :: nrow_old
1207 isize_old = mt%isize
1208 if (isize_old > 0)
then
1209 nrow_old =
size(acharstr1d)
1219 if (istat /= 0)
then
1225 astrtemp(n) = acharstr1d(n)
1226 call acharstr1d(n)%destroy()
1230 do n = nrow_old + 1, nrow
1231 astrtemp(n) = string
1235 deallocate (acharstr1d)
1239 if (istat /= 0)
then
1245 acharstr1d(n) = astrtemp(n)
1246 call astrtemp(n)%destroy()
1250 deallocate (astrtemp)
1253 mt%acharstr1d => acharstr1d
1254 mt%element_size = ilen
1256 mt%nrealloc = mt%nrealloc + 1
1259 write (mt%memtype,
"(a,' LEN=',i0,' (',i0,')')")
'STRING', ilen, nrow
1261 errmsg =
"Programming error, variable '"//trim(name)//
"' from '"// &
1262 trim(mem_path)//
"' is not defined in the memory manager. Use "// &
1263 "mem_allocate instead."
1271 integer(I4B),
dimension(:),
pointer,
contiguous,
intent(inout) :: aint
1272 integer(I4B),
intent(in) :: nrow
1273 character(len=*),
intent(in) :: name
1274 character(len=*),
intent(in) :: mem_path
1277 logical(LGP) :: found
1278 integer(I4B) :: istat
1279 integer(I4B) :: isize
1281 integer(I4B) :: isizeold
1282 integer(I4B) :: ifill
1290 isizeold =
size(mt%aint1d)
1291 ifill = min(isizeold, isize)
1293 if (istat /= 0)
then
1297 aint(i) = mt%aint1d(i)
1301 deallocate (mt%aint1d)
1303 mt%element_size = i4b
1305 mt%nrealloc = mt%nrealloc + 1
1313 integer(I4B),
dimension(:, :),
pointer,
contiguous,
intent(inout) :: aint
1314 integer(I4B),
intent(in) :: ncol
1315 integer(I4B),
intent(in) :: nrow
1316 character(len=*),
intent(in) :: name
1317 character(len=*),
intent(in) :: mem_path
1320 logical(LGP) :: found
1321 integer(I4B) :: istat
1322 integer(I4B),
dimension(2) :: ishape
1325 integer(I4B) :: isize
1326 integer(I4B) :: isizeold
1333 ishape = shape(mt%aint2d)
1335 isizeold = ishape(1) * ishape(2)
1337 if (istat /= 0)
then
1342 aint(j, i) = mt%aint2d(j, i)
1347 deallocate (mt%aint2d)
1349 mt%element_size = i4b
1351 mt%nrealloc = mt%nrealloc + 1
1354 write (mt%memtype,
"(a,' (',i0,',',i0,')')")
'INTEGER', ncol, nrow
1360 real(DP),
dimension(:),
pointer,
contiguous,
intent(inout) :: adbl
1361 integer(I4B),
intent(in) :: nrow
1362 character(len=*),
intent(in) :: name
1363 character(len=*),
intent(in) :: mem_path
1366 integer(I4B) :: istat
1367 integer(I4B) :: isize
1369 integer(I4B) :: isizeold
1370 integer(I4B) :: ifill
1371 logical(LGP) :: found
1379 isizeold =
size(mt%adbl1d)
1380 ifill = min(isizeold, isize)
1382 if (istat /= 0)
then
1386 adbl(i) = mt%adbl1d(i)
1390 deallocate (mt%adbl1d)
1392 mt%element_size = dp
1394 mt%nrealloc = mt%nrealloc + 1
1397 write (mt%memtype,
"(a,' (',i0,')')")
'DOUBLE', isize
1403 real(DP),
dimension(:, :),
pointer,
contiguous,
intent(inout) :: adbl
1404 integer(I4B),
intent(in) :: ncol
1405 integer(I4B),
intent(in) :: nrow
1406 character(len=*),
intent(in) :: name
1407 character(len=*),
intent(in) :: mem_path
1410 logical(LGP) :: found
1411 integer(I4B) :: istat
1412 integer(I4B),
dimension(2) :: ishape
1415 integer(I4B) :: isize
1416 integer(I4B) :: isizeold
1423 ishape = shape(mt%adbl2d)
1425 isizeold = ishape(1) * ishape(2)
1427 if (istat /= 0)
then
1432 adbl(j, i) = mt%adbl2d(j, i)
1437 deallocate (mt%adbl2d)
1439 mt%element_size = dp
1441 mt%nrealloc = mt%nrealloc + 1
1444 write (mt%memtype,
"(a,' (',i0,',',i0,')')")
'DOUBLE', ncol, nrow
1450 logical(LGP),
pointer,
intent(inout) :: sclr
1451 character(len=*),
intent(in) :: name
1452 character(len=*),
intent(in) :: mem_path
1455 logical(LGP) :: found
1458 sclr => mt%logicalsclr
1464 integer(I4B),
pointer,
intent(inout) :: sclr
1465 character(len=*),
intent(in) :: name
1466 character(len=*),
intent(in) :: mem_path
1469 logical(LGP) :: found
1478 integer(I4B),
dimension(:),
pointer,
contiguous,
intent(inout) :: aint
1479 character(len=*),
intent(in) :: name
1480 character(len=*),
intent(in) :: mem_path
1483 logical(LGP) :: found
1492 integer(I4B),
dimension(:, :),
pointer,
contiguous,
intent(inout) :: aint
1493 character(len=*),
intent(in) :: name
1494 character(len=*),
intent(in) :: mem_path
1497 logical(LGP) :: found
1506 integer(I4B),
dimension(:, :, :),
pointer,
contiguous,
intent(inout) :: aint
1507 character(len=*),
intent(in) :: name
1508 character(len=*),
intent(in) :: mem_path
1511 logical(LGP) :: found
1520 real(DP),
pointer,
intent(inout) :: sclr
1521 character(len=*),
intent(in) :: name
1522 character(len=*),
intent(in) :: mem_path
1525 logical(LGP) :: found
1534 real(DP),
dimension(:),
pointer,
contiguous,
intent(inout) :: adbl
1535 character(len=*),
intent(in) :: name
1536 character(len=*),
intent(in) :: mem_path
1539 logical(LGP) :: found
1548 real(DP),
dimension(:, :),
pointer,
contiguous,
intent(inout) :: adbl
1549 character(len=*),
intent(in) :: name
1550 character(len=*),
intent(in) :: mem_path
1553 logical(LGP) :: found
1562 real(DP),
dimension(:, :, :),
pointer,
contiguous,
intent(inout) :: adbl
1563 character(len=*),
intent(in) :: name
1564 character(len=*),
intent(in) :: mem_path
1567 logical(LGP) :: found
1576 character(len=:),
pointer :: asrt
1577 character(len=*),
intent(in) :: name
1578 character(len=*),
intent(in) :: mem_path
1581 logical(LGP) :: found
1590 character(len=:),
dimension(:), &
1591 pointer,
contiguous,
intent(inout) :: astr1d
1592 character(len=*),
intent(in) :: name
1593 character(len=*),
intent(in) :: mem_path
1596 logical(LGP) :: found
1606 intent(inout) :: acharstr1d
1607 character(len=*),
intent(in) :: name
1608 character(len=*),
intent(in) :: mem_path
1611 logical(LGP) :: found
1614 acharstr1d => mt%acharstr1d
1620 integer(I4B),
dimension(:),
pointer,
contiguous,
intent(inout) :: aint
1621 character(len=*),
intent(in) :: name
1622 character(len=*),
intent(in) :: mem_path
1623 character(len=*),
intent(in),
optional :: mem_path_copy
1628 logical(LGP) :: found
1634 if (
present(mem_path_copy))
then
1635 call allocate_int1d(aint,
size(mt%aint1d), mt%name, mem_path_copy)
1638 allocate (aint(
size(mt%aint1d)))
1640 do n = 1,
size(mt%aint1d)
1641 aint(n) = mt%aint1d(n)
1648 integer(I4B),
dimension(:, :),
pointer,
contiguous,
intent(inout) :: aint
1649 character(len=*),
intent(in) :: name
1650 character(len=*),
intent(in) :: mem_path
1651 character(len=*),
intent(in),
optional :: mem_path_copy
1656 logical(LGP) :: found
1659 integer(I4B) :: ncol
1660 integer(I4B) :: nrow
1664 ncol =
size(mt%aint2d, dim=1)
1665 nrow =
size(mt%aint2d, dim=2)
1667 if (
present(mem_path_copy))
then
1671 allocate (aint(ncol, nrow))
1675 aint(j, i) = mt%aint2d(j, i)
1683 real(DP),
dimension(:),
pointer,
contiguous,
intent(inout) :: adbl
1684 character(len=*),
intent(in) :: name
1685 character(len=*),
intent(in) :: mem_path
1686 character(len=*),
intent(in),
optional :: mem_path_copy
1691 logical(LGP) :: found
1697 if (
present(mem_path_copy))
then
1698 call allocate_dbl1d(adbl,
size(mt%adbl1d), mt%name, mem_path_copy)
1701 allocate (adbl(
size(mt%adbl1d)))
1703 do n = 1,
size(mt%adbl1d)
1704 adbl(n) = mt%adbl1d(n)
1711 real(DP),
dimension(:, :),
pointer,
contiguous,
intent(inout) :: adbl
1712 character(len=*),
intent(in) :: name
1713 character(len=*),
intent(in) :: mem_path
1714 character(len=*),
intent(in),
optional :: mem_path_copy
1719 logical(LGP) :: found
1722 integer(I4B) :: ncol
1723 integer(I4B) :: nrow
1727 ncol =
size(mt%adbl2d, dim=1)
1728 nrow =
size(mt%adbl2d, dim=2)
1730 if (
present(mem_path_copy))
then
1734 allocate (adbl(ncol, nrow))
1738 adbl(j, i) = mt%adbl2d(j, i)
1746 real(dp),
dimension(:),
intent(inout) :: adbl
1747 character(len=*),
intent(in) :: name
1748 character(len=*),
intent(in) :: mem_path
1751 logical(LGP) :: found
1755 do n = 1,
size(mt%adbl1d)
1756 adbl(n) = mt%adbl1d(n)
1763 integer(I4B),
pointer,
intent(inout) :: sclr
1764 character(len=*),
intent(in) :: name
1765 character(len=*),
intent(in) :: mem_path
1766 character(len=*),
intent(in) :: name_target
1767 character(len=*),
intent(in) :: mem_path_target
1771 logical(LGP) :: found
1775 if (
associated(sclr))
then
1781 mt%element_size = i4b
1783 write (mt%memtype,
"(a,' (',i0,')')")
'INTEGER', mt%isize
1787 mt%mastername = name_target
1788 mt%masterPath = mem_path_target
1794 integer(I4B),
dimension(:),
pointer,
contiguous,
intent(inout) :: aint
1795 character(len=*),
intent(in) :: name
1796 character(len=*),
intent(in) :: mem_path
1797 character(len=*),
intent(in) :: name_target
1798 character(len=*),
intent(in) :: mem_path_target
1802 logical(LGP) :: found
1806 if (
size(aint) > 0)
then
1812 mt%element_size = i4b
1813 mt%isize =
size(aint)
1814 write (mt%memtype,
"(a,' (',i0,')')")
'INTEGER', mt%isize
1818 mt%mastername = name_target
1819 mt%masterPath = mem_path_target
1825 integer(I4B),
dimension(:, :),
pointer,
contiguous,
intent(inout) :: aint
1826 character(len=*),
intent(in) :: name
1827 character(len=*),
intent(in) :: mem_path
1828 character(len=*),
intent(in) :: name_target
1829 character(len=*),
intent(in) :: mem_path_target
1833 logical(LGP) :: found
1834 integer(I4B) :: ncol
1835 integer(I4B) :: nrow
1839 if (
size(aint) > 0)
then
1845 mt%element_size = i4b
1846 mt%isize =
size(aint)
1847 ncol =
size(aint, dim=1)
1848 nrow =
size(aint, dim=2)
1849 write (mt%memtype,
"(a,' (',i0,',',i0,')')")
'INTEGER', ncol, nrow
1853 mt%mastername = name_target
1854 mt%masterPath = mem_path_target
1860 real(DP),
dimension(:),
pointer,
contiguous,
intent(inout) :: adbl
1861 character(len=*),
intent(in) :: name
1862 character(len=*),
intent(in) :: mem_path
1863 character(len=*),
intent(in) :: name_target
1864 character(len=*),
intent(in) :: mem_path_target
1868 logical(LGP) :: found
1872 if (
size(adbl) > 0)
then
1878 mt%element_size = dp
1879 mt%isize =
size(adbl)
1880 write (mt%memtype,
"(a,' (',i0,')')")
'DOUBLE', mt%isize
1884 mt%mastername = name_target
1885 mt%masterPath = mem_path_target
1891 real(DP),
dimension(:, :),
pointer,
contiguous,
intent(inout) :: adbl
1892 character(len=*),
intent(in) :: name
1893 character(len=*),
intent(in) :: mem_path
1894 character(len=*),
intent(in) :: name_target
1895 character(len=*),
intent(in) :: mem_path_target
1899 logical(LGP) :: found
1900 integer(I4B) :: ncol
1901 integer(I4b) :: nrow
1905 if (
size(adbl) > 0)
then
1911 mt%element_size = dp
1912 mt%isize =
size(adbl)
1913 ncol =
size(adbl, dim=1)
1914 nrow =
size(adbl, dim=2)
1915 write (mt%memtype,
"(a,' (',i0,',',i0,')')")
'DOUBLE', ncol, nrow
1919 mt%mastername = name_target
1920 mt%masterPath = mem_path_target
1926 character(len=*),
pointer,
intent(inout) :: sclr
1927 character(len=*),
intent(in),
optional :: name
1928 character(len=*),
intent(in),
optional :: mem_path
1931 logical(LGP) :: found
1935 if (
present(name) .and.
present(mem_path))
then
1937 nullify (mt%strsclr)
1940 do while (itr%has_next())
1943 if (
associated(mt%strsclr, sclr))
then
1944 nullify (mt%strsclr)
1950 if (.not. found)
then
1951 call store_error(
'Programming error in deallocate_str.', terminate=.true.)
1965 character(len=*),
dimension(:),
pointer,
contiguous,
intent(inout) :: astr1d
1966 character(len=*),
optional,
intent(in) :: name
1967 character(len=*),
optional,
intent(in) :: mem_path
1970 logical(LGP) :: found
1976 if (
present(name) .and.
present(mem_path))
then
1981 do while (itr%has_next())
1984 if (
associated(mt%astr1d, astr1d))
then
1991 if (.not. found .and.
size(astr1d) > 0)
then
1992 call store_error(
'programming error in deallocate_str1d', terminate=.true.)
2007 intent(inout) :: astr1d
2008 character(len=*),
optional,
intent(in) :: name
2009 character(len=*),
optional,
intent(in) :: mem_path
2012 logical(LGP) :: found
2019 if (
present(name) .and.
present(mem_path))
then
2021 nullify (mt%acharstr1d)
2024 do while (itr%has_next())
2027 if (
associated(mt%acharstr1d, astr1d))
then
2028 nullify (mt%acharstr1d)
2034 if (.not. found .and.
size(astr1d) > 0)
then
2035 call store_error(
'programming error in deallocate_charstr1d', &
2039 do n = 1,
size(astr1d)
2040 call astr1d(n)%destroy()
2052 logical(LGP),
pointer,
intent(inout) :: sclr
2055 logical(LGP) :: found
2060 do while (itr%has_next())
2063 if (
associated(mt%logicalsclr, sclr))
then
2064 nullify (mt%logicalsclr)
2069 if (.not. found)
then
2070 call store_error(
'programming error in deallocate_logical', &
2084 integer(I4B),
pointer,
intent(inout) :: sclr
2087 logical(LGP) :: found
2092 do while (itr%has_next())
2095 if (
associated(mt%intsclr, sclr))
then
2096 nullify (mt%intsclr)
2101 if (.not. found)
then
2102 call store_error(
'Programming error in deallocate_int.', terminate=.true.)
2115 real(DP),
pointer,
intent(inout) :: sclr
2118 logical(LGP) :: found
2123 do while (itr%has_next())
2126 if (
associated(mt%dblsclr, sclr))
then
2127 nullify (mt%dblsclr)
2132 if (.not. found)
then
2133 call store_error(
'Programming error in deallocate_dbl.', terminate=.true.)
2146 integer(I4B),
dimension(:),
pointer,
contiguous,
intent(inout) :: aint
2147 character(len=*),
optional :: name
2148 character(len=*),
optional :: mem_path
2151 logical(LGP) :: found
2157 if (
present(name) .and.
present(mem_path))
then
2162 do while (itr%has_next())
2165 if (
associated(mt%aint1d, aint))
then
2172 if (.not. found .and.
size(aint) > 0)
then
2173 call store_error(
'programming error in deallocate_int1d', terminate=.true.)
2186 integer(I4B),
dimension(:, :),
pointer,
contiguous,
intent(inout) :: aint
2187 character(len=*),
optional :: name
2188 character(len=*),
optional :: mem_path
2191 logical(LGP) :: found
2197 if (
present(name) .and.
present(mem_path))
then
2202 do while (itr%has_next())
2205 if (
associated(mt%aint2d, aint))
then
2212 if (.not. found .and.
size(aint) > 0)
then
2213 call store_error(
'programming error in deallocate_int2d', terminate=.true.)
2226 integer(I4B),
dimension(:, :, :),
pointer,
contiguous,
intent(inout) :: aint
2227 character(len=*),
optional :: name
2228 character(len=*),
optional :: mem_path
2231 logical(LGP) :: found
2237 if (
present(name) .and.
present(mem_path))
then
2242 do while (itr%has_next())
2245 if (
associated(mt%aint3d, aint))
then
2252 if (.not. found .and.
size(aint) > 0)
then
2253 call store_error(
'programming error in deallocate_int3d', terminate=.true.)
2266 real(DP),
dimension(:),
pointer,
contiguous,
intent(inout) :: adbl
2267 character(len=*),
optional :: name
2268 character(len=*),
optional :: mem_path
2271 logical(LGP) :: found
2277 if (
present(name) .and.
present(mem_path))
then
2282 do while (itr%has_next())
2285 if (
associated(mt%adbl1d, adbl))
then
2292 if (.not. found .and.
size(adbl) > 0)
then
2293 call store_error(
'programming error in deallocate_dbl1d', terminate=.true.)
2306 real(DP),
dimension(:, :),
pointer,
contiguous,
intent(inout) :: adbl
2307 character(len=*),
optional :: name
2308 character(len=*),
optional :: mem_path
2311 logical(LGP) :: found
2317 if (
present(name) .and.
present(mem_path))
then
2322 do while (itr%has_next())
2325 if (
associated(mt%adbl2d, adbl))
then
2332 if (.not. found .and.
size(adbl) > 0)
then
2333 call store_error(
'programming error in deallocate_dbl2d', terminate=.true.)
2346 real(DP),
dimension(:, :, :),
pointer,
contiguous,
intent(inout) :: adbl
2347 character(len=*),
optional :: name
2348 character(len=*),
optional :: mem_path
2351 logical(LGP) :: found
2357 if (
present(name) .and.
present(mem_path))
then
2362 do while (itr%has_next())
2365 if (
associated(mt%adbl3d, adbl))
then
2372 if (.not. found .and.
size(adbl) > 0)
then
2373 call store_error(
'programming error in deallocate_dbl3d', terminate=.true.)
2386 integer(I4B),
intent(in) :: iout
2387 character(len=*),
intent(in) :: keyword
2388 character(len=*),
intent(inout) :: error_msg
2392 select case (keyword)
2395 write (iout,
'(4x, a)') &
2396 'LIMITED MEMORY INFORMATION WILL BE WRITTEN.'
2399 write (iout,
'(4x, a)') &
2400 'A SUMMARY OF SIMULATION MEMORY INFORMATION WILL BE WRITTEN.'
2403 write (iout,
'(4x, a)') &
2404 'ALL SIMULATION MEMORY INFORMATION WILL BE WRITTEN.'
2406 error_msg =
"Unknown memory print option '"//trim(keyword)//
"."
2413 integer(I4B),
intent(in) :: iout
2414 integer(I4B),
intent(in) :: nrows
2415 character(len=*),
intent(in) :: cunits
2417 character(len=LINELENGTH) :: title
2418 character(len=LINELENGTH) :: text
2419 integer(I4B) :: nterms
2425 title =
'SUMMARY INFORMATION ON VARIABLES STORED IN THE MEMORY MANAGER, '// &
2430 call memtab%table_df(nrows, nterms, iout)
2460 integer(I4B),
intent(in) :: iout
2461 integer(I4B),
intent(in) :: nrows
2463 character(len=LINELENGTH) :: title
2464 character(len=LINELENGTH) :: text
2465 integer(I4B) :: nterms
2471 title =
'DETAILED INFORMATION ON VARIABLES STORED IN THE MEMORY MANAGER'
2475 call memtab%table_df(nrows, nterms, iout)
2482 text =
'VARIABLE NAME'
2490 text =
'NUMBER OF ITEMS'
2494 text =
'ASSOCIATED VARIABLE'
2501 character(len=*),
intent(in) :: component
2502 real(DP),
intent(in) :: rchars
2503 real(DP),
intent(in) :: rlog
2504 real(DP),
intent(in) :: rint
2505 real(DP),
intent(in) :: rreal
2506 real(DP),
intent(in) :: bytes
2511 call memtab%add_term(component)
2512 call memtab%add_term(rchars)
2513 call memtab%add_term(rlog)
2514 call memtab%add_term(rint)
2515 call memtab%add_term(rreal)
2516 call memtab%add_term(bytes)
2523 real(DP),
intent(in) :: bytes
2524 real(DP),
intent(inout) :: fact
2525 character(len=*),
intent(inout) :: cunits
2535 if (bytes <
dep3)
then
2538 else if (bytes <
dep6)
then
2540 cunits =
'KILOBYTES'
2541 else if (bytes <
dep9)
then
2543 cunits =
'MEGABYTES'
2546 cunits =
'GIGABYTES'
2553 integer(I4B),
intent(in) :: iout
2554 real(DP),
intent(in) :: bytes
2556 character(len=LINELENGTH) :: title
2557 character(len=LINELENGTH) :: text
2558 character(LEN=10) :: cunits
2559 integer(I4B) :: nterms
2560 integer(I4B) :: nrows
2574 title =
'MEMORY MANAGER TOTAL STORAGE BY DATA TYPE, IN '//trim(cunits)
2578 call memtab%table_df(nrows, nterms, iout)
2585 text =
'ALLOCATED MEMORY'
2592 call memtab%add_term(
'Character')
2593 call memtab%add_term(smb)
2597 call memtab%add_term(
'Logical')
2598 call memtab%add_term(smb)
2602 call memtab%add_term(
'Integer')
2603 call memtab%add_term(smb)
2607 call memtab%add_term(
'Real')
2608 call memtab%add_term(smb)
2611 call memtab%print_separator()
2613 call memtab%add_term(
'Total')
2614 call memtab%add_term(smb)
2618 call memtab%add_term(
'Virtual')
2619 call memtab%add_term(smb)
2643 integer(I4B),
intent(in) :: iout
2646 character(len=LENMEMADDRESS),
allocatable,
dimension(:) :: cunique
2648 character(len=LENMEMPATH) :: context
2649 character(len=LENCOMPONENTNAME) :: component
2650 character(len=LENCOMPONENTNAME) :: subcomponent
2651 character(len=LENMEMADDRESS) :: context_component
2652 character(LEN=10) :: cunits
2654 integer(I4B) :: icomp
2655 integer(I4B) :: ilen
2656 integer(I8B) :: nchars
2657 integer(I8B) :: nlog
2658 integer(I8B) :: nint
2659 integer(I8B) :: nreal
2660 real(dp) :: simbytes
2675 simbytes = real(simbytes, dp)
2686 do icomp = 1,
size(cunique)
2692 ilen = len_trim(cunique(icomp))
2694 do while (itr%has_next())
2699 context_component = trim(context)//component
2700 if (cunique(icomp) /= context_component(1:ilen)) cycle
2701 if (.not. mt%master) cycle
2702 if (mt%memtype(1:6) ==
'STRING')
then
2703 nchars = nchars + mt%isize * mt%element_size
2704 else if (mt%memtype(1:7) ==
'LOGICAL')
then
2705 nlog = nlog + mt%isize
2706 else if (mt%memtype(1:7) ==
'INTEGER')
then
2707 nint = nint + mt%isize
2708 else if (mt%memtype(1:6) ==
'DOUBLE')
then
2709 nreal = nreal + mt%isize
2714 rchars = real(nchars, dp) * fact
2715 rlog = real(nlog * lgp, dp) * fact
2716 rint = real(nint * i4b, dp) * fact
2717 rreal = real(nreal * dp, dp) * fact
2720 bytes = rchars + rlog + rint + rreal
2738 integer(I4B) :: iout
2745 do while (itr%has_next())
2748 call mt%table_entry(
memtab)
2757 real(dp) :: vmem_size
2764 do while (itr%has_next())
2767 if (index(mt%path,
"__P") == 1)
then
2768 vmem_size = mt%element_size * mt%isize + vmem_size
2782 character(len=LINELENGTH) :: error_msg
2783 character(len=LENVARNAME) :: ucname
2787 do while (itr%has_next())
2793 if (mt%mt_associated() .and. mt%element_size == -1)
then
2794 error_msg = trim(adjustl(mt%path))//
' '// &
2795 trim(adjustl(mt%name))//
' has invalid element size'
2800 if (mt%mt_associated() .and. mt%isize > 0)
then
2801 error_msg = trim(adjustl(mt%path))//
' '// &
2802 trim(adjustl(mt%name))//
' not deallocated'
2809 if (mt%name /= ucname)
then
2810 error_msg = trim(adjustl(mt%path))//
' '// &
2811 trim(adjustl(mt%name))//
' not upper case'
2821 call store_error(
'Could not clear memory list.', terminate=.true.)
2832 character(len=LENMEMADDRESS),
allocatable,
dimension(:),
intent(inout) :: &
2836 character(len=LENMEMPATH) :: context
2837 character(len=LENCOMPONENTNAME) :: component
2838 character(len=LENCOMPONENTNAME) :: subcomponent
2839 character(len=LENMEMADDRESS) :: context_component
2845 allocate (cunique(0))
2849 do while (itr%has_next())
2854 context_component = trim(context)//component
2855 ipa =
ifind(cunique, context_component)
2858 cunique(
size(cunique)) = context_component
This module contains simulation constants.
integer(i4b), parameter linelength
maximum length of a standard line
integer(i4b), parameter lencomponentname
maximum length of a component name
@ tabcenter
centered table column
@ tabright
right justified table column
@ tableft
left justified table column
integer(i4b), parameter lenmemaddress
maximum length of the full memory address, including variable name
real(dp), parameter dep3
real constant 1000
@ tabucstring
upper case string table data
@ tabstring
string table data
@ tabinteger
integer table data
real(dp), parameter dep6
real constant 1000000
integer(i4b), parameter lenmemseparator
maximum length of the memory path separator used, currently a '/'
real(dp), parameter dep9
real constant 1e9
integer(i4b), parameter lenvarname
maximum length of a variable name
integer(i4b), parameter, public lenmemtype
maximum length of a memory manager type
real(dp), parameter dem3
real constant 1e-3
real(dp), parameter dem6
real constant 1e-6
real(dp), parameter dzero
real constant zero
real(dp), parameter dem9
real constant 1e-9
integer(i4b), parameter lenmempath
maximum length of the memory path
real(dp), parameter done
real constant 1
This module defines variable data types.
character(len=lenmempath) function get_mem_path_context(mem_path)
Return the context from the memory path.
subroutine mem_check_length(name, max_length, description)
Generic routine to check the length of (parts of) the memory address.
subroutine strip_context_mem_path(mem_path, mem_path_no_context)
Remove the context from the memory path.
subroutine split_mem_path(mem_path, component, subcomponent)
Split the memory path into component(s)
subroutine reallocate_int2d(aint, ncol, nrow, name, mem_path)
Reallocate a 2-dimensional integer array.
subroutine allocate_logical(sclr, name, mem_path)
Allocate a logical scalar.
subroutine allocate_int2d(aint, ncol, nrow, name, mem_path)
Allocate a 2-dimensional integer array.
subroutine mem_summary_line(component, rchars, rlog, rint, rreal, bytes)
Write a row for the memory_print_option 'SUMMARY' table.
subroutine allocate_dbl3d(adbl, ncol, nrow, nlay, name, mem_path)
Allocate a 3-dimensional real array.
integer(i8b) nvalues_adbl
subroutine deallocate_str1d(astr1d, name, mem_path)
Deallocate an array of defined-length character strings.
subroutine deallocate_int(sclr)
Deallocate a integer scalar.
type(tabletype), pointer memtab
subroutine setptr_int3d(aint, name, mem_path)
Set pointer to 3d integer array.
subroutine mem_detailed_table(iout, nrows)
Create a table if memory_print_option is 'ALL'.
subroutine deallocate_charstr1d(astr1d, name, mem_path)
Deallocate an array of deferred-length character strings.
subroutine allocate_charstr1d(acharstr1d, ilen, nrow, name, mem_path)
Allocate a 1-dimensional array of deferred-length CharacterStringType.
subroutine reallocate_charstr1d(acharstr1d, ilen, nrow, name, mem_path)
Reallocate a 1-dimensional deferred length string array.
subroutine, public mem_write_usage(iout)
Write memory manager memory usage based on the user-specified memory_print_option.
subroutine reallocate_dbl2d(adbl, ncol, nrow, name, mem_path)
Reallocate a 2-dimensional real array.
integer(i8b) nvalues_aint
subroutine setptr_int(sclr, name, mem_path)
Set pointer to integer scalar.
subroutine checkin_charstr1d(acharstr1d, ilen, name, mem_path, name2, mem_path2)
Check in an existing 1d CharacterStringType array with a new address (name + path)
subroutine mem_cleanup_table()
Generic function to clean a memory manager table.
subroutine copyptr_int1d(aint, name, mem_path, mem_path_copy)
Make a copy of a 1-dimensional integer array.
subroutine deallocate_dbl1d(adbl, name, mem_path)
Deallocate a 1-dimensional real array.
subroutine allocate_str1d(astr1d, ilen, nrow, name, mem_path)
Allocate a 1-dimensional defined length string array.
subroutine allocate_str(sclr, ilen, name, mem_path)
Allocate a character string.
subroutine, public get_mem_type(name, mem_path, var_type)
@ brief Get the variable memory type
subroutine setptr_int2d(aint, name, mem_path)
Set pointer to 2d integer array.
subroutine, public mem_da()
Deallocate memory in the memory manager.
subroutine deallocate_int1d(aint, name, mem_path)
Deallocate a 1-dimensional integer array.
integer(i8b) nvalues_astr
subroutine deallocate_dbl(sclr)
Deallocate a real scalar.
subroutine copyptr_int2d(aint, name, mem_path, mem_path_copy)
Make a copy of a 2-dimensional integer array.
subroutine allocate_dbl(sclr, name, mem_path)
Allocate a real scalar.
real(dp) function calc_virtual_mem()
Sum up virtual memory, i.e. memory.
subroutine copyptr_dbl2d(adbl, name, mem_path, mem_path_copy)
Make a copy of a 2-dimensional real array.
subroutine reassignptr_int2d(aint, name, mem_path, name_target, mem_path_target)
Set the pointer for a 2-dimensional integer array to.
subroutine setptr_dbl(sclr, name, mem_path)
Set pointer to a real scalar.
subroutine deallocate_int3d(aint, name, mem_path)
Deallocate a 3-dimensional integer array.
subroutine deallocate_int2d(aint, name, mem_path)
Deallocate a 2-dimensional integer array.
subroutine reassignptr_dbl1d(adbl, name, mem_path, name_target, mem_path_target)
Set the pointer for a 1-dimensional real array to.
subroutine allocate_int3d(aint, ncol, nrow, nlay, name, mem_path)
Allocate a 3-dimensional integer array.
subroutine, public get_mem_shape(name, mem_path, mem_shape)
@ brief Get the variable memory shape
subroutine deallocate_dbl2d(adbl, name, mem_path)
Deallocate a 2-dimensional real array.
subroutine mem_units(bytes, fact, cunits)
Determine appropriate memory unit and conversion factor.
subroutine setptr_int1d(aint, name, mem_path)
Set pointer to 1d integer array.
subroutine setptr_str1d(astr1d, name, mem_path)
Set pointer to a fixed-length string array.
subroutine checkin_int2d(aint2d, name, mem_path, name2, mem_path2)
Check in an existing 2d integer array with a new address (name + path)
type(memorystoretype), public memorystore
subroutine reallocate_dbl1d(adbl, nrow, name, mem_path)
Reallocate a 1-dimensional real array.
subroutine setptr_dbl2d(adbl, name, mem_path)
Set pointer to a 2d real array.
subroutine deallocate_logical(sclr)
Deallocate a logical scalar.
subroutine checkin_dbl2d(adbl2d, name, mem_path, name2, mem_path2)
Check in an existing 2d double precision array with a new address (name + path)
subroutine deallocate_dbl3d(adbl, name, mem_path)
Deallocate a 3-dimensional real array.
subroutine reallocate_int1d(aint, nrow, name, mem_path)
Reallocate a 1-dimensional integer array.
subroutine, public get_from_memorystore(name, mem_path, mt, found, check)
@ brief Get a memory type entry from the memory list
subroutine, public mem_print_detailed(iout)
subroutine reallocate_str1d(astr, ilen, nrow, name, mem_path)
Reallocate a 1-dimensional defined length string array.
subroutine copyptr_dbl1d(adbl, name, mem_path, mem_path_copy)
Make a copy of a 1-dimensional real array.
subroutine reassignptr_dbl2d(adbl, name, mem_path, name_target, mem_path_target)
Set the pointer for a 2-dimensional real array to.
subroutine allocate_int1d(aint, nrow, name, mem_path)
Allocate a 1-dimensional integer array.
subroutine allocate_int(sclr, name, mem_path)
Allocate a integer scalar.
subroutine reassignptr_int1d(aint, name, mem_path, name_target, mem_path_target)
Set the pointer for a 1-dimensional integer array to.
subroutine mem_summary_total(iout, bytes)
Create and fill a table with the total allocated memory.
subroutine, public get_isize(name, mem_path, isize)
@ brief Get the number of elements for this variable
subroutine allocate_dbl2d(adbl, ncol, nrow, name, mem_path)
Allocate a 2-dimensional real array.
subroutine deallocate_str(sclr, name, mem_path)
Deallocate a variable-length character string.
subroutine, public get_mem_rank(name, mem_path, rank)
@ brief Get the variable rank
subroutine checkin_dbl1d(adbl, name, mem_path, name2, mem_path2)
Check in an existing 1d double precision array with a new address (name + path)
subroutine checkin_int1d(aint, name, mem_path, name2, mem_path2)
Check in an existing 1d integer array with a new address (name + path)
subroutine reassignptr_int(sclr, name, mem_path, name_target, mem_path_target)
Set the pointer for an integer scalar to.
subroutine, public copy_dbl1d(adbl, name, mem_path)
Copy values from a 1-dimensional real array in the memory.
subroutine setptr_dbl3d(adbl, name, mem_path)
Set pointer to a 3d real array.
subroutine, public get_mem_elem_size(name, mem_path, size)
@ brief Get the memory size of a single element of the stored variable
subroutine setptr_dbl1d(adbl, name, mem_path)
Set pointer to a 1d real array.
subroutine setptr_str(asrt, name, mem_path)
Set pointer to a string (scalar)
integer(i8b) nvalues_alogical
subroutine setptr_charstr1d(acharstr1d, name, mem_path)
Set pointer to an array of CharacterStringType.
subroutine mem_unique_origins(cunique)
Create a array with unique first components from all memory paths. Only the first component of the me...
subroutine mem_summary_table(iout, nrows, cunits)
Create a table if memory_print_option is 'SUMMARY'.
subroutine setptr_logical(sclr, name, mem_path)
Set pointer to a logical scalar.
subroutine, public mem_set_print_option(iout, keyword, error_msg)
Set the memory print option.
subroutine allocate_dbl1d(adbl, nrow, name, mem_path)
Allocate a 1-dimensional real array.
subroutine allocate_error(varname, mem_path, istat, isize)
Issue allocation error message and stop program execution.
This module contains simulation methods.
subroutine, public store_error(msg, terminate)
Store an error message.
integer(i4b) function, public count_errors()
Return number of errors.
This module contains simulation variables.
character(len=maxcharlen) errmsg
error message string
subroutine, public table_cr(this, name, title)
This module contains version information.
integer(i4b), parameter idevelopmode
This class is used to store a single deferred-length character string. It was designed to work in an ...
An iterator used to iterate through a MemoryContainer.