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
#!/bin/bash | |
declare -a arr=("professional" "phd" "presentations" "proposals") | |
for d in "${arr[@]}" | |
do | |
rsync -raz --progress --exclude=".git*" --delete ./"$d"/* Dropbox/jdh/"$d" | |
done | |
chown -R Administrators Dropbox/jdh/* |
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
from SALib.sample import saltelli | |
from string import Template | |
# Generate samples for sensitivity analysis, and put them into an input file template | |
# This will generate N(2D+2) copies of the template with the values inserted | |
# The use case is for older models (like F77) where the input file something like below. | |
# Put dollar-sign variables where you want to replace with numbers, like so: | |
# | |
#C IWQVLIM = option for velocity limitation of macroalgae growth | |
#C = 0, macroalgae growth is not limited by stream velocity |
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
from __future__ import division | |
import numpy as np | |
from scipy.optimize import brentq as root | |
from borg import * | |
nvars = 100 # decision variables: pollution for each timestep | |
nobjs = 4 | |
nconstr = 1 | |
nsamples = 100 # 100 scenarios of natural inflows | |
b = 0.42 # decay rate for P in lake (0.42 = irreversible) |
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
import glob | |
kw = ['climate', 'decision theory', 'dynamic', 'economics', 'game theory', 'heuristic', 'hydrology', | |
'integer', 'linear', 'model', 'nonlinear', 'policy', 'probability', 'statistics', | |
'stochastic','quality'] | |
files = glob.glob('*.txt') | |
courses_including = {} | |
avg_count = {} |
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
from __future__ import division | |
from osgeo import gdal | |
from geopy.geocoders import Nominatim | |
def get_value_at_point(rasterfile, pos): | |
gdata = gdal.Open(rasterfile) | |
gt = gdata.GetGeoTransform() | |
data = gdata.ReadAsArray().astype(np.float) | |
gdata = None | |
x = int((pos[0] - gt[0])/gt[1]) |
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
from osgeo import gdal | |
import matplotlib.pyplot as plt | |
import numpy as np | |
from mpl_toolkits.basemap import Basemap | |
# Plotting 2070 projected August (8) precip from worldclim | |
gdata = gdal.Open("D:/jon/datasets/worldclim/future/pr/gf45pr70_usa/gf45pr708.tif") | |
geo = gdata.GetGeoTransform() | |
data = gdata.ReadAsArray() |
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
#!/bin/bash | |
DIR=current | |
TYPE=tmean | |
RES=5m | |
pwd | |
for MONTH in {1..12} | |
do | |
gdalwarp -cutline states_shape/states.shp \ |
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
#include <mpi.h> | |
#include <stdio.h> | |
int main (argc, argv) | |
int argc; | |
char *argv[]; | |
{ | |
int rank,size; | |
char cmd[1000]; | |
MPI_Init (&argc, &argv); /* starts MPI */ |
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
for /F "delims===" %i in ('pip freeze -l') do pip install -U %i | |
# from http://stackoverflow.com/questions/2720014/upgrading-all-packages-with-pip |
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
Water Resources Research (WRR) | |
http://onlinelibrary.wiley.com/rss/journal/10.1002/(ISSN)1944-7973 | |
Journal of Water Resources Planning & Management (JWRPM) | |
http://ascelibrary.org/action/showFeed?type=etoc&feed=rss&jc=jwrmd5 | |
Environmental Modelling & Software (EMS) | |
http://rss.sciencedirect.com/publication/science/13648152 | |
Advances in Water Resources (AWR) |