Exemplo n.º 1
0
def export_tables(silent=True):
    if config.plotSave:

        caption = "Infiltration and pumping rates for example {}.".format(
            sim_name
        )
        headings = (
            "Stress period",
            "Infiltration rate",
            "Pumping rate",
        )
        fpth = os.path.join("..", "tables", "{}-02.tex".format(sim_name))
        dtype = [
            ("nper", "U30"),
            ("infilt", "U30"),
            ("rate", "U30"),
        ]
        arr = np.zeros(nper, dtype=dtype)
        for n in range(nper):
            arr["nper"][n] = bt.int_format(n + 1)
            arr["infilt"][n] = bt.exp_format(infiltration[n])
            arr["rate"][n] = bt.float_format(well_rates[n])
        if not silent:
            print("creating...'{}'".format(fpth))
        col_widths = (0.1, 0.30, 0.30)
        bt.build_table(
            caption, fpth, arr, headings=headings, col_widths=col_widths
        )
Exemplo n.º 2
0
def export_tables(silent=True):
    if config.plotSave:
        name = list(parameters.keys())[1]

        caption = "Aquifer properties for example {}.".format(sim_name)
        headings = (
            "Layer",
            "Thickness",
            "Hydraulic conductivity",
            "Initial head",
        )
        fpth = os.path.join("..", "tables", "{}-01.tex".format(sim_name))
        dtype = [
            ("k", "U30"),
            ("thickness", "U30"),
            ("k33", "U30"),
            ("h0", "U30"),
        ]
        arr = np.zeros(nlay, dtype=dtype)
        for k in range(nlay):
            arr["k"][k] = bt.int_format(k + 1)
            arr["thickness"][k] = bt.float_format(zelevs[k] - zelevs[k + 1])
            arr["k33"][k] = bt.exp_format(k33[k])
            arr["h0"][k] = bt.float_format(strt[k])
        if not silent:
            print("creating...'{}'".format(fpth))
        col_widths = (0.1, 0.15, 0.30, 0.25)
        bt.build_table(
            caption, fpth, arr, headings=headings, col_widths=col_widths
        )

        caption = "Interbed properties for example {}.".format(sim_name)
        headings = (
            "Interbed",
            "Layer",
            "Thickness",
            "Initial stress",
        )
        fpth = os.path.join("..", "tables", "{}-02.tex".format(sim_name))
        dtype = [
            ("ib", "U30"),
            ("k", "U30"),
            ("thickness", "U30"),
            ("pcs0", "U30"),
        ]
        arr = np.zeros(len(ib_ctype), dtype=dtype)
        for idx, ctype in enumerate(ib_ctype):
            arr["ib"][idx] = bt.int_format(idx + 1)
            arr["k"][idx] = bt.int_format(ib_cellid[idx][0] + 1)
            if ctype == "nodelay":
                arr["thickness"][idx] = bt.float_format(ib_thickness[idx])
            else:
                b = ib_thickness[idx] * ib_rnb[idx]
                arr["thickness"][idx] = bt.float_format(b)
            arr["pcs0"][idx] = bt.float_format(parameters[name]["pcs0"][idx])
        if not silent:
            print("creating...'{}'".format(fpth))
        bt.build_table(caption, fpth, arr, headings=headings)

        caption = "Aquifer storage properties for example {}.".format(sim_name)
        headings = (
            "Layer",
            "Specific Storage",
        )
        fpth = os.path.join("..", "tables", "{}-03.tex".format(sim_name))
        dtype = [("k", "U30"), ("ss", "U30")]
        arr = np.zeros(4, dtype=dtype)
        for idx, k in enumerate((4, 6, 11, 13)):
            arr["k"][idx] = bt.int_format(k + 1)
            arr["ss"][idx] = bt.exp_format(parameters[name]["cg_ske"][k])
        if not silent:
            print("creating...'{}'".format(fpth))
        col_widths = (0.1, 0.25)
        bt.build_table(
            caption, fpth, arr, headings=headings, col_widths=col_widths
        )

        caption = "Interbed storage properties for example {}.".format(
            sim_name
        )
        headings = (
            "Interbed",
            "Layer",
            "Inelastic \\newline Specific \\newline Storage",
            "Elastic \\newline Specific \\newline Storage",
        )
        fpth = os.path.join("..", "tables", "{}-04.tex".format(sim_name))
        dtype = [
            ("ib", "U30"),
            ("k", "U30"),
            ("ssv", "U30"),
            ("sse", "U30"),
        ]
        arr = np.zeros(len(ib_ctype), dtype=dtype)
        for idx, ctype in enumerate(ib_ctype):
            arr["ib"][idx] = bt.int_format(idx + 1)
            arr["k"][idx] = bt.int_format(ib_cellid[idx][0] + 1)
            arr["ssv"][idx] = bt.exp_format(parameters[name]["ssv"][idx])
            arr["sse"][idx] = bt.exp_format(parameters[name]["sse"][idx])
        if not silent:
            print("creating...'{}'".format(fpth))
        col_widths = (0.2, 0.2, 0.2, 0.2)
        bt.build_table(
            caption,
            fpth,
            arr,
            headings=headings,
            col_widths=col_widths,
        )

    return