Configuration

Reading input files and configuration for TMI.

TMI.config_from_ncFunction
function config_from_nc(TMIversion; compute_lu = true)
Configure TMI environment from NetCDF input file.

Arguments

  • TMIversion: TMI version for water-mass/circulation model

Output

  • A: TMI steady-state water-mass matrix
  • Alu: LU decomposition of A
  • γ: TMI grid properties
  • TMIfile: TMI file name
source
TMI.watermassmatrixFunction
function watermassmatrix(file)
Read and assemble the water-mass matrix.

Arguments

  • file: TMI NetCDF or MATLAB file name

Output

  • A: water-mass matrix
source

function watermassmatrix(m::Union{NamedTuple,Vector}, γ::Grid)

Produce water-mass matrix from mass fractions and grid.

Arguments

  • m::NamedTuple: collection of MassFractions
  • γ::TMI.Grid

Output

  • A: sparse water-mass matrix
source
TMI.matrix_zyx2xyzFunction
    function matrix_zyx2xyz(TMIfile,Azyx,γ)

Transfer zyx format water-mass matrix A to xyz format

Arguments

  • Azyx: water-mass matrix in zyx format
  • γ: TMI grid

Output

  • Axyz: water-mass matrix in xyz format
source
TMI.circulationmatrixFunction
function circulationmatrix(file,γ)
Read and assemble the circulation matrix from MATLAB.
Transfer to updated x,y,z version

Arguments

  • file: TMI MATLAB file name
  • γ: TMI grid

Output

  • L: circulation matrix in xyz format
source
function circulationmatrix(file,A,γ)
Read and assemble the circulation matrix from the efficient storage of A and F₀ variables.

Arguments

  • file: TMI MATLAB file name
  • A: TMI water-mass matrix
  • γ: TMI grid

Output

  • L: circulation matrix in xyz format
source
TMI.boundarymatrixFunction
    function boundarymatrix(file,γ)
Read and assemble the boundary matrix from MATLAB.
Transfer to updated x,y,z version

Arguments

  • file: TMI MATLAB file name
  • γ: TMI grid

Output

  • B: boundary condition matrix
source
TMI.updatelinearindexFunction
function updatelinearindex(izyx,Izyx,R)
Linear index translated from z,y,x to x,y,z accounting

get Izyx Cartesian index stored from legacy MATLAB code

Arguments

  • izyx: index of interest in z,y,x accounting
  • Izyx: wet Cartesian Index for z,y,x
  • R: Linear indices for x,y,z

Output

  • ixyz: index of interest in x,y,z accounting
source
TMI.surfaceregionFunction
 function surfaceregion(TMIversion::String,region::String,γ::Grid)::BoundaryCondition

Read an oceanographically-relevant surface region from NetCDF file. (Also could be read from mat file.)
Return a BoundaryCondition
source
 function surfaceregion(TMIversion::String,region::String,γ::Grid)::BoundaryCondition

Read an oceanographically-relevant surface region from NetCDF file. (Also could be read from mat file.)

Return a BoundaryCondition

Version 1: operates on a 2D Float field
source
TMI.ncurlFunction
function ncurl(TMIversion)
placeholder function to give location (URL) of NetCDF Google Drive input
in the future, consider a struct or Dict that describes all TMI versions.

Arguments

  • TMIversion: version of TMI water-mass/circulation model

Output

  • url: location (URL) for download
source
TMI.maturlFunction
function maturl(TMIversion)
Find *mat file here.
placeholder function to give location (URL) of Google Drive input
in the future, consider a struct or Dict that describes all TMI versions.

Arguments

  • TMIversion: version of TMI water-mass/circulation model

Output

  • url: location (URL) for download
source
TMI.config2ncFunction

Save TMI configuration to NetCDF format for non-proprietary access

source
TMI.griddictsFunction

Save grid dictionaries of attributes for writing to NetCDF file

source
TMI.fieldsattsFunction

All variable names and attributes. Useful for writing NetCDF files.

source
Missing docstring.

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

Missing docstring.

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

TMI.optim2ncFunction

Save optimization parameters to NetCDF file)

Future considerations: split into 2 functions

  1. read from mat
  2. save to nc
source
TMI.cartesianindexFunction
function cartesianindex(wet)
Read and assemble the grid coordinates
according to a 3D tracer in x,y,z order

Arguments

  • wet: BitArray logical mask for wet points

Output

  • I: 3D Cartesian indices
source
function cartesianindex(file)
Read and assemble the grid coordinates
according to the legacy MATLAB code (z,y,x order).

Arguments

  • file: TMI NetCDF file name

Output

  • I: TMI Cartesian index for wet points
source
Missing docstring.

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