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

Private Member Functions

subroutine allocate_logical (sclr, name, mem_path)
 Allocate a logical scalar. More...
 
subroutine allocate_str (sclr, ilen, name, mem_path)
 Allocate a character string. More...
 
subroutine allocate_str1d (astr1d, ilen, nrow, name, mem_path)
 Allocate a 1-dimensional defined length string array. More...
 
subroutine allocate_int (sclr, name, mem_path)
 Allocate a integer scalar. More...
 
subroutine allocate_int1d (aint, nrow, name, mem_path)
 Allocate a 1-dimensional integer array. More...
 
subroutine allocate_int2d (aint, ncol, nrow, name, mem_path)
 Allocate a 2-dimensional integer array. More...
 
subroutine allocate_int3d (aint, ncol, nrow, nlay, name, mem_path)
 Allocate a 3-dimensional integer array. More...
 
subroutine allocate_dbl (sclr, name, mem_path)
 Allocate a real scalar. More...
 
subroutine allocate_dbl1d (adbl, nrow, name, mem_path)
 Allocate a 1-dimensional real array. More...
 
subroutine allocate_dbl2d (adbl, ncol, nrow, name, mem_path)
 Allocate a 2-dimensional real array. More...
 
subroutine allocate_dbl3d (adbl, ncol, nrow, nlay, name, mem_path)
 Allocate a 3-dimensional real array. More...
 
subroutine allocate_charstr1d (acharstr1d, ilen, nrow, name, mem_path)
 Allocate a 1-dimensional array of deferred-length CharacterStringType. More...
 

Detailed Description

Definition at line 54 of file MemoryManager.f90.

Member Function/Subroutine Documentation

◆ allocate_charstr1d()

subroutine memorymanagermodule::mem_allocate::allocate_charstr1d ( type(characterstringtype), dimension(:), intent(inout), pointer, contiguous  acharstr1d,
integer(i4b), intent(in)  ilen,
integer(i4b), intent(in)  nrow,
character(len=*), intent(in)  name,
character(len=*), intent(in)  mem_path 
)
private
Parameters
[in,out]acharstr1dvariable for allocation
[in]ilenstring length
[in]nrownumber of strings in array
[in]namevariable name
[in]mem_pathpath where the variable is stored

Definition at line 502 of file MemoryManager.f90.

503  type(CharacterStringType), dimension(:), &
504  pointer, contiguous, intent(inout) :: acharstr1d !< variable for allocation
505  integer(I4B), intent(in) :: ilen !< string length
506  integer(I4B), intent(in) :: nrow !< number of strings in array
507  character(len=*), intent(in) :: name !< variable name
508  character(len=*), intent(in) :: mem_path !< path where the variable is stored
509  ! -- local variables
510  character(len=ilen) :: string
511  type(MemoryType), pointer :: mt
512  integer(I4B) :: n
513  integer(I4B) :: istat
514  integer(I4B) :: isize
515  ! -- code
516  !
517  ! -- initialize string
518  string = ''
519  !
520  ! -- check variable name length
521  call mem_check_length(name, lenvarname, "variable")
522  !
523  ! -- calculate isize
524  isize = nrow
525  !
526  ! -- allocate deferred length string array
527  allocate (acharstr1d(nrow), stat=istat, errmsg=errmsg)
528  !
529  ! -- check for error condition
530  if (istat /= 0) then
531  call allocate_error(name, mem_path, istat, isize)
532  end if
533  !
534  ! -- fill deferred length string with empty string
535  do n = 1, nrow
536  acharstr1d(n) = string
537  end do
538  !
539  ! -- update counter
540  nvalues_astr = nvalues_astr + isize
541  !
542  ! -- allocate memory type
543  allocate (mt)
544  !
545  ! -- set memory type
546  mt%acharstr1d => acharstr1d
547  mt%element_size = ilen
548  mt%isize = isize
549  mt%name = name
550  mt%path = mem_path
551  write (mt%memtype, "(a,' LEN=',i0,' (',i0,')')") 'STRING', ilen, nrow
552  !
553  ! -- add deferred length character array to the memory manager list
554  call memorystore%add(mt)
Here is the call graph for this function:

◆ allocate_dbl()

subroutine memorymanagermodule::mem_allocate::allocate_dbl ( real(dp), intent(inout), pointer  sclr,
character(len=*), intent(in)  name,
character(len=*), intent(in)  mem_path 
)
private
Parameters
[in,out]sclrvariable for allocation
[in]namevariable name
[in]mem_pathpath where variable is stored

