Hypsography
ClimaCore.Hypsography.LinearAdaption
— TypeLinearAdaption(surface)
Locate the levels by linear interpolation between the surface and the top of the domain, using the method of [12]. The surface can be specified as a ZPoint
or a Field
of ZPoint
s.
ClimaCore.Hypsography.SLEVEAdaption
— TypeSLEVEAdaption(surface, ηₕ, s)
Locate vertical levels using an exponential function between the surface and the top of the domain, using the method of [13]. The surface can be specified as a ZPoint
or a Field
of ZPoint
s.
This method is modified such no warping is applied above the generalized coordinate ηₕ
, where 0 ≤ ηₕ < 1
. s
governs the decay rate. If the decay-scale is poorly specified (i.e., s * zₜ
is lower than the maximum surface elevation), a warning is thrown and s
is adjusted such that it szₜ > maximum(z_surface)
.
ClimaCore.Hypsography.diffuse_surface_elevation!
— Functiondiffuse_surface_elevation!(f::Field; κ::T, iter::Int, dt::T)
Option for 2nd order diffusive smoothing of generated terrain. Mutate (smooth) a given elevation profile f
before assigning the surface elevation to the HypsographyAdaption
type. A spectral second-order diffusion operator is applied with forward-Euler updates to generate profiles for each new iteration. Steps to generate smoothed terrain ( represented as a ClimaCore Field) are as follows:
- Compute discrete elevation profile f
- Compute diffusesurfaceelevation!(f, κ, iter). f is mutated.
- Define
Hypsography.LinearAdaption(f)
- Define
ExtrudedFiniteDifferenceSpace
with new surface elevation.
Default diffusion parameters are appropriate for spherical arrangements. For zmax-zsfc
== 𝒪(10^4), κ == 𝒪(10^8), dt == 𝒪(10⁻¹).
ClimaCore.Hypsography.ref_z_to_physical_z
— Functionref_z_to_physical_z(adaption::HypsographyAdaption, z_ref::ZPoint, z_top::ZPoint) :: ZPoint
Convert reference z
s to physical z
s as prescribed by the given adaption.
This function has to be the inverse of physical_z_to_ref_z
.