Configuration

Reading input files and configuration for TMI.

TMI.watermassmatrix — Function
function watermassmatrix(file)
Read and assemble the water-mass matrix.

Arguments

  • file: TMI NetCDF or MATLAB file name

Output

  • A: water-mass matrix
source

update water-mass matrix to agree with new boundaries in γ

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.circulationmatrix — Function
function circulationmatrix(file,γ)
Read and assemble the circulation matrix from NetCDF.

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.boundarymatrix — Function
    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.surfaceregion — Function
 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.ncurl — Function
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.config2nc — Function

Save TMI configuration to NetCDF format for non-proprietary access

source
TMI.griddicts — Function

Save grid dictionaries of attributes for writing to NetCDF file

source
TMI.fieldsatts — Function

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

source
TMI.optim2nc — Function

Save optimization parameters to NetCDF file)

Future considerations: split into 2 functions

  1. read from mat
  2. save to nc
source
TMI.cartesianindex — Function
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