Definition at line 730 of file MemoryManager.f90.

731  real(DP), pointer, intent(inout) :: sclr !< variable for allocation
732  character(len=*), intent(in) :: name !< variable name
733  character(len=*), intent(in) :: mem_path !< path where variable is stored
734  ! -- local
735  type(MemoryType), pointer :: mt
736  integer(I4B) :: istat
737  ! -- code
738  !
739  ! -- check variable name length
740  call mem_check_length(name, lenvarname, "variable")
741  !
742  ! -- allocate real scalar
743  allocate (sclr, stat=istat, errmsg=errmsg)
744  if (istat /= 0) then
745  call allocate_error(name, mem_path, istat, 1)
746  end if
747  !
748  ! -- update counter
749  nvalues_aint = nvalues_aint + 1
750  !
751  ! -- allocate memory type
752  allocate (mt)
753  !
754  ! -- set memory type
755  mt%dblsclr => sclr
756  mt%element_size = dp
757  mt%isize = 1
758  mt%name = name
759  mt%path = mem_path
760  write (mt%memtype, "(a)") 'DOUBLE'
761  !
762  ! -- add memory type to the memory list
763  call memorystore%add(mt)
Here is the call graph for this function:

◆ allocate_dbl1d()

subroutine memorymanagermodule::mem_allocate::allocate_dbl1d ( real(dp), dimension(:), intent(inout), pointer, contiguous  adbl,
integer(i4b), intent(in)  nrow,
character(len=*), intent(in)  name,
character(len=*), intent(in)  mem_path 
)
private
Parameters
[in,out]adblvariable for allocation
[in]nrownumber of rows
[in]namevariable name
[in]mem_pathpath where variable is stored

Definition at line 768 of file MemoryManager.f90.

769  real(DP), dimension(:), pointer, contiguous, intent(inout) :: adbl !< variable for allocation
770  integer(I4B), intent(in) :: nrow !< number of rows
771  character(len=*), intent(in) :: name !< variable name
772  character(len=*), intent(in) :: mem_path !< path where variable is stored
773  ! -- local
774  type(MemoryType), pointer :: mt
775  integer(I4B) :: istat
776  integer(I4B) :: isize
777  ! -- code
778  !
779  ! -- check the variable name length
780  call mem_check_length(name, lenvarname, "variable")
781  !
782  ! -- set isize
783  isize = nrow
784  !
785  ! -- allocate the real array
786  allocate (adbl(nrow), stat=istat, errmsg=errmsg)
787  if (istat /= 0) then
788  call allocate_error(name, mem_path, istat, isize)
789  end if
790  !
791  ! -- update counter
792  nvalues_adbl = nvalues_adbl + isize
793  !
794  ! -- allocate memory type
795  allocate (mt)
796  !
797  ! -- set memory type
798  mt%adbl1d => adbl
799  mt%element_size = dp
800  mt%isize = isize
801  mt%name = name
802  mt%path = mem_path
803  write (mt%memtype, "(a,' (',i0,')')") 'DOUBLE', isize
804  !
805  ! -- add memory type to the memory list
806  call memorystore%add(mt)
Here is the call graph for this function:

◆ allocate_dbl2d()

subroutine memorymanagermodule::mem_allocate::allocate_dbl2d ( real(dp), dimension(:, :), intent(inout), pointer, contiguous  adbl,
integer(i4b), intent(in)  ncol,
integer(i4b), intent(in)  nrow,
character(len=*), intent(in)  name,
character(len=*), intent(in)  mem_path 
)
private
Parameters
[in,out]adblvariable for allocation
[in]ncolnumber of columns
[in]nrownumber of rows
[in]namevariable name
[in]mem_pathpath where variable is stored

Definition at line 811 of file MemoryManager.f90.

