This file contains 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 numpy as np | |
import matplotlib.pyplot as plt | |
import matplotlib.cm as cm | |
from mpl_toolkits.basemap import Basemap | |
filename = 'vic_error_9p_1K.txt' | |
# Set up the map | |
# lat_ts is the latitude of true scale. | |
# resolution = 'c' means use crude resolution coastlines. |
This file contains 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 numpy as np | |
import matplotlib.pyplot as plt | |
import matplotlib as mpl | |
import matplotlib.cm as cm | |
from mpl_toolkits.basemap import Basemap, shiftgrid | |
from matplotlib.backends import backend_agg as agg # raster backend | |
filename = 'vic_error_9p_1K.txt' | |
# Set up the color data |
This file contains 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
clc; clear all; | |
domain = -0.5:0.005:0.5; | |
[X,Y] = meshgrid(domain,domain); | |
Z = zeros(length(domain), length(domain)); | |
cmap = hot; | |
cmap = flipud(cmap(:, [3 2 1])); | |
outfile = 'aaa.gif'; | |
set(gcf,'renderer','zbuffer'); | |
t_vals = [0:4:200]; |
This file contains 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
function [C] = C_analytical(x,y,t) | |
mdot = 1; % kg/s | |
D = 10^-3; | |
L = 1; | |
outer_term = mdot./(4*pi*t*sqrt(D*D)); | |
exp_sum = 0; | |
for m = -20:20 |
This file contains 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
// Optional settings: | |
// BORG_Debug_on(); | |
// BORG_Algorithm_ms_max_time(0.008); | |
// BORG_Algorithm_output_aerovis(); | |
char runtime[256]; | |
char outputFilename[256]; | |
FILE* outputFile = NULL; | |
BORG_Algorithm_ms_startup(&argc, &argv); |
This file contains 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
clc; clear all; | |
% Plot the feasible space for the Masonry LP | |
% max Z = 140*x1 + 160*x2 | |
% subject to: | |
% 2*x1 + 4*x2 <= 28 | |
% 5*x1 + 5*x2 <= 50 | |
% x1 <= 8 | |
% x2 <= 6 | |
% x1, x2 >= 0 |
This file contains 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
clc; clear all; | |
% Solve the Masonry LP | |
% max Z = 140*x1 + 160*x2 | |
% subject to: | |
% 2*x1 + 4*x2 <= 28 | |
% 5*x1 + 5*x2 <= 50 | |
% x1 <= 8 | |
% x2 <= 6 | |
% x1, x2 >= 0 |
This file contains 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 | |
# This submission will submit 200 jobs in "globs", | |
# Where one glob will not begin until the previous one finishes without errors | |
FILENUMS=$(seq 0 199) | |
MAX_SIMULT=7 # max number of simultaneous jobs | |
GLOBNUM=0 | |
GLOBNUM_PREV=0 | |
DEPEND="" |
This file contains 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 netCDF4 import Dataset | |
import numpy as np | |
import os | |
PATH = '.' | |
LL = np.loadtxt('%s/global_soils_default.txt' % PATH); | |
LL = LL[:,2:4] | |
OBS = np.loadtxt('%s/VIC_GRDC_Monthly_Climatology.txt' % PATH, delimiter=',', skiprows=1) |
This file contains 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 netCDF4 import Dataset | |
import numpy as np | |
import os | |
import math | |
PATH = '.' | |
LL = np.loadtxt('%s/global_soils_default.txt' % PATH); | |
LL = LL[:,2:4] | |
OBS = np.loadtxt('%s/VIC_GRDC_Monthly_Climatology.txt' % PATH, delimiter=',', skiprows=1) |
OlderNewer