Skip to content

Instantly share code, notes, and snippets.

View cbcunc's full-sized avatar

Chris Calloway cbcunc

View GitHub Profile
@cbcunc
cbcunc / iris-on-mavericks.txt
Created April 28, 2014 21:57
Iris on Mavericks
Most of the IRIS installation can be accomplished with brew and pip. This is an install of the *minimum* Iris requirements. I'll work on extensions for Iris next. There are only a few and they are optional for things like Grib ingestion.
1) You will need to make sure that *both* XCode and the standalone XCode Command Line Tools are installed. Both are Homebrew dependencies.
2) brew install python
Brew's python includes pip and setuptools, which is sweet.
3) pip install virtualenv
You'll need to build Iris in a virtualenv as it depends on distutils packages which cannot be pip-uninstalled.
@cbcunc
cbcunc / u2stest.py
Created October 10, 2014 16:41
Sanity check for ugrid2shp. Convert all the NAM output to shapefiles. Wait for something to blow up.
import os
import sys
import multiprocessing
import ugrid2shp
urlformat = "http://opendap.renci.org:1935/thredds/dodsC/daily/nam/%s/nc6b/hatteras.renci.org/rencidaily/namforecast/%s.63.nc"
outformat = "%s_%s"
errformat = "%s_%s.err"
variables = (("swan_HS", "swan_HS",),
("swan_HS_max", "swan_HS_max",),
@cbcunc
cbcunc / shape2raster.ipynb
Last active August 29, 2015 14:09
Shapefile to Raster with OGR and GDAL
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cbcunc
cbcunc / ApproximateDerivatives.ipynb
Created November 24, 2014 20:09
Graph approximate derivatives of f(x) across interval with various delta x.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cbcunc
cbcunc / NewtonsMethod.ipynb
Last active August 29, 2015 14:10
Converge on root of function for a given accuracy and initial guess.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cbcunc
cbcunc / EstimateDefiniteIntegral
Created November 24, 2014 23:58
Estimate the area under the curve using Riemann–Darboux's Method.
{
"metadata": {
"name": "",
"signature": "sha256:25966a5667f39011dd93d3d337860e302b8c68ac708ef3bbe73df838f8cc544f"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
@cbcunc
cbcunc / ugr5_on_OpenDAP_test_server.ipynb
Created December 3, 2014 20:28
Testing the ugr5 function on the OpenDAP test server with test4-ugrid.ncml
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cbcunc
cbcunc / ugr5_on_ASGS_server.ipynb
Created December 3, 2014 20:29
Testing the ugr5 function on the ASGS server with test4-ugrid.ncml
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cbcunc
cbcunc / ugrid_test_01_nc_examination.ipynb
Created December 3, 2014 22:12
Examine ugrid_test_01.nc
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cbcunc
cbcunc / netCDF4-ugr5-test.ipynb
Last active August 29, 2015 14:11
Test netCDF4 with ugr5
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.