812  real(DP), dimension(:, :), pointer, contiguous, intent(inout) :: adbl !< variable for allocation
813  integer(I4B), intent(in) :: ncol !< number of columns
814  integer(I4B), intent(in) :: nrow !< number of rows
815  character(len=*), intent(in) :: name !< variable name
816  character(len=*), intent(in) :: mem_path !< path where variable is stored
817  ! -- local
818  type(MemoryType), pointer :: mt
819  integer(I4B) :: istat
820  integer(I4B) :: isize
821  ! -- code
822  !
823  ! -- check the variable name length
824  call mem_check_length(name, lenvarname, "variable")
825  !
826  ! -- set isize
827  isize = ncol * nrow
828  !
829  ! -- allocate the real array
830  allocate (adbl(ncol, nrow), stat=istat, errmsg=errmsg)
831  if (istat /= 0) then
832  call allocate_error(name, mem_path, istat, isize)
833  end if
834  !
835  ! -- update counter
836  nvalues_adbl = nvalues_adbl + isize
837  !
838  ! -- allocate memory type
839  allocate (mt)
840  !
841  ! -- set memory type
842  mt%adbl2d => adbl
843  mt%element_size = dp
844  mt%isize = isize
845  mt%name = name
846  mt%path = mem_path
847  write (mt%memtype, "(a,' (',i0,',',i0,')')") 'DOUBLE', ncol, nrow
848  !
849  ! -- add memory type to the memory list
850  call memorystore%add(mt)
Here is the call graph for this function:

◆ allocate_dbl3d()

subroutine memorymanagermodule::mem_allocate::allocate_dbl3d ( real(dp), dimension(:, :, :), intent(inout), pointer, contiguous  adbl,
integer(i4b), intent(in)  ncol,
integer(i4b), intent(in)  nrow,
integer(i4b), intent(in)  nlay,
character(len=*), intent(in)  name,
character(len=*), intent(in)  mem_path 
)
private
Parameters
[in,out]adblvariable for allocation
[in]ncolnumber of columns
[in]nrownumber of rows
[in]nlaynumber of layers
[in]namevariable name
[in]mem_pathpath where variable is stored

Definition at line 855 of file MemoryManager.f90.

856  real(DP), dimension(:, :, :), pointer, contiguous, intent(inout) :: adbl !< variable for allocation
857  integer(I4B), intent(in) :: ncol !< number of columns
858  integer(I4B), intent(in) :: nrow !< number of rows
859  integer(I4B), intent(in) :: nlay !< number of layers
860  character(len=*), intent(in) :: name !< variable name
861  character(len=*), intent(in) :: mem_path !< path where variable is stored
862  ! -- local
863  type(MemoryType), pointer :: mt
864  integer(I4B) :: istat
865  integer(I4B) :: isize
866  ! -- code
867  !
868  ! -- check the variable name length
869  call mem_check_length(name, lenvarname, "variable")
870  !
871  ! -- set isize
872  isize = ncol * nrow * nlay
873  !
874  ! -- allocate the real array
875  allocate (adbl(ncol, nrow, nlay), stat=istat, errmsg=errmsg)
876  if (istat /= 0) then
877  call allocate_error(name, mem_path, istat, isize)
878  end if
879  !
880  ! -- update the counter
881  nvalues_adbl = nvalues_adbl + isize
882  !
883  ! -- allocate memory type
884  allocate (mt)
885  !
886  ! -- set memory type
887  mt%adbl3d => adbl
888  mt%element_size = dp
889  mt%isize = isize
890  mt%name = name
891  mt%path = mem_path
892  write (mt%memtype, "(a,' (',i0,',',i0,',',i0,')')") 'DOUBLE', ncol, &
893  nrow, nlay
894  !
895  ! -- add memory type to the memory list
896  call memorystore%add(mt)
Here is the call graph for this function:

◆ allocate_int()

subroutine memorymanagermodule::mem_allocate::allocate_int ( integer(i4b), intent(inout), pointer  sclr,
character(len=*), intent(in)  name,
character(len=*), intent(in)  mem_path 
)
private
Parameters
[in,out]sclrvariable for allocation
[in]namevariable name
[in]mem_pathpath where the variable is stored

Definition at line 559 of file MemoryManager.f90.

560  integer(I4B), pointer, intent(inout) :: sclr !< variable for allocation
561  character(len=*), intent(in) :: name !< variable name
562  character(len=*), intent(in) :: mem_path !< path where the variable is stored
563  ! -- local
564  type(MemoryType), pointer :: mt
565  integer(I4B) :: istat
566  ! -- code
567  !
568  ! -- check variable name length
569  call mem_check_length(name, lenvarname, "variable")
570  !
571  ! -- allocate integer scalar
572  allocate (sclr, stat=istat, errmsg=errmsg)
573  if (istat /= 0) then
574  call allocate_error(name, mem_path, istat, 1)
575  end if
576  !
577  ! -- update counter
578  nvalues_aint = nvalues_aint + 1
579  !
580  ! -- allocate memory type
581  allocate (mt)
582  !
583  ! -- set memory type
584  mt%intsclr => sclr
585  mt%element_size = i4b
586  mt%isize = 1
587  mt%name = name
588  mt%path = mem_path
589  write (mt%memtype, "(a)") 'INTEGER'
590  !
591  ! -- add memory type to the memory list
592  call memorystore%add(mt)
Here is the call graph for this function:

