tz-axis for ocean is 0 at sea surface and points upwards - Granular.jl - Julia … | |
git clone git://src.adamsgaard.dk/Granular.jl | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 67a484aedb7d2a0ba47d653da95ebfe16ae12da5 | |
parent 7b7e72552aeb8f96752b21c652f97c0e5b46af30 | |
Author: Anders Damsgaard <[email protected]> | |
Date: Fri, 28 Apr 2017 13:52:27 -0400 | |
z-axis for ocean is 0 at sea surface and points upwards | |
Diffstat: | |
M src/ocean.jl | 6 +++--- | |
1 file changed, 3 insertions(+), 3 deletions(-) | |
--- | |
diff --git a/src/ocean.jl b/src/ocean.jl | |
t@@ -210,7 +210,7 @@ one 4-th dimension matrix per `time` step. | |
""" | |
function createRegularOceanGrid(n::Array{Int, 1}, | |
L::Array{float, 1}; | |
- origo::Array{float, 1} = zeros(3), | |
+ origo::Array{float, 1} = zeros(2), | |
time::Array{float, 1} = zeros(1), | |
name::String = "unnamed") | |
t@@ -221,8 +221,8 @@ function createRegularOceanGrid(n::Array{Int, 1}, | |
xh = repmat(linspace(origo[1] + .5*dx[1], L[1] - .5*dx[1], n[1]), 1, n[2]) | |
yh = repmat(linspace(origo[2] + .5*dx[2], L[2] - .5*dx[2], n[2])', n[1], 1) | |
- zl = linspace(origo[3] + .5*dx[3], L[3] - .5*dx[3], n[3]) | |
- zi = linspace(origo[3], L[3], n[3] + 1) | |
+ zl = linspace(-L[3] + .5*dx[3], -.5*dx[3], n[3]) | |
+ zi = linspace(-L[3], 0., n[3] + 1) | |
u = zeros(n[1] + 1, n[2] + 1, n[3], length(time)) | |
v = zeros(n[1] + 1, n[2] + 1, n[3], length(time)) |