Description
Recently, a PR came through (#1148) that added new functionality to an existing scheme that needed many more domain-spanning variables to function (i.e. had horizontal and vertical dimension). Since the new functionality is guarded by a logical flag, it would be straightforward to conditionally allocate variables used in this new, optional functionality, both locally in the scheme, and in the host. In order to reduce the memory footprint, it would be beneficial to go through ALL schemes and check for instances like this where memory can be reduced when certain flags are not set.
Solution
Make local variables allocatable as necessary and only allocate if they are actually used, both locally in schemes and in the host.
Related to
#1148