◆ allocate_int1d()

subroutine memorymanagermodule::mem_allocate::allocate_int1d ( integer(i4b), dimension(:), intent(inout), pointer, contiguous  aint,
integer(i4b), intent(in)  nrow,
character(len=*), intent(in)  name,
character(len=*), intent(in)  mem_path 
)
private
Parameters
[in,out]aintvariable for allocation
[in]nrowinteger array number of rows
[in]namevariable name
[in]mem_pathpath where variable is stored

Definition at line 597 of file MemoryManager.f90.

598  integer(I4B), dimension(:), pointer, contiguous, intent(inout) :: aint !< variable for allocation
599  integer(I4B), intent(in) :: nrow !< integer array number of rows
600  character(len=*), intent(in) :: name !< variable name
601  character(len=*), intent(in) :: mem_path !< path where variable is stored
602  ! --local
603  type(MemoryType), pointer :: mt
604  integer(I4B) :: istat
605  integer(I4B) :: isize
606  ! -- code
607  !
608  ! -- check variable name length
609  call mem_check_length(name, lenvarname, "variable")
610  !
611  ! -- set isize
612  isize = nrow
613  !
614  ! -- allocate integer array
615  allocate (aint(nrow), stat=istat, errmsg=errmsg)
616  if (istat /= 0) then
617  call allocate_error(name, mem_path, istat, isize)
618  end if
619  !
620  ! -- update counter
621  nvalues_aint = nvalues_aint + isize
622  !
623  ! -- allocate memory type
624  allocate (mt)
625  !
626  ! -- set memory type
627  mt%aint1d => aint
628  mt%element_size = i4b
629  mt%isize = isize
630  mt%name = name
631  mt%path = mem_path
632  write (mt%memtype, "(a,' (',i0,')')") 'INTEGER', isize
633  !
634  ! -- add memory type to the memory list
635  call memorystore%add(mt)
Here is the call graph for this function:

◆ allocate_int2d()

subroutine memorymanagermodule::mem_allocate::allocate_int2d ( integer(i4b), dimension(:, :), intent(inout), pointer, contiguous  aint,
integer(i4b), intent(in)  ncol,
integer(i4b), intent(in)  nrow,
character(len=*), intent(in)  name,
character(len=*), intent(in)  mem_path 
)
private
Parameters
[in,out]aintvariable for allocation
[in]ncolnumber of columns
[in]nrownumber of rows
[in]namevariable name
[in]mem_pathpath where variable is stored

Definition at line 640 of file MemoryManager.f90.

641  integer(I4B), dimension(:, :), pointer, contiguous, intent(inout) :: aint !< variable for allocation
642  integer(I4B), intent(in) :: ncol !< number of columns
643  integer(I4B), intent(in) :: nrow !< number of rows
644  character(len=*), intent(in) :: name !< variable name
645  character(len=*), intent(in) :: mem_path !< path where variable is stored
646  ! -- local
647  type(MemoryType), pointer :: mt
648  integer(I4B) :: istat
649  integer(I4B) :: isize
650  ! -- code
651  !
652  ! -- check the variable name length
653  call mem_check_length(name, lenvarname, "variable")
654  !
655  ! -- set isize
656  isize = ncol * nrow
657  !
658  ! -- allocate the integer array
659  allocate (aint(ncol, nrow), stat=istat, errmsg=errmsg)
660  if (istat /= 0) then
661  call allocate_error(name, mem_path, istat, isize)
662  end if
663  !
664  ! -- update the counter
665  nvalues_aint = nvalues_aint + isize
666  !
667  ! -- allocate memory type
668  allocate (mt)
669  !
670  ! -- set memory type
671  mt%aint2d => aint
672  mt%element_size = i4b
673  mt%isize = isize
674  mt%name = name
675  mt%path = mem_path
676  write (mt%memtype, "(a,' (',i0,',',i0,')')") 'INTEGER', ncol, nrow
677  !
678  ! -- add memory type to the memory list
679  call memorystore%add(mt)
Here is the call graph for this function:

