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
update water-mass matrix to agree with new boundaries in γ
function watermassmatrix(m::Union{NamedTuple,Vector}, γ::Grid)
Produce water-mass matrix from mass fractions and grid.
Arguments
m::NamedTuple: collection ofMassFractionsγ::TMI.Grid
Output
A: sparse water-mass matrix
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
function circulationmatrix(file,A,γ)
Read and assemble the circulation matrix from the efficient storage of A and F₀ variables.Arguments
file: TMI MATLAB file nameA: TMI water-mass matrixγ: TMI grid
Output
L: circulation matrix in xyz format
TMI.boundarymatrix — Function
function boundarymatrix(file,γ)
Read and assemble the boundary matrix from MATLAB.
Transfer to updated x,y,z versionArguments
file: TMI MATLAB file nameγ: TMI grid
Output
B: boundary condition matrix
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 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 fieldTMI.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
TMI.config2nc — Function
Save TMI configuration to NetCDF format for non-proprietary access
TMI.griddicts — Function
Save grid dictionaries of attributes for writing to NetCDF file
TMI.fieldsatts — Function
All variable names and attributes. Useful for writing NetCDF files.
TMI.optim2nc — Function
Save optimization parameters to NetCDF file)
Future considerations: split into 2 functions
- read from mat
- save to nc
TMI.circulationmatrix2nc — Function
Save circulation matrix L to NetCDF file.
TMI.boundarymatrix2nc — Function
Save boundary matrix for transient model to NetCDF file
TMI.grid2nc — Function
Put grid properties (Cartesian index) into NetCDF file
TMI.cartesianindex — Function
function cartesianindex(wet)
Read and assemble the grid coordinates
according to a 3D tracer in x,y,z orderArguments
wet: BitArray logical mask for wet points
Output
I: 3D Cartesian indices
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