Skip to content

Commit

Permalink
fixed docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
jagoosw committed Aug 29, 2023
1 parent 1721923 commit 7f06424
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/Boundaries/Sediments/instant_remineralization.jl
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,5 @@ sediment_fields(model::InstantRemineralisation) = (N_storage = model.fields.N_st
@inbounds timestepper.Gⁿ[remineralisation_receiver(bgc)][i, j, 1] += flux * (1 - burial_efficiency) / Δz
end

summary(::InstantRemineralisation) = string("Single-layer instant remineralisaiton ($FT)")
summary(::InstantRemineralisation{FT}) where {FT} = string("Single-layer instant remineralisaiton ($FT)")
show(io::IO, model::InstantRemineralisation) = print(io, summary(model))

Check warning on line 96 in src/Boundaries/Sediments/instant_remineralization.jl

View check run for this annotation

Codecov / codecov/patch

src/Boundaries/Sediments/instant_remineralization.jl#L95-L96

Added lines #L95 - L96 were not covered by tests
12 changes: 6 additions & 6 deletions src/Models/AdvectedPopulations/LOBSTER/LOBSTER.jl
Original file line number Diff line number Diff line change
Expand Up @@ -419,12 +419,12 @@ adapt_structure(to, lobster::LOBSTER) =

summary(::LOBSTER{FT, B, W}) where {FT, B, W} = string("Lodyc-DAMTP Ocean Biogeochemical Simulation Tools for Ecosystem and Resources (LOBSTER) model ($FT)")

show(io::IO, model::LOBSTER{FT, Val{B}, W}) where {FT, B, W} = print(io, string(summary(model), " \n",
" Optional components:", "\n",
" ├── Carbonates $(B[1] ? :✅ : :❌) \n",
" ├── Oxygen $(B[2] ? :✅ : :❌) \n",
" └── Variable Redfield Ratio $(B[3] ? :✅ : :❌)", "\n",
" Sinking Velocities:", "\n", show_sinking_velocities(model.sinking_velocities)))
show(io::IO, model::LOBSTER{FT, Val{B}, W}) where {FT, B, W} = string(summary(model), " \n",
" Optional components:", "\n",
" ├── Carbonates $(B[1] ? :✅ : :❌) \n",
" ├── Oxygen $(B[2] ? :✅ : :❌) \n",
" └── Variable Redfield Ratio $(B[3] ? :✅ : :❌)", "\n",
" Sinking Velocities:", "\n", show_sinking_velocities(model.sinking_velocities))

@inline maximum_sinking_velocity(bgc::LOBSTER) = maximum(abs, bgc.sinking_velocities.bPOM.w)

Check warning on line 429 in src/Models/AdvectedPopulations/LOBSTER/LOBSTER.jl

View check run for this annotation

Codecov / codecov/patch

src/Models/AdvectedPopulations/LOBSTER/LOBSTER.jl#L429

Added line #L429 was not covered by tests

Expand Down
4 changes: 2 additions & 2 deletions src/Models/AdvectedPopulations/NPZD.jl
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,8 @@ function update_boxmodel_state!(model::BoxModel{<:NPZD, <:Any, <:Any, <:Any, <:A
end

summary(::NPZD{FT, W}) where {FT, W} = string("Nutrient Phytoplankton Zooplankton Detritus model ($FT)")
show(io::IO, model::NPZD) = print(io, string(summary(model), " \n",
" Sinking Velocities:", "\n", show_sinking_velocities(model.sinking_velocities)))
show(io::IO, model::NPZD) = string(summary(model), " \n",
" Sinking Velocities:", "\n", show_sinking_velocities(model.sinking_velocities))

@inline maximum_sinking_velocity(bgc::NPZD) = maximum(abs, bgc.sinking_velocities.D.w)

Expand Down
2 changes: 1 addition & 1 deletion src/OceanBioME.jl
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ Returns the redfield ratio of `tracer_name` from `bgc` when it is constant acros

summary(bgc::Biogeochemistry) = string("Biogeochemical model based on $(summary(bgc.underlying_biogeochemistry))")

Check warning on line 149 in src/OceanBioME.jl

View check run for this annotation

Codecov / codecov/patch

src/OceanBioME.jl#L149

Added line #L149 was not covered by tests
show(io::IO, model::Biogeochemistry) =
print(io, show(io, model.underlying_biogeochemistry), " \n",
print(io, show(model.underlying_biogeochemistry), " \n",
" Light attenuation: ", summary(model.light_attenuation), "\n",
" Sediment: ", summary(model.sediment), "\n",
" Particles: ", summary(model.particles))
Expand Down

0 comments on commit 7f06424

Please sign in to comment.