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)
1229 do n = nrow_old + 1, nrow
1230 astrtemp(n) = string
1234 deallocate (acharstr1d)
1238 if (istat /= 0)
then
1244 acharstr1d(n) = astrtemp(n)
1248 deallocate (astrtemp)
1251 mt%acharstr1d => acharstr1d
1252 mt%element_size = ilen
1254 mt%nrealloc = mt%nrealloc + 1
1257 write (mt%memtype,
"(a,' LEN=',i0,' (',i0,')')")
'STRING', ilen, nrow
1259 errmsg =
"Programming error, variable '"//trim(name)//
"' from '"// &
1260 trim(mem_path)//
"' is not defined in the memory manager. Use "// &
1261 "mem_allocate instead."
1269 integer(I4B),
dimension(:),
pointer,
contiguous,
intent(inout) :: aint
1270 integer(I4B),
intent(in) :: nrow
1271 character(len=*),
intent(in) :: name
1272 character(len=*),
intent(in) :: mem_path
1275 logical(LGP) :: found
1276 integer(I4B) :: istat
1277 integer(I4B) :: isize
1279 integer(I4B) :: isizeold
1280 integer(I4B) :: ifill
1288 isizeold =
size(mt%aint1d)
1289 ifill = min(isizeold, isize)
1291 if (istat /= 0)
then
1295 aint(i) = mt%aint1d(i)
1299 deallocate (mt%aint1d)
1301 mt%element_size = i4b
1303 mt%nrealloc = mt%nrealloc + 1
1311 integer(I4B),
dimension(:, :),
pointer,
contiguous,
intent(inout) :: aint
1312 integer(I4B),
intent(in) :: ncol
1313 integer(I4B),
intent(in) :: nrow
1314 character(len=*),
intent(in) :: name
1315 character(len=*),
intent(in) :: mem_path
1318 logical(LGP) :: found
1319 integer(I4B) :: istat
1320 integer(I4B),
dimension(2) :: ishape
1323 integer(I4B) :: isize
1324 integer(I4B) :: isizeold
1331 ishape = shape(mt%aint2d)
1333 isizeold = ishape(1) * ishape(2)
1335 if (istat /= 0)
then
1340 aint(j, i) = mt%aint2d(j, i)
1345 deallocate (mt%aint2d)
1347 mt%element_size = i4b
1349 mt%nrealloc = mt%nrealloc + 1
1352 write (mt%memtype,
"(a,' (',i0,',',i0,')')")
'INTEGER', ncol, nrow
1358 real(DP),
dimension(:),
pointer,
contiguous,
intent(inout) :: adbl
1359 integer(I4B),
intent(in) :: nrow
1360 character(len=*),
intent(in) :: name
1361 character(len=*),
intent(in) :: mem_path
1364 integer(I4B) :: istat
1365 integer(I4B) :: isize
1367 integer(I4B) :: isizeold
1368 integer(I4B) :: ifill
1369 logical(LGP) :: found
1377 isizeold =
size(mt%adbl1d)
1378 ifill = min(isizeold, isize)
1380 if (istat /= 0)
then
1384 adbl(i) = mt%adbl1d(i)
1388 deallocate (mt%adbl1d)
1390 mt%element_size = dp
1392 mt%nrealloc = mt%nrealloc + 1
1395 write (mt%memtype,
"(a,' (',i0,')')")
'DOUBLE', isize
1401 real(DP),
dimension(:, :),
pointer,
contiguous,
intent(inout) :: adbl
1402 integer(I4B),
intent(in) :: ncol
1403 integer(I4B),
intent(in) :: nrow
1404 character(len=*),
intent(in) :: name
1405 character(len=*),
intent(in) :: mem_path
1408 logical(LGP) :: found
1409 integer(I4B) :: istat
1410 integer(I4B),
dimension(2) :: ishape
1413 integer(I4B) :: isize
1414 integer(I4B) :: isizeold
1421 ishape = shape(mt%adbl2d)
1423 isizeold = ishape(1) * ishape(2)
1425 if (istat /= 0)
then
1430 adbl(j, i) = mt%adbl2d(j, i)
1435 deallocate (mt%adbl2d)
1437 mt%element_size = dp
1439 mt%nrealloc = mt%nrealloc + 1
1442 write (mt%memtype,
"(a,' (',i0,',',i0,')')")
'DOUBLE', ncol, nrow
1448 logical(LGP),
pointer,
intent(inout) :: sclr
1449 character(len=*),
intent(in) :: name
1450 character(len=*),
intent(in) :: mem_path
1453 logical(LGP) :: found
1456 sclr => mt%logicalsclr
1462 integer(I4B),
pointer,
intent(inout) :: sclr
1463 character(len=*),
intent(in) :: name
1464 character(len=*),
intent(in) :: mem_path
1467 logical(LGP) :: found
1476 integer(I4B),
dimension(:),
pointer,
contiguous,
intent(inout) :: aint
1477 character(len=*),
intent(in) :: name
1478 character(len=*),
intent(in) :: mem_path
1481 logical(LGP) :: found
1490 integer(I4B),
dimension(:, :),
pointer,
contiguous,
intent(inout) :: aint
1491 character(len=*),
intent(in) :: name
1492 character(len=*),
intent(in) :: mem_path
1495 logical(LGP) :: found
1504 integer(I4B),
dimension(:, :, :),
pointer,
contiguous,
intent(inout) :: aint
1505 character(len=*),
intent(in) :: name
1506 character(len=*),
intent(in) :: mem_path
1509 logical(LGP) :: found
1518 real(DP),
pointer,
intent(inout) :: sclr
1519 character(len=*),
intent(in) :: name
1520 character(len=*),
intent(in) :: mem_path
1523 logical(LGP) :: found
1532 real(DP),
dimension(:),
pointer,
contiguous,
intent(inout) :: adbl
1533 character(len=*),
intent(in) :: name
1534 character(len=*),
intent(in) :: mem_path
1537 logical(LGP) :: found
1546 real(DP),
dimension(:, :),
pointer,
contiguous,
intent(inout) :: adbl
1547 character(len=*),
intent(in) :: name
1548 character(len=*),
intent(in) :: mem_path
1551 logical(LGP) :: found
1560 real(DP),
dimension(:, :, :),
pointer,
contiguous,
intent(inout) :: adbl
1561 character(len=*),
intent(in) :: name
1562 character(len=*),
intent(in) :: mem_path
1565 logical(LGP) :: found
1574 character(len=:),
pointer :: asrt
1575 character(len=*),
intent(in) :: name
1576 character(len=*),
intent(in) :: mem_path
1579 logical(LGP) :: found
1588 character(len=:),
dimension(:), &
1589 pointer,
contiguous,
intent(inout) :: astr1d
1590 character(len=*),
intent(in) :: name
1591 character(len=*),
intent(in) :: mem_path
1594 logical(LGP) :: found
1604 intent(inout) :: acharstr1d
1605 character(len=*),
intent(in) :: name
1606 character(len=*),
intent(in) :: mem_path
1609 logical(LGP) :: found
1612 acharstr1d => mt%acharstr1d
1618 integer(I4B),
dimension(:),
pointer,
contiguous,
intent(inout) :: aint
1619 character(len=*),
intent(in) :: name
1620 character(len=*),
intent(in) :: mem_path
1621 character(len=*),
intent(in),
optional :: mem_path_copy
1626 logical(LGP) :: found
1632 if (
present(mem_path_copy))
then
1633 call allocate_int1d(aint,
size(mt%aint1d), mt%name, mem_path_copy)
1636 allocate (aint(
size(mt%aint1d)))
1638 do n = 1,
size(mt%aint1d)
1639 aint(n) = mt%aint1d(n)
1646 integer(I4B),
dimension(:, :),
pointer,
contiguous,
intent(inout) :: aint
1647 character(len=*),
intent(in) :: name
1648 character(len=*),
intent(in) :: mem_path
1649 character(len=*),
intent(in),
optional :: mem_path_copy
1654 logical(LGP) :: found
1657 integer(I4B) :: ncol
1658 integer(I4B) :: nrow
1662 ncol =
size(mt%aint2d, dim=1)
1663 nrow =
size(mt%aint2d, dim=2)
1665 if (
present(mem_path_copy))
then
1669 allocate (aint(ncol, nrow))
1673 aint(j, i) = mt%aint2d(j, i)
1681 real(DP),
dimension(:),
pointer,
contiguous,
intent(inout) :: adbl
1682 character(len=*),
intent(in) :: name
1683 character(len=*),
intent(in) :: mem_path
1684 character(len=*),
intent(in),
optional :: mem_path_copy
1689 logical(LGP) :: found
1695 if (
present(mem_path_copy))
then
1696 call allocate_dbl1d(adbl,
size(mt%adbl1d), mt%name, mem_path_copy)
1699 allocate (adbl(
size(mt%adbl1d)))
1701 do n = 1,
size(mt%adbl1d)
1702 adbl(n) = mt%adbl1d(n)
1709 real(DP),
dimension(:, :),
pointer,
contiguous,
intent(inout) :: adbl
1710 character(len=*),
intent(in) :: name
1711 character(len=*),
intent(in) :: mem_path
1712 character(len=*),
intent(in),
optional :: mem_path_copy
1717 logical(LGP) :: found
1720 integer(I4B) :: ncol
1721 integer(I4B) :: nrow
1725 ncol =
size(mt%adbl2d, dim=1)
1726 nrow =
size(mt%adbl2d, dim=2)
1728 if (
present(mem_path_copy))
then
1732 allocate (adbl(ncol, nrow))
1736 adbl(j, i) = mt%adbl2d(j, i)
1744 real(dp),
dimension(:),
intent(inout) :: adbl
1745 character(len=*),
intent(in) :: name
1746 character(len=*),
intent(in) :: mem_path
1749 logical(LGP) :: found
1753 do n = 1,
size(mt%adbl1d)
1754 adbl(n) = mt%adbl1d(n)
1761 integer(I4B),
pointer,
intent(inout) :: sclr
1762 character(len=*),
intent(in) :: name
1763 character(len=*),
intent(in) :: mem_path
1764 character(len=*),
intent(in) :: name_target
1765 character(len=*),
intent(in) :: mem_path_target
1769 logical(LGP) :: found
1773 if (
associated(sclr))
then
1779 mt%element_size = i4b
1781 write (mt%memtype,
"(a,' (',i0,')')")
'INTEGER', mt%isize
1785 mt%mastername = name_target
1786 mt%masterPath = mem_path_target
1792 integer(I4B),
dimension(:),
pointer,
contiguous,
intent(inout) :: aint
1793 character(len=*),
intent(in) :: name
1794 character(len=*),
intent(in) :: mem_path
1795 character(len=*),
intent(in) :: name_target
1796 character(len=*),
intent(in) :: mem_path_target
1800 logical(LGP) :: found
1804 if (
size(aint) > 0)
then
1810 mt%element_size = i4b
1811 mt%isize =
size(aint)
1812 write (mt%memtype,
"(a,' (',i0,')')")
'INTEGER', mt%isize
1816 mt%mastername = name_target
1817 mt%masterPath = mem_path_target
1823 integer(I4B),
dimension(:, :),
pointer,
contiguous,
intent(inout) :: aint
1824 character(len=*),
intent(in) :: name
1825 character(len=*),
intent(in) :: mem_path
1826 character(len=*),
intent(in) :: name_target
1827 character(len=*),
intent(in) :: mem_path_target
1831 logical(LGP) :: found
1832 integer(I4B) :: ncol
1833 integer(I4B) :: nrow
1837 if (
size(aint) > 0)
then
1843 mt%element_size = i4b
1844 mt%isize =
size(aint)
1845 ncol =
size(aint, dim=1)
1846 nrow =
size(aint, dim=2)
1847 write (mt%memtype,
"(a,' (',i0,',',i0,')')")
'INTEGER', ncol, nrow
1851 mt%mastername = name_target
1852 mt%masterPath = mem_path_target
1858 real(DP),
dimension(:),
pointer,
contiguous,
intent(inout) :: adbl
1859 character(len=*),
intent(in) :: name
1860 character(len=*),
intent(in) :: mem_path
1861 character(len=*),
intent(in) :: name_target
1862 character(len=*),
intent(in) :: mem_path_target
1866 logical(LGP) :: found
1870 if (
size(adbl) > 0)
then
1876 mt%element_size = dp
1877 mt%isize =
size(adbl)
1878 write (mt%memtype,
"(a,' (',i0,')')")
'DOUBLE', mt%isize
1882 mt%mastername = name_target
1883 mt%masterPath = mem_path_target
1889 real(DP),
dimension(:, :),
pointer,
contiguous,
intent(inout) :: adbl
1890 character(len=*),
intent(in) :: name
1891 character(len=*),
intent(in) :: mem_path
1892 character(len=*),
intent(in) :: name_target
1893 character(len=*),
intent(in) :: mem_path_target
1897 logical(LGP) :: found
1898 integer(I4B) :: ncol
1899 integer(I4b) :: nrow
1903 if (
size(adbl) > 0)
then
1909 mt%element_size = dp
1910 mt%isize =
size(adbl)
1911 ncol =
size(adbl, dim=1)
1912 nrow =
size(adbl, dim=2)
1913 write (mt%memtype,
"(a,' (',i0,',',i0,')')")
'DOUBLE', ncol, nrow
1917 mt%mastername = name_target
1918 mt%masterPath = mem_path_target
1924 character(len=*),
pointer,
intent(inout) :: sclr
1925 character(len=*),
intent(in),
optional :: name
1926 character(len=*),
intent(in),
optional :: mem_path
1929 logical(LGP) :: found
1933 if (
present(name) .and.
present(mem_path))
then
1935 nullify (mt%strsclr)
1938 do while (itr%has_next())
1941 if (
associated(mt%strsclr, sclr))
then
1942 nullify (mt%strsclr)
1948 if (.not. found)
then
1949 call store_error(
'Programming error in deallocate_str.', terminate=.true.)
1963 character(len=*),
dimension(:),
pointer,
contiguous,
intent(inout) :: astr1d
1964 character(len=*),
optional,
intent(in) :: name
1965 character(len=*),
optional,
intent(in) :: mem_path
1968 logical(LGP) :: found
1974 if (
present(name) .and.
present(mem_path))
then
1979 do while (itr%has_next())
1982 if (
associated(mt%astr1d, astr1d))
then
1989 if (.not. found .and.
size(astr1d) > 0)
then
1990 call store_error(
'programming error in deallocate_str1d', terminate=.true.)
2005 intent(inout) :: astr1d
2006 character(len=*),
optional,
intent(in) :: name
2007 character(len=*),
optional,
intent(in) :: mem_path
2010 logical(LGP) :: found
2016 if (
present(name) .and.
present(mem_path))
then
2018 nullify (mt%acharstr1d)
2021 do while (itr%has_next())
2024 if (
associated(mt%acharstr1d, astr1d))
then
2025 nullify (mt%acharstr1d)
2031 if (.not. found .and.
size(astr1d) > 0)
then
2032 call store_error(
'programming error in deallocate_charstr1d', &
2046 logical(LGP),
pointer,
intent(inout) :: sclr
2049 logical(LGP) :: found
2054 do while (itr%has_next())
2057 if (
associated(mt%logicalsclr, sclr))
then
2058 nullify (mt%logicalsclr)
2063 if (.not. found)
then
2064 call store_error(
'programming error in deallocate_logical', &
2078 integer(I4B),
pointer,
intent(inout) :: sclr
2081 logical(LGP) :: found
2086 do while (itr%has_next())
2089 if (
associated(mt%intsclr, sclr))
then
2090 nullify (mt%intsclr)
2095 if (.not. found)
then
2096 call store_error(
'Programming error in deallocate_int.', terminate=.true.)
2109 real(DP),
pointer,
intent(inout) :: sclr
2112 logical(LGP) :: found
2117 do while (itr%has_next())
2120 if (
associated(mt%dblsclr, sclr))
then
2121 nullify (mt%dblsclr)
2126 if (.not. found)
then
2127 call store_error(
'Programming error in deallocate_dbl.', terminate=.true.)
2140 integer(I4B),
dimension(:),
pointer,
contiguous,
intent(inout) :: aint
2141 character(len=*),
optional :: name
2142 character(len=*),
optional :: mem_path
2145 logical(LGP) :: found
2151 if (
present(name) .and.
present(mem_path))
then
2156 do while (itr%has_next())
2159 if (
associated(mt%aint1d, aint))
then
2166 if (.not. found .and.
size(aint) > 0)
then
2167 call store_error(
'programming error in deallocate_int1d', terminate=.true.)
2180 integer(I4B),
dimension(:, :),
pointer,
contiguous,
intent(inout) :: aint
2181 character(len=*),
optional :: name
2182 character(len=*),
optional :: mem_path
2185 logical(LGP) :: found
2191 if (
present(name) .and.
present(mem_path))
then
2196 do while (itr%has_next())
2199 if (
associated(mt%aint2d, aint))
then
2206 if (.not. found .and.
size(aint) > 0)
then
2207 call store_error(
'programming error in deallocate_int2d', terminate=.true.)
2220 integer(I4B),
dimension(:, :, :),
pointer,
contiguous,
intent(inout) :: aint
2221 character(len=*),
optional :: name
2222 character(len=*),
optional :: mem_path
2225 logical(LGP) :: found
2231 if (
present(name) .and.
present(mem_path))
then
2236 do while (itr%has_next())
2239 if (
associated(mt%aint3d, aint))
then
2246 if (.not. found .and.
size(aint) > 0)
then
2247 call store_error(
'programming error in deallocate_int3d', terminate=.true.)
2260 real(DP),
dimension(:),
pointer,
contiguous,
intent(inout) :: adbl
2261 character(len=*),
optional :: name
2262 character(len=*),
optional :: mem_path
2265 logical(LGP) :: found
2271 if (
present(name) .and.
present(mem_path))
then
2276 do while (itr%has_next())
2279 if (
associated(mt%adbl1d, adbl))
then
2286 if (.not. found .and.
size(adbl) > 0)
then
2287 call store_error(
'programming error in deallocate_dbl1d', terminate=.true.)
2300 real(DP),
dimension(:, :),
pointer,
contiguous,
intent(inout) :: adbl
2301 character(len=*),
optional :: name
2302 character(len=*),
optional :: mem_path
2305 logical(LGP) :: found
2311 if (
present(name) .and.
present(mem_path))
then
2316 do while (itr%has_next())
2319 if (
associated(mt%adbl2d, adbl))
then
2326 if (.not. found .and.
size(adbl) > 0)
then
2327 call store_error(
'programming error in deallocate_dbl2d', terminate=.true.)
2340 real(DP),
dimension(:, :, :),
pointer,
contiguous,
intent(inout) :: adbl
2341 character(len=*),
optional :: name
2342 character(len=*),
optional :: mem_path
2345 logical(LGP) :: found
2351 if (
present(name) .and.
present(mem_path))
then
2356 do while (itr%has_next())
2359 if (
associated(mt%adbl3d, adbl))
then
2366 if (.not. found .and.
size(adbl) > 0)
then
2367 call store_error(
'programming error in deallocate_dbl3d', terminate=.true.)
2380 integer(I4B),
intent(in) :: iout
2381 character(len=*),
intent(in) :: keyword
2382 character(len=*),
intent(inout) :: error_msg
2386 select case (keyword)
2389 write (iout,
'(4x, a)') &
2390 'LIMITED MEMORY INFORMATION WILL BE WRITTEN.'
2393 write (iout,
'(4x, a)') &
2394 'A SUMMARY OF SIMULATION MEMORY INFORMATION WILL BE WRITTEN.'
2397 write (iout,
'(4x, a)') &
2398 'ALL SIMULATION MEMORY INFORMATION WILL BE WRITTEN.'
2400 error_msg =
"Unknown memory print option '"//trim(keyword)//
"."
2407 integer(I4B),
intent(in) :: iout
2408 integer(I4B),
intent(in) :: nrows
2409 character(len=*),
intent(in) :: cunits
2411 character(len=LINELENGTH) :: title
2412 character(len=LINELENGTH) :: text
2413 integer(I4B) :: nterms
2419 title =
'SUMMARY INFORMATION ON VARIABLES STORED IN THE MEMORY MANAGER, '// &
2424 call memtab%table_df(nrows, nterms, iout)
2454 integer(I4B),
intent(in) :: iout
2455 integer(I4B),
intent(in) :: nrows
2457 character(len=LINELENGTH) :: title
2458 character(len=LINELENGTH) :: text
2459 integer(I4B) :: nterms
2465 title =
'DETAILED INFORMATION ON VARIABLES STORED IN THE MEMORY MANAGER'
2469 call memtab%table_df(nrows, nterms, iout)
2476 text =
'VARIABLE NAME'
2484 text =
'NUMBER OF ITEMS'
2488 text =
'ASSOCIATED VARIABLE'
2495 character(len=*),
intent(in) :: component
2496 real(DP),
intent(in) :: rchars
2497 real(DP),
intent(in) :: rlog
2498 real(DP),
intent(in) :: rint
2499 real(DP),
intent(in) :: rreal
2500 real(DP),
intent(in) :: bytes
2505 call memtab%add_term(component)
2506 call memtab%add_term(rchars)
2507 call memtab%add_term(rlog)
2508 call memtab%add_term(rint)
2509 call memtab%add_term(rreal)
2510 call memtab%add_term(bytes)
2517 real(DP),
intent(in) :: bytes
2518 real(DP),
intent(inout) :: fact
2519 character(len=*),
intent(inout) :: cunits
2529 if (bytes <
dep3)
then
2532 else if (bytes <
dep6)
then
2534 cunits =
'KILOBYTES'
2535 else if (bytes <
dep9)
then
2537 cunits =
'MEGABYTES'
2540 cunits =
'GIGABYTES'
2547 integer(I4B),
intent(in) :: iout
2548 real(DP),
intent(in) :: bytes
2550 character(len=LINELENGTH) :: title
2551 character(len=LINELENGTH) :: text
2552 character(LEN=10) :: cunits
2553 integer(I4B) :: nterms
2554 integer(I4B) :: nrows
2568 title =
'MEMORY MANAGER TOTAL STORAGE BY DATA TYPE, IN '//trim(cunits)
2572 call memtab%table_df(nrows, nterms, iout)
2579 text =
'ALLOCATED MEMORY'
2586 call memtab%add_term(
'Character')
2587 call memtab%add_term(smb)
2591 call memtab%add_term(
'Logical')
2592 call memtab%add_term(smb)
2596 call memtab%add_term(
'Integer')
2597 call memtab%add_term(smb)
2601 call memtab%add_term(
'Real')
2602 call memtab%add_term(smb)
2605 call memtab%print_separator()
2607 call memtab%add_term(
'Total')
2608 call memtab%add_term(smb)
2612 call memtab%add_term(
'Virtual')
2613 call memtab%add_term(smb)
2637 integer(I4B),
intent(in) :: iout
2640 character(len=LENMEMADDRESS),
allocatable,
dimension(:) :: cunique
2642 character(len=LENMEMPATH) :: context
2643 character(len=LENCOMPONENTNAME) :: component
2644 character(len=LENCOMPONENTNAME) :: subcomponent
2645 character(len=LENMEMADDRESS) :: context_component
2646 character(LEN=10) :: cunits
2648 integer(I4B) :: icomp
2649 integer(I4B) :: ilen
2650 integer(I8B) :: nchars
2651 integer(I8B) :: nlog
2652 integer(I8B) :: nint
2653 integer(I8B) :: nreal
2654 real(dp) :: simbytes
2669 simbytes = real(simbytes, dp)
2680 do icomp = 1,
size(cunique)
2686 ilen = len_trim(cunique(icomp))
2688 do while (itr%has_next())
2693 context_component = trim(context)//component
2694 if (cunique(icomp) /= context_component(1:ilen)) cycle
2695 if (.not. mt%master) cycle
2696 if (mt%memtype(1:6) ==
'STRING')
then
2697 nchars = nchars + mt%isize * mt%element_size
2698 else if (mt%memtype(1:7) ==
'LOGICAL')
then
2699 nlog = nlog + mt%isize
2700 else if (mt%memtype(1:7) ==
'INTEGER')
then
2701 nint = nint + mt%isize
2702 else if (mt%memtype(1:6) ==
'DOUBLE')
then
2703 nreal = nreal + mt%isize
2708 rchars = real(nchars, dp) * fact
2709 rlog = real(nlog * lgp, dp) * fact
2710 rint = real(nint * i4b, dp) * fact
2711 rreal = real(nreal * dp, dp) * fact
2714 bytes = rchars + rlog + rint + rreal
2732 integer(I4B) :: iout
2739 do while (itr%has_next())
2742 call mt%table_entry(
memtab)
2751 real(dp) :: vmem_size
2758 do while (itr%has_next())
2761 if (index(mt%path,
"__P") == 1)
then
2762 vmem_size = mt%element_size * mt%isize + vmem_size
2776 character(len=LINELENGTH) :: error_msg
2777 character(len=LENVARNAME) :: ucname
2781 do while (itr%has_next())
2787 if (mt%mt_associated() .and. mt%element_size == -1)
then
2788 error_msg = trim(adjustl(mt%path))//
' '// &
2789 trim(adjustl(mt%name))//
' has invalid element size'
2794 if (mt%mt_associated() .and. mt%isize > 0)
then
2795 error_msg = trim(adjustl(mt%path))//
' '// &
2796 trim(adjustl(mt%name))//
' not deallocated'
2803 if (mt%name /= ucname)
then
2804 error_msg = trim(adjustl(mt%path))//
' '// &
2805 trim(adjustl(mt%name))//
' not upper case'
2815 call store_error(
'Could not clear memory list.', terminate=.true.)
2826 character(len=LENMEMADDRESS),
allocatable,
dimension(:),
intent(inout) :: &
2830 character(len=LENMEMPATH) :: context
2831 character(len=LENCOMPONENTNAME) :: component
2832 character(len=LENCOMPONENTNAME) :: subcomponent
2833 character(len=LENMEMADDRESS) :: context_component
2839 allocate (cunique(0))
2843 do while (itr%has_next())
2848 context_component = trim(context)//component
2849 ipa =
ifind(cunique, context_component)
2852 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.