Output

SawyerEliassenSolver.Output.ConstantOutputVariableType
struct ConstantOutputVariable{O, N} <: AbstractArray{O, N}

A struct to output a constant (time independent) variable.

Fields

  • array

  • dimension_labels

array is the array storing the data to be output. dimension_labels is a tuple of dimension labels. When added to an OutputWriter these labels are used to attach dimension scales (coordinates) to the output variable.

Note

Dimension labels are not required to be associated with a dimension scale. But if they are then the size of the dimension must match.

source
SawyerEliassenSolver.Output.OutputVariableType
struct OutputVariable{T, N, O, A} <: AbstractArray{O, N}

A struct to create output variables.

Fields

  • problem

  • func

  • dimension_labels

  • output_array

  • args

func is a function with signature func(problem::Problem, output_array::AbstractArray{T,N}, args...) that computes the output field in-place in output_array. args are the arguments to func. dimension_labels is a tuple of dimension labels. When added to an OutputWriter these labels are used to attach dimension scales (coordinates) to the output variable.

Note

Dimension labels are not required to be associated with a dimension scale. But if they are then the size of the dimension must match.

source
SawyerEliassenSolver.Output.OutputVariableMethod
OutputVariable(
    problem::Problem{T},
    func::Function,
    dimensions::NamedTuple{S, NTuple{N, Integer}},
    type::Type,
    args
) -> OutputVariable

Create an output variable specifying the dimension labels and sizes in a named tuple.

source
SawyerEliassenSolver.Output.OutputVariableMethod
OutputVariable(
    problem::Problem{T},
    func::Function,
    dimension_labels::NTuple{N, Union{Nothing, Symbol}},
    sizes::NTuple{N, Integer},
    type::Type,
    args
) -> OutputVariable

Create an output variable creating the output array of shape sizes and type type.

source
SawyerEliassenSolver.Output.OutputVariableMethod
OutputVariable(
    problem::Problem{T},
    func::Function,
    dimension_labels::NTuple{N, Union{Nothing, Symbol}},
    sizes::NTuple{N, Integer},
    type::Type
) -> OutputVariable{_A, _B, T, Tuple{}} where {_A, _B, T}
source
SawyerEliassenSolver.Output.OutputVariableMethod
OutputVariable(
    problem::Problem{T},
    func::Function,
    dimension_labels::NTuple{N, Union{Nothing, Symbol}},
    output_array::AbstractArray{O, N}
) -> OutputVariable{_A, _B, _C, Tuple{}} where {_A, _B, _C}

Create an output variable with a function that takes no additional arguments.

source
SawyerEliassenSolver.Output.OutputWriterMethod
OutputWriter(
    problem::Problem{T},
    filepath::String;
    overwrite
) -> OutputWriter{_A, NamedTuple{(:x, :z), var"#s182"}} where {_A, var"#s182"<:Tuple{Union{LinRange{Float32, Int64}, LinRange{Float64, Int64}}, Union{LinRange{Float32, Int64}, LinRange{Float64, Int64}}}}
source
SawyerEliassenSolver.Output.write_attributes!Method
write_attributes!(ow::OutputWriter, attributes...)

Write attributes to the output file. Attributes should be provided as (key,value) or key => value where key can be converted to a string.

Warning

This is just a thin wrapper around HDF5.write_attribute and will error if the value is not compatible with HDF5.

source

OutputVariables