Example #1
0
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.cm as cm
from mpl_toolkits.basemap import Basemap
import math
from mapformat import mapformat

filename = 'vic_hcube_param_stdevs.txt'

m = mapformat()

# Set up the color data
data = np.transpose(np.loadtxt(filename))
lat = data[0] 
lon = data[1]
p1 = data[2] # b_infilt
p2 = data[3] # Ds
p3 = data[4] # Dsmax
p4 = data[5] # Ws
p5 = data[6] # layer2depth
p6 = data[7] # layer3depth
p7 = data[8] # rmin
p8 = data[9] # expt
p9 = data[10] # Ksat

array = np.empty((180,360))
array[:] = np.NAN;

x = np.arange(0.5, 360.5, 1.0)
y = np.arange(-90.5, 89.5, 1.0)
x,y = np.meshgrid(x,y)
from __future__ import division
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
import matplotlib.cm as cm
from mpl_toolkits.basemap import Basemap
from mapformat import mapformat

hydrofile = 'aero_min_revisit_rates.csv'
aerofile = 'aero_coverage_f3.csv'

m = mapformat()

# Set up the color data
data = np.transpose(np.loadtxt(hydrofile, delimiter=','))
lat = data[0] 
lon = data[1]
qsurf = data[2]
sm1 = data[3]

data = np.transpose(np.loadtxt(aerofile, delimiter=','))
a_lat = data[0]
a_lon = data[1]
a_lon[a_lon < 0] += 360 # convert to [0,360] grid
max_revisit = data[2]/60
avg_revisit = data[5]/60
ninety_revisit = data[6]/60

array = np.empty((180,360))
array[:] = np.NAN;