[TRNSYS-users] Where to allocate dynamic arrays in new types

Hans Böhm h.boehm at student.tugraz.at
Thu Oct 16 02:04:44 PDT 2014


Dear trnsys users,

  i wrote a new type for my trnsys project, which uses allocatable/dynamic
  arrays. The array size is defined by a parameter in the proforma.

  Currently i allocate the arrays during initialization call (INFO(7) == -1)
  and deallocate them during the last call (INFO(8) == -1) as recommended at
https://www.mail-archive.com/trnsys-users@engr.wisc.edu/msg01360.html.

  This works so far as long as i only use one unit of this type in my
simulation. When i add another one i get the following error:

  forrtl: severe (151): allocatable array is already allocated

  So where/how do i have to allocate and deallocate my arrays to be able to
use multiple units of my type? Any ideas?

Thanks,

Hans Böhm




More information about the TRNSYS-users mailing list