Esempio n. 1
0
length = 5000
# according frequencies
f = (abs(fftpack.fftfreq(length, time_step_size))[:int(round(length / 2))])[1:]
d_list = [
    10, 7.5, 5, 2.5, 1, 0.75, 0.5, 0.25, 0.1, 0.075, 0.05, 0.025, 0.001,
    0.0075, 0.005, 0.0025, 0.0001
]
aquifer_length_list = [
    100, 250, 500, 750, 1000, 1250, 1500, 1750, 2000, 2500, 5000, 10000, 25000,
    50000, 75000, 10000
]

plt.figure(figsize=(16, 9))

for d, color in zip(d_list, range(len(d_list))):
    power_spectrum = discharge_ftf(f, d, aquifer_length_list[4])
    plt.loglog(power_spectrum,
               label="D = " + str(d),
               color=plt.cm.Reds(color * 25 + 100),
               linestyle="--")
    plt.ylim(1e-5, 2)
    #plt.xlim(1e-5, 2)

for aquifer_length, color in zip(aquifer_length_list,
                                 range(len(aquifer_length_list))):
    power_spectrum = discharge_ftf(f, d_list[6], aquifer_length)
    plt.loglog(power_spectrum,
               label="L = " + str(aquifer_length),
               color=plt.cm.Blues(color * 25))

plt.ylabel("Power Spectrum")
Esempio n. 2
0
                    "time_steps": time_steps,
                    "model_period": time_step_size * time_steps / 86400,
                    "which": which,
                    "recharge": get_filename_from_rfd_top_com(path_to_project),
                    "aquifer_length": aquifer_length,
                    "aquifer_thickness": aquifer_thickness,
                    "D": D[0],
                    "D_cov": D_cov[0],
                }

                results = results.append(other=results_temp,
                                         ignore_index=True,
                                         sort=False)

                # calculate the fitted power spectra
                Sqq_fitted = discharge_ftf(frequency, D, aquifer_length)

                Sqq_fitted = np.reshape(Sqq_fitted, (len(Sqq_fitted), ))
                Sqq = np.reshape(Sqq, (len(Sqq), ))

                data = np.vstack((Sqq, Sqq_fitted))

                labels = ["Sqq numerical", "Sqq fitted"]

                linestyle = ["-", "-"]
                # lims = [(1e-9,6e-6),(1e-6,1e5)]
                marker = ["", ""]
                figtxt = "OGS Input Parameter: S = %1.3e, T1 = %1.3e, T2 = %1.3e, D1 = %1.3e, D2 = %1.3e" % (
                    S, T_in_1, T_in_2, T_in_1 / S, T_in_2 /
                    S) + "\nDerived Parameter:    D = %1.3e, D_cov = %1.1e" % (
                        D[0],
Esempio n. 3
0
    baseflow = np.column_stack((baseflow_tmp, baseflow))
baseflow_sum_1301_1400 = np.sum(baseflow, axis=1)

# load the ogs input parameter from a file
kf_list_file = open(path_to_kf_values, "r")
for i, line in enumerate(kf_list_file):
    if i == 1:
        splitted_line = line.strip().split(", ")
        kf_geomean = float(splitted_line[0])
        kf_harmean = float(splitted_line[1])
        kf_arimean = float(splitted_line[2])

# calculate the power spectrum for 1001_1100: White Noise, 0.01
D_1001_1100, D_cov, frequency_1001_1100, power_spectrum_1001_1100 = discharge_ftf_fit(
    recharge_1001_1100, baseflow_sum_1001_1100, 86400, 1000)
power_spectrum_1001_1100_anal = discharge_ftf(frequency_1001_1100, D_1001_1100,
                                              aquifer_length)
power_spectrum_1001_1100_anal = np.reshape(
    power_spectrum_1001_1100_anal, (len(power_spectrum_1001_1100_anal), ))
power_spectrum_1001_1100 = np.reshape(power_spectrum_1001_1100,
                                      (len(power_spectrum_1001_1100), ))
figtxt = "OGS Input Parameter: Ss = %1.3e, D_geo = %1.3e, D_har = %1.3e, D_ari = %1.3e" % (
    Ss1,
    kf_geomean / Ss1,
    kf_harmean / Ss1,
    kf_arimean / Ss1,
) + "\nDerived Parameter:    D = %1.3e, D_cov = %1.1e" % (
    D_1001_1100[0],
    D_cov[0],
)
plot_spectrum(np.vstack(
    (power_spectrum_1001_1100, power_spectrum_1001_1100_anal)),