Skip to content

'writemodel' does not work for ModelXsection objects #124

@MattBrst

Description

@MattBrst

When I try ml.writemodel() on an ModelXsection, I get the following error message: AttributeError: 'ModelXsection' object has no attribute 'inputargs'

Here is the code to reproduce the error (taken from #110):

import numpy as np
import ttim

ml = ttim.ModelXsection(naq=1, tmin=1e-4, tmax=1e2)

z = [5, 0, -10]
kh = 10
c = 100
Saq = 1e-3
Sll = 1e-2
tsandhstar = [(0, 1)]

riv = ttim.XsectionMaq(
    ml,
    -np.inf,  # river extends to infinitiy
    0,
    z=z,
    kaq=kh,
    Saq=Saq,
    Sll=Sll,
    c=c,
    topboundary="semi",
    tsandhstar=tsandhstar,
    name="river",
)

land = ttim.XsectionMaq(
    ml,
    0,
    np.inf,  # hinterland extends to infinity
    kaq=kh,
    z=z,
    Saq=Saq,
    Sll=Sll,
    c=c,
    topboundary="semi",
    name="landpart",
)

ml.solve()

ml.writemodel("./my_model.txt")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions