Delft3d revision 5.01.00.2163 setup up on Ubuntu 12.04 (Prescise Pangolin).
Inspired by:
syntax on | |
filetype indent plugin on | |
set tabstop=8 expandtab shiftwidth=4 softtabstop=4 | |
colorscheme torte | |
set guifont=Consolas:h14 | |
set bs=2 | |
set ruler | |
set modeline | |
set ls=2 | |
set nu |
set tabstop=8 expandtab shiftwidth=4 softtabstop=4 | |
set guifont=Consolas:h14 | |
set bs=2 | |
set ruler | |
set modeline | |
set ls=2 | |
set nu | |
set nocompatible |
Delft3d revision 5.01.00.2163 setup up on Ubuntu 12.04 (Prescise Pangolin).
Inspired by:
alias ll='ls -alF --color=auto' | |
alias la='ls -A --color=auto' | |
alias l='ls -CF --color=auto' | |
alias lt='ls -alFt --color=auto' | |
alias vi=vim | |
al() { command ls -al "$@" | less ; } | |
lh() {ls -lt $1|head;} | |
EDITOR=vim |
unzip_his() { for line in $(unzip -l $1 \ | |
| grep his \ | |
| awk '{print $4}'); | |
do | |
echo $1 $line | |
unzip -p $1 $line > $(echo $line | sed -re 's/^.+\///'); | |
done | |
} | |
for zip in "$@" |
As part of the HebMarine project a number of scripts were developed for processing the data recieved from the Datawell Waverider buoys and latterly the Nortek AWAC ADCPs.
A number of approaches were taken with the various data outputs from the buoys. Visual representations of 3 minutely spectral data took place every half hour after the sync had taken place with the recieving station. This produced a polar contour plot for each buoy based on the direction, power spectral density, spread and skew. See Spectral Polar Plot repository and accompanying plot_spectra.py. The colorbar represents power spectral density (m2/Hz), the peak value on the plot can deviate from the max psd in the spectral file due to a hard to fit surface. ![example plot](https://b
import pandas as pd | |
file_name = 'Bragar_HebMarine2$}2012-01-18T22h46Z.spt' | |
def calc_sig_wave_height(file_name): | |
max_psd = pd.read_csv(file_name, skiprows=range(12,200)).values[3][0] | |
spt_freq = pd.read_csv(file_name, skiprows=13, names=['frequency','psd','direction','spread','skew','kurtosis']) | |
psd = spt_freq.psd * max_psd | |
calc_sig_wave_height = 4 * np.sqrt(0.5 * 0.005 * ( psd[0] + psd[len(psd)-1] + 2 * psd[1:-1].sum())) | |
#sig_wave_height = pd.read_csv(file_name, skiprows=range(12,200)).values[1][0] |
import math | |
def decibars_to_metres(latitude, pressure): | |
x = (math.sin(latitude/ 57.29578))**2 | |
g = 9.780318 * ( 1.0 + ( 5.2788*(10**-3) + (2.36*(10**-5)) * x) * x ) + \ | |
(1.092 * (10**-6) ) * pressure | |
return (((-1.82*(10**-15) * pressure + 2.279*(10**-10) ) * \ | |
pressure - 2.2512*(10**-5) * pressure + 9.72659) * pressure) / g |
# -*- coding: utf-8 -*- | |
""" | |
Created on Wed Oct 09 09:58:44 2013 | |
Read text files for MiniCTD exported from Valeport Datalog Express Scroll | |
Display, writes Excel xlsx and pickle file, creates pickle of main DataFrame | |
with another DataFrame as metadata attribute | |
@author: James Morrison | |
""" |
wget http://www.mpich.org/static/downloads/1.4.1/mpich2-1.4.1.tar.gz | |
tar -xvf mpich2-1.4.1.tar.gz | |
cd mpich2-1.4.1/ | |
sudo ./configure CFLAGS=-fPIC FFLAGS=-fPIC FC=gfortran --enable-shared --enable-lib-depend --prefix=/mirror/mpich2 | |
sudo make && sudo make install | |
sudo apt-get install gfortran | |
alias f90='gfortran' | |
cd work | |
sed -i s/#compiler=gnu/compiler=gnu/ cmplrflags.mk |