Closed brey closed 9 months ago
With the first 6 days of May 2023 we get an exception:
5%|█████████▋ | 48/961 [00:00<00:04, 187.58it/s] --------------------------------------------------------------------------- IndexError Traceback (most recent call last) File /mnt/to_thalassa/run.py:50 47 end_time = pd.Timestamp("2023-05-06T00:00:00") 48 stations = gpd.read_file("base_model/stations.json") ---> 50 ods = compute_obs(stations=stations, start_time=start_time, end_time=end_time) 51 save_ods(ods) 52 1/0 File /mnt/micromamba/envs/pos_dev/lib/python3.10/site-packages/pyposeidon/utils/post.py:55, in compute_obs(stations, start_time, end_time) 52 if oi[var].isnull().all().values == True: 53 oi = oi.drop(var) ---> 55 var = [k for k, v in oi.data_vars.items() if v.dims == ("time",)][0] 57 obs = oi[var].to_dataframe().drop(["location"], axis=1) # Get observational data 59 # de-tide obs 60 # if not obs[var].dropna().empty | (obs[var].dropna() == obs[var].dropna()[0]).all(): 61 # obs = get_ss(obs, oi.lat.values) 62 # oi[var].values = obs.elev.values IndexError: list index out of range
With the first 6 days of May 2023 we get an exception: