Output
SawyerEliassenSolver.Output — ModuleSawyerEliassenSolver.Output.ConstantOutputVariable — Typestruct ConstantOutputVariable{O, N} <: AbstractArray{O, N}A struct to output a constant (time independent) variable.
Fields
arraydimension_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.
SawyerEliassenSolver.Output.OutputVariable — Typestruct OutputVariable{T, N, O, A} <: AbstractArray{O, N}A struct to create output variables.
Fields
problemfuncdimension_labelsoutput_arrayargs
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.
SawyerEliassenSolver.Output.OutputVariable — MethodOutputVariable(
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.
SawyerEliassenSolver.Output.OutputVariable — MethodOutputVariable(
problem::Problem{T},
func::Function,
dimensions::NamedTuple{S, NTuple{N, Integer}},
type::Type
) -> OutputVariable{_A, _B, T, Tuple{}} where {_A, _B, T}
SawyerEliassenSolver.Output.OutputVariable — MethodOutputVariable(
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.
SawyerEliassenSolver.Output.OutputVariable — MethodOutputVariable(
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}
SawyerEliassenSolver.Output.OutputVariable — MethodOutputVariable(
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.
SawyerEliassenSolver.Output.OutputWriter — Typestruct OutputWriter{T, D}Struct for writing output to an HDF5 file.
SawyerEliassenSolver.Output.OutputWriter — MethodOutputWriter(
problem::Problem{T},
filepath::String,
coordinates::NamedTuple;
overwrite
) -> OutputWriter{_A, NamedTuple{names, T}} where {_A, names, T<:Tuple}
SawyerEliassenSolver.Output.OutputWriter — MethodOutputWriter(
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}}}}
SawyerEliassenSolver.Output.add_output_variables! — Methodadd_output_variables!(
output_writer::OutputWriter;
kwargs...
)
Add OutputVariables to the OutputWriter. Excepts keyword arguments where the key is the name of the variable and the value an OutputVariable.
SawyerEliassenSolver.Output.compute! — Methodcompute!(output_variable::OutputVariable) -> Any
Compute the output field in-place in output_variable.output_array.
SawyerEliassenSolver.Output.integrate_periodic_gradients — Methodintegrate_periodic_gradients(
x_derivative::XZVariable,
z_derivative::XZVariable;
out,
FZ_working_space
) -> XZVariable
Integrate periodic gradients. out is the output variable and can be the same as x_derivative or z_derivative.
SawyerEliassenSolver.Output.write! — Methodwrite!(ow::OutputWriter)
Compute and write the output variables to the output file.
SawyerEliassenSolver.Output.write_Bx! — Methodwrite_Bx!(output_writer::OutputWriter; name)
Write the current background $B_x$ to the output writer.
SawyerEliassenSolver.Output.write_Bz! — Methodwrite_Bz!(output_writer::OutputWriter; name)
Write the current background $B_z$ to the output writer.
SawyerEliassenSolver.Output.write_Vx! — Methodwrite_Vx!(output_writer::OutputWriter; name)
Write the current background $V_x$ to the output writer.
SawyerEliassenSolver.Output.write_attributes! — Methodwrite_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.
This is just a thin wrapper around HDF5.write_attribute and will error if the value is not compatible with HDF5.
SawyerEliassenSolver.Output.write_attributes! — Methodwrite_attributes!(ow::OutputWriter; attributes...)
Write attributes to the output file providing the attributes as keyword arguments.
SawyerEliassenSolver.Output.write_background_buoyancy! — Methodwrite_background_buoyancy!(ow::OutputWriter; name)
Integrate the background buoyancy gradients and write to output writer.
SawyerEliassenSolver.Output.write_background_flow! — Methodwrite_background_flow!(ow::OutputWriter; f, Vx, Bx, Bz)
Write the background flow to the output writer.
SawyerEliassenSolver.Output.write_background_velocity! — Methodwrite_background_velocity!(ow::OutputWriter; name)
Integrate the background velocity gradients and write to output writer.
SawyerEliassenSolver.Output.write_constant_array! — Methodwrite_constant_array!(
output_writer::OutputWriter,
array::AbstractArray{T, N},
name::String
)
write_constant_array!(
output_writer::OutputWriter,
array::AbstractArray{T, N},
name::String,
dimension_labels::NTuple{N, Union{Nothing, Symbol}}
)
Create a ConstantOutputVariable and write it to the file created by an OutputWriter in one go.
SawyerEliassenSolver.Output.write_f! — Methodwrite_f!(output_writer::OutputWriter; name)
Write the background $f$ as an attribute to the output writer.
OutputVariables
SawyerEliassenSolver.Output.OutputVariables — ModuleImplementation of common output variables for the Sawyer-Eliassen solver.
Exports
SawyerEliassenSolver.Output.OutputVariables.b — Methodb(
problem::Problem
) -> OutputVariable{_A, 2, _B, Tuple{}} where {_A, _B}
SawyerEliassenSolver.Output.OutputVariables.p — Methodp(
problem::Problem
) -> OutputVariable{_A, 2, _B, A} where {_A, _B, A<:Tuple{FZVariable}}
SawyerEliassenSolver.Output.OutputVariables.u — Methodu(
problem::Problem
) -> OutputVariable{_A, 2, _B, Tuple{}} where {_A, _B}
SawyerEliassenSolver.Output.OutputVariables.v — Methodv(
problem::Problem
) -> OutputVariable{_A, 2, _B, Tuple{}} where {_A, _B}
SawyerEliassenSolver.Output.OutputVariables.w — Methodw(
problem::Problem
) -> OutputVariable{_A, 2, _B, Tuple{}} where {_A, _B}
SawyerEliassenSolver.Output.OutputVariables.Ψ — MethodΨ(
problem::Problem
) -> OutputVariable{_A, 2, _B, Tuple{}} where {_A, _B}
The streamfunction Ψ.
SawyerEliassenSolver.Output.OutputVariables.ζ — Methodζ(
problem::Problem
) -> OutputVariable{_A, 2, _B, Tuple{}} where {_A, _B}
The vorticity ζ.
SawyerEliassenSolver.Output.OutputVariables.∂u∂x — Method∂u∂x(
problem::Problem
) -> OutputVariable{_A, 2, _B, Tuple{}} where {_A, _B}
SawyerEliassenSolver.Output.OutputVariables.∂u∂z — Method∂u∂z(
problem::Problem
) -> OutputVariable{_A, 2, _B, Tuple{}} where {_A, _B}
SawyerEliassenSolver.Output.OutputVariables.∂w∂x — Method∂w∂x(
problem::Problem
) -> OutputVariable{_A, 2, _B, Tuple{}} where {_A, _B}
SawyerEliassenSolver.Output.OutputVariables.∂w∂z — Method∂w∂z(
problem::Problem
) -> OutputVariable{_A, 2, _B, Tuple{}} where {_A, _B}
SawyerEliassenSolver.Output.OutputVariables.∂²u∂x² — Method∂²u∂x²(
problem::Problem
) -> OutputVariable{_A, 2, _B, Tuple{}} where {_A, _B}
SawyerEliassenSolver.Output.OutputVariables.∂²u∂x∂z — Method∂²u∂x∂z(
problem::Problem
) -> OutputVariable{_A, 2, _B, Tuple{}} where {_A, _B}
SawyerEliassenSolver.Output.OutputVariables.∂²u∂z² — Method∂²u∂z²(
problem::Problem
) -> OutputVariable{_A, 2, _B, Tuple{}} where {_A, _B}
SawyerEliassenSolver.Output.OutputVariables.∂²w∂x² — Method∂²w∂x²(
problem::Problem
) -> OutputVariable{_A, 2, _B, Tuple{}} where {_A, _B}
SawyerEliassenSolver.Output.OutputVariables.∂²w∂x∂z — Method∂²w∂x∂z(
problem::Problem
) -> OutputVariable{_A, 2, _B, Tuple{}} where {_A, _B}
SawyerEliassenSolver.Output.OutputVariables.∂²w∂z² — Method∂²w∂z²(
problem::Problem
) -> OutputVariable{_A, 2, _B, Tuple{}} where {_A, _B}