Grid

Handling the grid for TMI.

Missing docstring.

Missing docstring for TMI.Grid. Check Documenter's build log for details.

Missing docstring.

Missing docstring for TMI.Field. Check Documenter's build log for details.

Missing docstring.

Missing docstring for TMI.cartesianindex. Check Documenter's build log for details.

TMI.linearindexFunction
function linearindex(wet)
Read and assemble the grid coordinates.

Arguments

  • wet: 3D mask for wet points

Output

  • R: array of linear indices, but not a LinearIndices type
source
Missing docstring.

Missing docstring for TMI.gridprops. Check Documenter's build log for details.

Missing docstring.

Missing docstring for TMI.matrix_zyx2xyz. Check Documenter's build log for details.

Missing docstring.

Missing docstring for TMI.updatelinearindex. Check Documenter's build log for details.

Missing docstring.

Missing docstring for TMI.layerthickness. Check Documenter's build log for details.

Missing docstring.

Missing docstring for TMI.zonalgriddist. Check Documenter's build log for details.

TMI.surfacepatchFunction
function surfacepatch
Make a surface boundary condition
with a rectangular patch

Arguments

  • lonbox: longitudes of box edges
  • latbox: latitudes of box edges
  • γ: TMI.grid

Output

  • d: vector that describes surface patch
source
TMI.depthindexFunction
function depthindex(I) 
Get the k-index (depth level) from the Cartesian index
source
TMI.lonindexFunction
function lonindex(I) 
Get the i-index (lon index) from the Cartesian index
source
TMI.latindexFunction
function latindex(I) 
Get the j-index (latitude index) from the Cartesian index
source
Missing docstring.

Missing docstring for TMI.findindex. Check Documenter's build log for details.

TMI.surfaceindexFunction
function surfaceindex(I) 
Get the vector-index where depth level == 1 and it is ocean.
source
TMI.northindexFunction
function northindex(I) 
Get the vector index on the northern open boundary
source
TMI.eastindexFunction
function eastindex(I) 
Get the vector index on the northern open boundary
source
TMI.southindexFunction
function southindex(I) 
Get the vector-index on the southern open boundary
source
TMI.westindexFunction
function westindex(I) 
Get the vector index on the western open boundary
source
TMI.horizontaldistanceFunction
function horizontaldistance(loc,γ)

Arguments

  • loc: 3-tuple of lon,lat,depth location
  • γ: TMI.grid

Output

  • hordist: horizontal distance to nearest tracer grid points
source
TMI.interpindexFunction

function interpindex(loc,γ) Weights for linear interpolation. The derivative of linear interpolation is needed in sensitivity studies. ReverseDiff.jl could find this quantity automatically. Instead we dig into the Interpolations.jl package to find the weights that are effectively the partial derivatives of the function.

Arguments

  • c: a temporary tracer field, would be nice to make it unnecessary
  • loc: (lon,lat,depth) tuple of a location of interest
  • γ: TMI grid

Output

  • δ: weights on a 3D tracer field grid
source
TMI.shiftlocFunction

function shiftloc(loc)

sometimes loc longitudes are outside of grid due to different conventions
assumption: 360° shift is enough to get back on grid
source
TMI.interpweightsFunction

function interpweights(loc,γ) Weights for linear interpolation. The derivative of linear interpolation is needed in sensitivity studies. ReverseDiff.jl could find this quantity automatically. Instead we dig into the Interpolations.jl package to find the weights that are effectively the partial derivatives of the function.

Arguments

  • loc: (lon,lat,depth) tuple of a location of interest
  • γ: TMI grid

Output

  • δ: weights on a 3D tracer field grid
source