[1]:
import earthkit.data
import earthkit.plots
[2]:
data = earthkit.data.from_source(
"url",
"https://get.ecmwf.int/repository/test-data/metview/gallery/madis-maritime.nc",
)
[3]:
style = earthkit.plots.styles.Style(
units="celsius",
colors="Spectral_r",
levels=range(0, 30, 2),
extend="both"
)
[6]:
my_map = earthkit.plots.Map(domain=[-145, -70, 10, 75])
my_map.scatter(data.to_xarray(), x="longitude", y="latitude", z="temperature", style=style, source_units="K")
my_map.ocean(zorder=0, color="lightgrey")
my_map.countries(zorder=0, facecolor="grey", edgecolor="goldenrod")
my_map.gridlines()
my_map.legend(location="bottom")
my_map.title("Marine observations of {variable_name} - {cdlDate.parse_time:%-d %B %Y}")
my_map.show()