Generates the interface for reading/writing values for variables of the specified suffix
    for dimensions 0 through 7.

    :arg fpy: the generating function that accepts the dimension and type information
      and returns the (xnames, subtext).
    :arg suffix: one of [None, "_f", "_p"] corresponding to "allocatable", fixed dimension,
      and "pointer" type variables.

def fpy_interface_sub(fpy, dtype, kind, suffix=None):
    """Generates the interface for reading/writing values for variables of the specified suffix
    for dimensions 0 through 7.

    :arg fpy: the generating function that accepts the dimension and type information
      and returns the (xnames, subtext).
    :arg suffix: one of [None, "_f", "_p"] corresponding to "allocatable", fixed dimension,
      and "pointer" type variables.
    """
    allsubs = []
    xnames = []
    drange = list(range(8)) if suffix is None else list(range(1,8))
    for D in drange:
        xname, sub = fpy(D, dtype, kind, suffix)
        xnames.append(xname)
        allsubs.append(sub)

    return (xnames, '\n'.join(allsubs))