There is a situation where an explicit deviation from the FORTRAN standard is acceptable, namely array
transfer to underlying subroutines. On the one hand, it is accepted that the dimension number and
size in a current array are different to the number and size in an associated dummy argument array
declarator, while on the other hand it is accepted that arrays are transferred by using the start
address. In both situations explicit use is therefore made of the FORTRAN characteristic that array
transfer means no more than start address transfer.
It goes without saying that this option goes against programming ethics and should therefore be
avoided wherever possible, although its use is inevitable in larger packages. Several reasons are:
-dimensional array (e.g. for the matrix structure), whereas in other subroutines an
-dimensional
array is preferred (e.g. for the linear solver). If the same dimension were used in both subroutines,
the address calculations would need to be carried out time and again. This has a negative effect on
efficiency and definitely on readability.
The SWAN team 2022-08-10