Force plotting of bathymetry
This commit is contained in:
parent
4f6ad7edba
commit
578d506698
4 changed files with 5 additions and 12 deletions
|
@ -15,7 +15,6 @@ out=bathy.npy
|
|||
step=1
|
||||
left=0
|
||||
right=150
|
||||
#plot=True
|
||||
|
||||
[artha]
|
||||
lat=43.398450
|
||||
|
|
|
@ -15,7 +15,6 @@ out=bathy.npy
|
|||
step=0.5
|
||||
left=0
|
||||
right=-1000
|
||||
plot=True
|
||||
|
||||
[artha]
|
||||
lat=43.398450
|
||||
|
|
|
@ -15,7 +15,6 @@ out=bathy.npy
|
|||
step=1
|
||||
left=0
|
||||
right=150
|
||||
#plot=True
|
||||
|
||||
[artha]
|
||||
lat=43.398450
|
||||
|
|
|
@ -6,10 +6,7 @@ import pathlib
|
|||
import numpy as np
|
||||
from scipy import interpolate
|
||||
|
||||
try:
|
||||
import matplotlib.pyplot as plt
|
||||
except ImportError:
|
||||
plt = None
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
from .lambert import Lambert
|
||||
|
||||
|
@ -133,8 +130,7 @@ np.savetxt(out_root.joinpath("hstru.dat"), hstru[::-1], newline=" ")
|
|||
np.savetxt(out_root.joinpath("poro.dat"), poro[::-1], newline=" ")
|
||||
np.savetxt(out_root.joinpath("psize.dat"), psize[::-1], newline=" ")
|
||||
|
||||
if plt is not None and config.getboolean("out", "plot", fallback=False):
|
||||
fig, ax = plt.subplots()
|
||||
ax.plot(-x, z, color="k")
|
||||
ax.fill_between(-x, z + hstru, z, color="k", alpha=0.2)
|
||||
fig.savefig(out_root.joinpath("bathy.pdf"))
|
||||
fig, ax = plt.subplots()
|
||||
ax.plot(-x, z, color="k")
|
||||
ax.fill_between(-x, z + hstru, z, color="k", alpha=0.2)
|
||||
fig.savefig(out_root.joinpath("bathy.pdf"))
|
||||
|
|
Loading…
Reference in a new issue