Skip to content

Commit 8f1f64f

Browse files
committed
Update models & remove unused ones
1 parent 25bff54 commit 8f1f64f

2 files changed

Lines changed: 18 additions & 10 deletions

File tree

fetch_data.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,13 @@ def clear_directory(directory: Path) -> None:
6868
maximum_longitude=18,
6969
minimum_latitude=42,
7070
maximum_latitude=47,
71+
minimum_depth=0,
72+
maximum_depth=120,
7173
start_datetime=formatted_date,
7274
end_datetime=formatted_date,
7375
output_filename=str(depths_nc_path),
7476
force_download=True
75-
)
77+
)
7678

7779
d_dataset = nc.Dataset(str(depths_nc_path)).variables["depth"][:]
7880

rom.py

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
import sys
12
import numpy as np
23
import streamlit as st
34
import cloudpickle
45
import matplotlib.pyplot as plt
6+
from matplotlib.colors import LogNorm
57
from scipy.ndimage import gaussian_filter
68
from mpl_toolkits.axes_grid1 import make_axes_locatable
79
from pathlib import Path
@@ -15,23 +17,26 @@
1517
page_icon="ogs_logo.png"
1618
)
1719

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)
2123
variables=["N1p","N3n","S","T","Chla"]
2224
depth={"O m":0, "10 m":1, "30 m":2, "60 m":3, "100 m":4}
2325

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+
2429
# --- CONFIGURE YOUR CHOICES ---
25-
depth_list = [0,10,30,60,100]
30+
depth_list = [0,10]
2631
variables_list=["N1p","N3n","S","T","Chla"]
27-
days_list=[0,1,2,3,4]
32+
days_list=[0,1,2,3,4,5]
2833

2934
depth_dict={
3035
0:0,
3136
10:1,
32-
30:2,
33-
60:3,
34-
100:4
37+
# 30:2,
38+
# 60:3,
39+
# 100:4
3540

3641
}
3742

@@ -63,7 +68,8 @@ def model_predict(days, variable, depth, po, isonzo, timavo):
6368
fig, ax = plt.subplots()
6469
divider = make_axes_locatable(ax)
6570
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])
6773
#ax.set_title(f"{days_ctx} | ctx1={variables_ctx}, ctx2={depth_ctx} | a={po}, b={isonzo}, c={timavo}")
6874
fig.colorbar(im, cax=cax, orientation='vertical')
6975

0 commit comments

Comments
 (0)