Allocate and assign members of a new TimeArrayType object. Allocate space for the array so that this subroutine can be called repeatedly with the same array (but with different contents).
36
41
42 type(TimeArrayType), pointer, intent(out) :: newTa
43 character(len=*), intent(in) :: modelname
44
45 integer(I4B), dimension(:), contiguous, &
46 pointer :: mshape
47 character(len=LENMEMPATH) :: mempath
48 integer(I4B) :: isize
49
50
51 nullify (mshape)
52
53
54
56
57
58 call mem_setptr(mshape,
'MODEL_SHAPE', mempath)
59
60
61 if (size(mshape) == 2) then
62 isize = mshape(2)
63 else if (size(mshape) == 3) then
64 isize = mshape(2) * mshape(3)
65 else
66 errmsg =
'Time array series is not supported for discretization type'
67 call store_error(
errmsg, terminate=.true.)
68 end if
69
70 allocate (newta)
71 allocate (newta%taArray(isize))
This module contains simulation constants.
integer(i4b), parameter lenmempath
maximum length of the memory path
character(len=lenmempath) function create_mem_path(component, subcomponent, context)
returns the path to the memory object
This module contains simulation variables.
character(len=maxcharlen) errmsg
error message string
character(len=linelength) idm_context