Skip to content

Commit 8c0bb84

Browse files
authored
Use DocumenterCitations for proper citing in docs (#530)
* use DocumenterCitations for proper citing in docs * trigger docs built
1 parent d9ddf59 commit 8c0bb84

File tree

6 files changed

+32
-8
lines changed

6 files changed

+32
-8
lines changed

docs/Project.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ CFTime = "179af706-886a-5703-950a-314cd64e0468"
33
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
44
DataDeps = "124859b0-ceae-595e-8997-d05f6a7a8dfe"
55
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
6+
DocumenterCitations = "daee34ce-89f3-4625-b898-19384cb65244"
67
Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306"
78
Oceananigans = "9e8cae18-63c1-5223-a75c-80ca9d6e9a09"
89
SeawaterPolynomials = "d496a93d-167e-4197-9f49-d3af4ff8fe40"
@@ -11,5 +12,6 @@ SeawaterPolynomials = "d496a93d-167e-4197-9f49-d3af4ff8fe40"
1112
CairoMakie = "0.10.12, 0.11, 0.12, 0.13"
1213
DataDeps = "0.7"
1314
Documenter = "1"
15+
DocumenterCitations = "1.3"
1416
Oceananigans = "0.96 - 0.99"
1517
SeawaterPolynomials = "0.3.5"

docs/climaocean.bib

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
@article{edson2013exchange,
2+
title={On the exchange of momentum over the open ocean},
3+
author={Edson, James B and Jampana, Venkata and Weller, Robert A and Bigorre, Sebastien P and Plueddemann, Albert J and Fairall, Christopher W and Miller, Scott D and Mahrt, Larry and Vickers, Dean and Hersbach, Hans},
4+
journal={Journal of Physical Oceanography},
5+
volume={43},
6+
number={8},
7+
pages={1589--1610},
8+
year={2013},
9+
doi={10.1175/JPO-D-12-0173.1}
10+
}

docs/make.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
using
22
ClimaOcean,
33
Documenter,
4+
DocumenterCitations,
45
Literate
56

67
ENV["DATADEPS_ALWAYS_ACCEPT"] = "true"
78

9+
bib_filepath = joinpath(dirname(@__FILE__), "climaocean.bib")
10+
bib = CitationBibliography(bib_filepath, style=:authoryear)
11+
812
#####
913
##### Generate examples
1014
#####
@@ -57,11 +61,13 @@ pages = [
5761
"Private" => "library/internals.md",
5862
"Function index" => "library/function_index.md",
5963
],
64+
"References" => "references.md",
6065
]
6166

6267
makedocs(sitename = "ClimaOcean.jl";
6368
format,
6469
pages,
70+
plugins = [bib],
6571
modules = [ClimaOcean],
6672
doctest = true,
6773
clean = true,

docs/src/references.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# References
2+
3+
```@bibliography
4+
```

src/OceanSeaIceModels/InterfaceComputations/roughness_lengths.jl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ end
145145
@inline roughness_length(ℓ::Number, args...) =
146146

147147
# Momentum roughness length should be different from scalar roughness length.
148-
# Temperature and water vapor can be considered the same (Edson et al 2013)
148+
# Temperature and water vapor can be considered the same (Edson et al. 2013)
149149
@inline function roughness_length(ℓ::MomentumRoughnessLength{FT}, ΔU, u★, 𝒬, ℂ) where FT
150150
g =.gravitational_acceleration
151151
β =.laminar_parameter
@@ -171,11 +171,13 @@ end
171171
"""
172172
ReynoldsScalingFunction(FT=Float64; A=5.85e-5, b=0.72)
173173
174-
Empirical fit of the scalar roughness length with roughness Reynolds number `R★ = u★ ℓu / ν`.
175-
Edson et al. (2013), equation (28).
174+
Empirical fit of the scalar roughness length with roughness Reynolds number `R★ = u★ ℓu / ν`
175+
176176
```math
177177
ℓs = A / R★ ^ b
178178
```
179+
180+
See equation (28) by [edson2013exchange](@citet).
179181
"""
180182
ReynoldsScalingFunction(FT = Oceananigans.defaults.FloatType; A = 5.85e-5, b = 0.72) =
181183
ReynoldsScalingFunction(convert(FT, A), convert(FT, b))

src/OceanSeaIceModels/InterfaceComputations/similarity_theory_turbulent_fluxes.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ Keyword Arguments
7878
- `turbulent_prandtl_number`: The turbulent Prandtl number. Default: 1.
7979
- `gustiness_parameter`: Increases surface fluxes in low wind conditions. Default: 1.
8080
- `stability_functions`: The stability functions. Default: `default_stability_functions(FT)` that follow the
81-
formulation of Edson et al. (2013).
81+
formulation of [edson2013exchange](@citet).
8282
- `roughness_lengths`: The roughness lengths used to calculate the characteristic scales for momentum, temperature and
83-
water vapor. Default: `default_roughness_lengths(FT)`, formulation taken from Edson et al (2013).
83+
water vapor. Default: `default_roughness_lengths(FT)`, formulation taken from [edson2013exchange](@citet).
8484
- `similarity_form`: The type of similarity profile used to relate the atmospheric state to the
8585
interface fluxes / characteristic scales.
8686
- `solver_tolerance`: The tolerance for convergence. Default: 1e-8.
@@ -181,7 +181,7 @@ function iterate_interface_fluxes(flux_formulation::SimilarityTheoryFluxes,
181181
L★ = ifelse(b★ == 0, Inf, - u★^2 /* b★))
182182

183183

184-
# Buoyancy flux characteristic scale for gustiness (Edson 2013)
184+
# Buoyancy flux characteristic scale for gustiness (Edson et al. 2013)
185185
h_bℓ = atmosphere_state.h_bℓ
186186
Jᵇ = - u★ * b★
187187
Uᴳ = β * cbrt(Jᵇ * h_bℓ)
@@ -269,7 +269,7 @@ end
269269
"""
270270
EdsonMomentumStabilityFunction{FT}
271271
272-
A struct representing the momentum stability function detailed in Edson et al (2013).
272+
A struct representing the momentum stability function detailed in paper by [edson2013exchange](@citet).
273273
The formulation hinges on the definition of three different functions:
274274
one for stable atmospheric conditions ``(ζ > 0)``, named ``ψₛ`` and two for unstable conditions,
275275
named ``ψᵤ₁`` and ``ψᵤ₂``.
@@ -348,7 +348,7 @@ end
348348
"""
349349
EdsonScalarStabilityFunction{FT}
350350
351-
A struct representing the scalar stability function detailed in Edson et al (2013).
351+
A struct representing the scalar stability function detailed by [edson2013exchange](@citet).
352352
The formulation hinges on the definition of three different functions:
353353
one for stable atmospheric conditions ``(ζ > 0)``, named ``ψₛ`` and two for unstable conditions,
354354
named ``ψᵤ₁`` and ``ψᵤ₂``.

0 commit comments

Comments
 (0)