Skip to content

Instantly share code, notes, and snippets.

View darothen's full-sized avatar

Daniel Rothenberg darothen

View GitHub Profile
@darothen
darothen / cartopy_wrap_example.ipynb
Last active April 25, 2023 11:55
Example of adding cyclic points to DataArrays for plotting with Cartopy
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@darothen
darothen / WRF_example.ipynb
Created October 14, 2015 15:11
Simple WRF analysis/plotting examples
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@darothen
darothen / dataarray_to_cube.py
Created October 12, 2015 23:58
Convert xray.Dataarray to iris.Cube
def dataset_to_cube(ds, field):
""" Construct an iris Cube from a field of a given
xray DataSet. """
raise NotImplementedError("`iris` deprecated for Python 3")
dsf = ds[field]
## Attach coordinates to the cube, using full dataset for lookup
# dim_coords_and_dims = []
@darothen
darothen / xray_dask_test.ipynb
Created July 10, 2015 03:22
xray + dask random data test
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@darothen
darothen / pandas_groupby.ipynb
Created July 7, 2015 13:55
Simple reproduction of `aggr` examples using Pandas
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@darothen
darothen / SST_data.ipynb
Created July 2, 2015 00:59
Plotting HYCOM SST data in Python
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@darothen
darothen / README.md
Last active August 29, 2015 14:23
mode_sunburst

Sunburst visualization of modal importance aerosol activation experiment results.

@darothen
darothen / ray-numbapro-gpu.py
Last active November 28, 2019 17:59
Port of ray tracer from Chapter 6 of "CUDA by Example" to NumbaPro-CUDA
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
SPHERE SCENE RAY TRACER
This is a basic port of the simple ray tracer from Chapter 6 of
"CUDA by Example", by Sanders and Kandrot. With a few exceptions
(notably, the `hit()` method is not bound to a struct containing
sphere data and we use a numpy record array).