Skip to content

Instantly share code, notes, and snippets.

sudo apt-get install dpkg-dev libcurl4-gnutls-dev
# Download netCDF4 source unpack and cd to directory
wget ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4.2.1.1.zip
unzip netcdf-4.2.1.1.zip
cd netcdf-4.2.1.1
LDFLAGS=-L/usr/local/lib CPPFLAGS=-I/usr/local/include ./configure --enable-netcdf-4 --enable-dap --enable-shared --prefix=/usr/local --disable-doxygen
make -j 2
sudo make install
cd ..
@acrosby
acrosby / hdf5_build
Last active December 17, 2015 09:08
# Make sure g++ compiler is installed for hdf5
sudo apt-get install g++ dpkg-dev
# Download HDF5 source unpack and cd to directory
wget http://www.hdfgroup.org/ftp/HDF5/current/src/hdf5-1.8.10.tar.gz
tar -xzvf hdf5-1.8.10.tar.gz
cd hdf5-1.8.10
./configure --prefix=/usr/local --enable-shared --enable-hl
make -j 2
sudo make install
'''
Only slighted modified from code provided by Laura De Cicco (USGS).
Laura De Cicco, A. Crosby
http://nwisvaws02.er.usgs.gov/ogc-swie/wml2/uv/sos?request=GetObservation&featureID=01446500&offering=UNIT&observedProperty=00060&beginPosition=2013-02-15
'''
from xml.dom import minidom, Node
import datetime
@acrosby
acrosby / rtree_large_test.py
Last active December 9, 2020 15:50
Sample code for python rtree bulk loading of 10,000,000 points and a nearest neighbor query.
from rtree import index
from random import random
from datetime import datetime
timer = datetime.now()
# Create 10,000,000 random numbers between 0 and 1
rands = [random() for i in range(10000000)]
# Function required to bulk load the random points into the index