◆ allocate_int3d()

subroutine memorymanagermodule::mem_allocate::allocate_int3d ( integer(i4b), dimension(:, :, :), intent(inout), pointer, contiguous  aint,
integer(i4b), intent(in)  ncol,
integer(i4b), intent(in)  nrow,
integer(i4b), intent(in)  nlay,
character(len=*), intent(in)  name,
character(len=*), intent(in)  mem_path 
)
private
Parameters
[in,out]aintvariable for allocation
[in]ncolnumber of columns
[in]nrownumber of rows
[in]nlaynumber of layers
[in]namevariable name
[in]mem_pathpath where variable is stored

Definition at line 684 of file MemoryManager.f90.

685  integer(I4B), dimension(:, :, :), pointer, contiguous, intent(inout) :: aint !< variable for allocation
686  integer(I4B), intent(in) :: ncol !< number of columns
687  integer(I4B), intent(in) :: nrow !< number of rows
688  integer(I4B), intent(in) :: nlay !< number of layers
689  character(len=*), intent(in) :: name !< variable name
690  character(len=*), intent(in) :: mem_path !< path where variable is stored
691  ! -- local
692  type(MemoryType), pointer :: mt
693  integer(I4B) :: istat
694  integer(I4B) :: isize
695  ! -- code
696  !
697  ! -- check variable name length
698  call mem_check_length(name, lenvarname, "variable")
699  !
700  ! -- set isize
701  isize = ncol * nrow * nlay
702  !
703  ! -- allocate integer array
704  allocate (aint(ncol, nrow, nlay), stat=istat, errmsg=errmsg)
705  if (istat /= 0) then
706  call allocate_error(name, mem_path, istat, isize)
707  end if
708  !
709  ! -- update counter
710  nvalues_aint = nvalues_aint + isize
711  !
712  ! -- allocate memory type
713  allocate (mt)
714  !
715  ! -- set memory type
716  mt%aint3d => aint
717  mt%element_size = i4b
718  mt%isize = isize
719  mt%name = name
720  mt%path = mem_path
721  write (mt%memtype, "(a,' (',i0,',',i0,',',i0,')')") 'INTEGER', ncol, &
722  nrow, nlay
723  !
724  ! -- add memory type to the memory list
725  call memorystore%add(mt)
Here is the call graph for this function:

◆ allocate_logical()

subroutine memorymanagermodule::mem_allocate::allocate_logical ( logical(lgp), intent(inout), pointer  sclr,
character(len=*), intent(in)  name,
character(len=*), intent(in)  mem_path 
)
private
Parameters
[in,out]sclrvariable for allocation
[in]namevariable name
[in]mem_pathpath where the variable is stored

Definition at line 349 of file MemoryManager.f90.

350  logical(LGP), pointer, intent(inout) :: sclr !< variable for allocation
351  character(len=*), intent(in) :: name !< variable name
352  character(len=*), intent(in) :: mem_path !< path where the variable is stored
353  ! -- local
354  integer(I4B) :: istat
355  type(MemoryType), pointer :: mt
356  ! -- code
357  !
358  ! -- check variable name length
359  call mem_check_length(name, lenvarname, "variable")
360  !
361  ! -- allocate the logical scalar
362  allocate (sclr, stat=istat, errmsg=errmsg)
363  if (istat /= 0) then
364  call allocate_error(name, mem_path, istat, 1)
365  end if
366  !
367  ! -- update counter
368  nvalues_alogical = nvalues_alogical + 1
369  !
370  ! -- allocate memory type
371  allocate (mt)
372  !
373  ! -- set memory type
374  mt%logicalsclr => sclr
375  mt%element_size = lgp
376  mt%isize = 1
377  mt%name = name
378  mt%path = mem_path
379  write (mt%memtype, "(a)") 'LOGICAL'
380  !
381  ! -- add memory type to the memory list
382  call memorystore%add(mt)
Here is the call graph for this function:

◆ allocate_str()

subroutine memorymanagermodule::mem_allocate::allocate_str ( character(len=ilen), intent(inout), pointer  sclr,
integer(i4b), intent(in)  ilen,
character(len=*), intent(in)  name,
character(len=*), intent(in)  mem_path 
)
private
Parameters
[in]ilenstring length
[in,out]sclrvariable for allocation
[in]namevariable name
[in]mem_pathpath where the variable is stored

Definition at line 387 of file MemoryManager.f90.

