This file contains hidden or 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
target_values = levels=np.arange(24.2,28, 0.2) |
This file contains hidden or 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
so_sigma = grid.transform( | |
ds.so, | |
'Z', | |
target_values, | |
target_data=ds.sigma_0 | |
) | |
so_sigma |
This file contains hidden or 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
# Lets do the same thing with cfcs and package them into a dataset | |
cfc_sigma = grid.transform( | |
ds.cfc11, | |
'Z', | |
target_values, | |
target_data=ds.sigma_0) | |
ds_sigma = xr.Dataset({'cfc11':cfc_sigma, 'so':so_sigma}) | |
ds_sigma |
This file contains hidden or 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
ds_sigma_section = ds_sigma.sel( | |
time='2010-01', | |
y=slice(-90,10) | |
).interp(x=230).squeeze() | |
fig, axarr = plt.subplots(nrows=2, figsize=[10,8], sharex=True) | |
for ax, var, cmap in zip( | |
axarr.flat, | |
['so', 'cfc11'], | |
[cmo.haline, cmo.matter] |
This file contains hidden or 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
ds_sigma_map = ds_sigma.sel( | |
time='2000-01', | |
sigma_0=26.6, | |
method='nearest' | |
).sel(y=slice(-90,0)).squeeze() | |
import cartopy.crs as ccrs | |
import matplotlib.path as mpath | |
import cartopy.feature as cfeature |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file has been truncated, but you can view the full file.
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> |
This file has been truncated, but you can view the full file.
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> |