Commit c1418f6f authored by CEVAER's avatar CEVAER
Browse files

Use only sat acq time to find through api in plots_from_netcdf.py

parent 5add4a3d
......@@ -56,7 +56,11 @@ if __name__ == "__main__":
ds = xr.open_dataset(f)
logger.info(f"Processing {f}...")
source_sat = ds.attrs["Source satellite file"].replace("_sw", "_ll_gd")
df = pd.read_csv(f"https://cyclobs.ifremer.fr/app/api/getData?include_cols=all&filename={source_sat}")
id_sat = "-".join(source_sat.split("-")[4:6])
print(id_sat)
api_req = f"https://cyclobs.ifremer.fr/app/api/getData?include_cols=all&filename={id_sat}"
logger.info(f"API req : {api_req}")
df = pd.read_csv(api_req)
s_file = pathurl.toPath(df.iloc[0]["data_url"], schema="dmz")
sat_date = owi.getDateFromFname(os.path.basename(s_file))
track_gdf = track_data(ds.attrs["Storm ID"], sat_date)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment