InputOutput

This module provides types and utilities for reading input files (i.e. parameters and forcings) as well as saving model outputs.

CryoGrid.InputOutput.ConstantForcingType
  ConstantForcing{unit,T} <: Forcing{unit,T}

Simple Forcing type that just returns a constant value. This type is primarily intended for writing tests but could still be used in applications if necessary.

CryoGrid.InputOutput.CryoGridOutputType
CryoGridOutput{TSol}

Helper type that stores the raw output from a CryoGrid run along with DimArray views of all logged variables. CryoGridOutput overrides Base.getproperty to allow for direct dot-syntax access of state variables. For example, if your model has a grid variable named T, out.T returns a DimArray with indexed time and depth axes. For OrdinaryDiffEq.jl outputs, the ODESolution can be accessed via out.sol, or for convenience, the continuous solution at time t can be computed via out(t) which is equivalent to withaxes(out.sol(t)).

CryoGrid.InputOutput.CryoGridOutputMethod
CryoGridOutput(sol::TSol, tspan::NTuple{2,Float64}=(-Inf,Inf)) where {TSol<:SciMLBase.AbstractODESolution}

Constructs a CryoGridOutput from the given ODESolution. Optional argument tspan restricts the time span of the output.

CryoGrid.InputOutput.CryoGridParamsType
CryoGridParams{T,TM} <: DenseArray{T,1}

Wraps a ModelParameters.Model parameter handler for CryoGrid types. It is recommended not to use this type directly in math or linear algebra operations but rather to use Base.values to obtain a normal array of parameter values.

CryoGrid.InputOutput.CryoGridParamsMethod
CryoGridParams(obj)

Constructs a modelParameters.Model wrapped with CryoGridParams from obj. If full_metadata is true, additonal fields for nested Parameterization types will be added.

CryoGrid.InputOutput.ForcingFormatType

Represents an externally specified format for forcing inputs. IO functions should dispatch on specific types T<:ForcingFormat that they implement.

CryoGrid.InputOutput.TransformedForcingType
  TransformedForcing(transformed_unit,orig_unit,TF,T,TO<:Forcing{orig_unit,T}) <: Forcing{transformed_unit,T}

Wraps another Forcing and applies an arbitrary transformation f when evaluated. The transformed unit can either be automatically determined on construction or specified directly.

CryoGrid.InputOutput.loadforcingsMethod
loadforcings(filename::String)::Forcings
loadforcings(resource::Resource; outdir=DEFAULT_FORCINGS_DIR)::Forcings
loadforcings([format::ForcingFormat], filename::String; outdir=DEFAULT_FORCINGS_DIR)::Forcings

Loads forcing data from the given file according to the format specified by format. By default, the forcing format is automatically detected via detectformat. Returns a Forcings struct containing all forcing data and metadata

CryoGrid.InputOutput.time_derivative_forcingMethod
time_derivative_forcing(
    f::InterpolatedForcing{unit},
    new_name::Symbol;
    interp=Numerics.Linear()
) where {unit}

Computes the finite difference time derivative of the given InterpolatedForcing time series and returns a new forcing with units [unit].s⁻¹