From 9825ef8d144e38977cfcbc11d40d0d3e083acd46 Mon Sep 17 00:00:00 2001 From: Simone Silvestri Date: Sun, 12 Jan 2025 19:11:14 -0500 Subject: [PATCH] add a docstring --- src/Grids/vertical_coordinates.jl | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/src/Grids/vertical_coordinates.jl b/src/Grids/vertical_coordinates.jl index f8d5d630b0..b1e8b488b0 100644 --- a/src/Grids/vertical_coordinates.jl +++ b/src/Grids/vertical_coordinates.jl @@ -29,20 +29,6 @@ struct StaticVerticalCoordinate{C, D, E, F} <: AbstractVerticalCoordinate Δᵃᵃᶜ :: F end -# Represents a z-star three-dimensional vertical coordinate. -# -# # Fields -# - `cᶠ::C`: Face-centered coordinate. -# - `cᶜ::C`: Cell-centered coordinate. -# - `Δᶠ::D`: Face-centered grid spacing. -# - `Δᶜ::D`: Cell-centered grid spacing. -# - `ηⁿ::E`: Surface elevation at the current time step. -# - `σᶜᶜⁿ::CC`: Vertical grid scaling at center-center at the current time step. -# - `σᶠᶜⁿ::FC`: Vertical grid scaling at face-center at the current time step. -# - `σᶜᶠⁿ::CF`: Vertical grid scaling at center-face at the current time step. -# - `σᶠᶠⁿ::FF`: Vertical grid scaling at face-face at the current time step. -# - `σᶜᶜ⁻::CC`: Vertical grid scaling at center-center at the previous time step. -# - `∂t_σ::CC`: Time derivative of the vertical grid scaling at cell centers. struct ZStarVerticalCoordinate{C, D, E, F, H, CC, FC, CF, FF} <: AbstractVerticalCoordinate cᵃᵃᶠ :: C cᵃᵃᶜ :: D @@ -57,7 +43,13 @@ struct ZStarVerticalCoordinate{C, D, E, F, H, CC, FC, CF, FF} <: AbstractVertica ∂t_σ :: CC end -# Convenience constructors for z-star vertical coordinate for use in grid constructors +""" + ZStarVerticalCoordinate(r_faces) + +Construct a `ZStarVerticalCoordinate` from `r_faces` that can be a `Tuple`, a function of an index `k`, +or an `AbstractArray`. A `ZStarVerticalCoordinate` is a vertical coordinate that evolves in time +following the surface. +""" ZStarVerticalCoordinate(r_faces) = ZStarVerticalCoordinate(r_faces, r_faces, [nothing for i in 1:9]...) ####