388  integer(I4B), intent(in) :: ilen !< string length
389  character(len=ilen), pointer, intent(inout) :: sclr !< variable for allocation
390  character(len=*), intent(in) :: name !< variable name
391  character(len=*), intent(in) :: mem_path !< path where the variable is stored
392  ! -- local
393  integer(I4B) :: istat
394  type(MemoryType), pointer :: mt
395  ! -- format
396  ! -- code
397  !
398  ! -- make sure ilen is greater than 0
399  if (ilen < 1) then
400  errmsg = 'Programming error in allocate_str. ILEN must be greater than 0.'
401  call store_error(errmsg, terminate=.true.)
402  end if
403  !
404  ! -- check variable name length
405  call mem_check_length(name, lenvarname, "variable")
406  !
407  ! -- allocate string
408  allocate (character(len=ilen) :: sclr, stat=istat, errmsg=errmsg)
409  if (istat /= 0) then
410  call allocate_error(name, mem_path, istat, 1)
411  end if
412  !
413  ! -- set sclr to a empty string
414  sclr = ' '
415  !
416  ! -- update counter
417  nvalues_astr = nvalues_astr + ilen
418  !
419  ! -- allocate memory type
420  allocate (mt)
421  !
422  ! -- set memory type
423  mt%strsclr => sclr
424  mt%element_size = ilen
425  mt%isize = 1
426  mt%name = name
427  mt%path = mem_path
428  write (mt%memtype, "(a,' LEN=',i0)") 'STRING', ilen
429  !
430  ! -- add defined length string to the memory manager list
431  call memorystore%add(mt)
Here is the call graph for this function:

◆ allocate_str1d()

subroutine memorymanagermodule::mem_allocate::allocate_str1d ( character(len=ilen), dimension(:), intent(inout), pointer, contiguous  astr1d,
integer(i4b), intent(in)  ilen,
integer(i4b), intent(in)  nrow,
character(len=*), intent(in)  name,
character(len=*), intent(in)  mem_path 
)
private
Parameters
[in]ilenstring length
[in,out]astr1dvariable for allocation
[in]nrownumber of strings in array
[in]namevariable name
[in]mem_pathpath where the variable is stored

Definition at line 436 of file MemoryManager.f90.

437  integer(I4B), intent(in) :: ilen !< string length
438  character(len=ilen), dimension(:), &
439  pointer, contiguous, intent(inout) :: astr1d !< variable for allocation
440  integer(I4B), intent(in) :: nrow !< number of strings in array
441  character(len=*), intent(in) :: name !< variable name
442  character(len=*), intent(in) :: mem_path !< path where the variable is stored
443  ! -- local variables
444  type(MemoryType), pointer :: mt
445  character(len=ilen) :: string
446  integer(I4B) :: n
447  integer(I4B) :: istat
448  integer(I4B) :: isize
449  ! -- code
450  !
451  ! -- initialize string
452  string = ''
453  !
454  ! -- make sure ilen is greater than 0
455  if (ilen < 1) then
456  errmsg = 'Programming error in allocate_str1d. '// &
457  'ILEN must be greater than 0.'
458  call store_error(errmsg, terminate=.true.)
459  end if
460  !
461  ! -- check variable name length
462  call mem_check_length(name, lenvarname, "variable")
463  !
464  ! -- calculate isize
465  isize = nrow
466  !
467  ! -- allocate defined length string array
468  allocate (character(len=ilen) :: astr1d(nrow), stat=istat, errmsg=errmsg)
469  !
470  ! -- check for error condition
471  if (istat /= 0) then
472  call allocate_error(name, mem_path, istat, isize)
473  end if
474  !
475  ! -- fill deferred length string with empty string
476  do n = 1, nrow
477  astr1d(n) = string
478  end do
479  !
480  ! -- update counter
481  nvalues_astr = nvalues_astr + isize
482  !
483  ! -- allocate memory type
484  allocate (mt)
485  !
486  ! -- set memory type
487  ! this does not work with gfortran 11.3 and 12.1
488  ! so we have to disable the pointing to astr1d
489  ! mt%astr1d => astr1d
490  mt%element_size = ilen
491  mt%isize = isize
492  mt%name = name
493  mt%path = mem_path
494  write (mt%memtype, "(a,' LEN=',i0,' (',i0,')')") 'STRING', ilen, nrow
495  !
496  ! -- add deferred length character array to the memory manager list
497  call memorystore%add(mt)
Here is the call graph for this function:

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