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
|
step=1
|
||||||
left=0
|
left=0
|
||||||
right=150
|
right=150
|
||||||
#plot=True
|
|
||||||
|
|
||||||
[artha]
|
[artha]
|
||||||
lat=43.398450
|
lat=43.398450
|
||||||
|
|
|
@ -15,7 +15,6 @@ out=bathy.npy
|
||||||
step=0.5
|
step=0.5
|
||||||
left=0
|
left=0
|
||||||
right=-1000
|
right=-1000
|
||||||
plot=True
|
|
||||||
|
|
||||||
[artha]
|
[artha]
|
||||||
lat=43.398450
|
lat=43.398450
|
||||||
|
|
|
@ -15,7 +15,6 @@ out=bathy.npy
|
||||||
step=1
|
step=1
|
||||||
left=0
|
left=0
|
||||||
right=150
|
right=150
|
||||||
#plot=True
|
|
||||||
|
|
||||||
[artha]
|
[artha]
|
||||||
lat=43.398450
|
lat=43.398450
|
||||||
|
|
|
@ -6,10 +6,7 @@ import pathlib
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from scipy import interpolate
|
from scipy import interpolate
|
||||||
|
|
||||||
try:
|
import matplotlib.pyplot as plt
|
||||||
import matplotlib.pyplot as plt
|
|
||||||
except ImportError:
|
|
||||||
plt = None
|
|
||||||
|
|
||||||
from .lambert import Lambert
|
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("poro.dat"), poro[::-1], newline=" ")
|
||||||
np.savetxt(out_root.joinpath("psize.dat"), psize[::-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()
|
||||||
fig, ax = plt.subplots()
|
ax.plot(-x, z, color="k")
|
||||||
ax.plot(-x, z, color="k")
|
ax.fill_between(-x, z + hstru, z, color="k", alpha=0.2)
|
||||||
ax.fill_between(-x, z + hstru, z, color="k", alpha=0.2)
|
fig.savefig(out_root.joinpath("bathy.pdf"))
|
||||||
fig.savefig(out_root.joinpath("bathy.pdf"))
|
|
||||||
|
|
Loading…
Reference in a new issue