diff --git a/index.html b/index.html index 02001fb..555455a 100644 --- a/index.html +++ b/index.html @@ -47,6 +47,7 @@ diff --git a/stofs2d_stations.html b/stofs2d_stations.html new file mode 100644 index 0000000..d38b7d7 --- /dev/null +++ b/stofs2d_stations.html @@ -0,0 +1,67 @@ + + + + + stofs2d + + + + + + + + + + + +
+ + + + + \ No newline at end of file diff --git a/stofs2d_stations.py b/stofs2d_stations.py new file mode 100644 index 0000000..8f4c994 --- /dev/null +++ b/stofs2d_stations.py @@ -0,0 +1,20 @@ +import xarray as xr +import holoviews as hv +import hvplot.pandas + +ds = xr.open_dataset("/home/panos/Downloads/stofs_2d_glo.t06z.points.cwl.nc") +df = ds[["x", "y", "station_name"]].to_pandas() +df = df.assign(station_name=df.station_name.str.decode("utf-8")) +df = df.assign(is_satellite=df.station_name.str.startswith("UJ").astype(bool)) +plot = df.hvplot.points( + geo=True, + tiles=True, + hover_cols=["x", "y", "station_name", "is_satellite"], + legend=True, + color="is_satellite", + cmap="colorblind", + color_levels=2, + responsive=True, + height=900, +) +hv.save(plot, "stofs2d_stations.html", backend="bokeh")