|
| 1 | +import sys |
1 | 2 | import numpy as np |
2 | 3 | import streamlit as st |
3 | 4 | import cloudpickle |
4 | 5 | import matplotlib.pyplot as plt |
| 6 | +from matplotlib.colors import LogNorm |
5 | 7 | from scipy.ndimage import gaussian_filter |
6 | 8 | from mpl_toolkits.axes_grid1 import make_axes_locatable |
7 | 9 | from pathlib import Path |
|
15 | 17 | page_icon="ogs_logo.png" |
16 | 18 | ) |
17 | 19 |
|
18 | | -Po=np.linspace(200,8000,10000) |
19 | | -Isonzo=np.linspace(0,1500,10000) |
20 | | -Timavo=np.linspace(8,150,10000) |
| 20 | +Po=np.linspace(200,4000,10000) |
| 21 | +Isonzo=np.linspace(0,500,10000) |
| 22 | +Timavo=np.linspace(8,80,10000) |
21 | 23 | variables=["N1p","N3n","S","T","Chla"] |
22 | 24 | depth={"O m":0, "10 m":1, "30 m":2, "60 m":3, "100 m":4} |
23 | 25 |
|
| 26 | +vmins={"N1p":0,"N3n": 0, "Chla":0, "S":30, "T":13} |
| 27 | +vmaxs={"N1p":0.2,"N3n": 10, "Chla":4, "S":39.5, "T":30} |
| 28 | + |
24 | 29 | # --- CONFIGURE YOUR CHOICES --- |
25 | | -depth_list = [0,10,30,60,100] |
| 30 | +depth_list = [0,10] |
26 | 31 | variables_list=["N1p","N3n","S","T","Chla"] |
27 | | -days_list=[0,1,2,3,4] |
| 32 | +days_list=[0,1,2,3,4,5] |
28 | 33 |
|
29 | 34 | depth_dict={ |
30 | 35 | 0:0, |
31 | 36 | 10:1, |
32 | | - 30:2, |
33 | | - 60:3, |
34 | | - 100:4 |
| 37 | + # 30:2, |
| 38 | + # 60:3, |
| 39 | + # 100:4 |
35 | 40 |
|
36 | 41 | } |
37 | 42 |
|
@@ -63,7 +68,8 @@ def model_predict(days, variable, depth, po, isonzo, timavo): |
63 | 68 | fig, ax = plt.subplots() |
64 | 69 | divider = make_axes_locatable(ax) |
65 | 70 | cax = divider.append_axes('right', size='5%', pad=0.05) |
66 | | -im=ax.imshow(Z, origin='lower', aspect='auto', cmap="Pastel1") |
| 71 | +# im=ax.imshow(Z, origin='lower', aspect='auto', cmap="Pastel1") |
| 72 | +im=ax.imshow(Z, origin='lower', aspect='auto', cmap="jet",vmin=vmins[variables_ctx],vmax=vmaxs[variables_ctx]) |
67 | 73 | #ax.set_title(f"{days_ctx} | ctx1={variables_ctx}, ctx2={depth_ctx} | a={po}, b={isonzo}, c={timavo}") |
68 | 74 | fig.colorbar(im, cax=cax, orientation='vertical') |
69 | 75 |
|
|
0 commit comments