Skip to content

Instantly share code, notes, and snippets.

View jbusecke's full-sized avatar

Julius Busecke jbusecke

View GitHub Profile
target_values = levels=np.arange(24.2,28, 0.2)
so_sigma = grid.transform(
ds.so,
'Z',
target_values,
target_data=ds.sigma_0
)
so_sigma
# 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
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]
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.
@jbusecke
jbusecke / tc_xmovie_parallel_test.ipynb
Created March 10, 2021 15:44
Testing tomchors PR for xmovie
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jbusecke
jbusecke / hvplot_test.ipynb
Created March 25, 2021 17:34
Playing with hvplot
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.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
This file has been truncated, but you can view the full file.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">