Created
December 11, 2024 22:40
-
-
Save rabernat/08f12863696051b6ab219e35a37a1ea8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import xarray as xr | |
url = "https://www.ncei.noaa.gov/thredds-ocean/dodsC/woa23/DATA/temperature/netcdf/decav/1.00/woa23_decav_t16_01.nc" | |
ds = xr.open_dataset(url, decode_times=False) | |
t_diff = ds.t_an - ds.t_an.isel(depth=0) | |
t_diff.sel(lat=0, method="nearest").plot(x="lon", ylim=(5000, 0), vmax=0, vmin=-25) | |
t_diff.sel(lat=0, method="nearest").squeeze().plot.contour(levels=[-22], ylim=(5000, 0), colors='w') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment