Skip to content

Commit

Permalink
Fix transportoperator docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
briochemc committed Oct 14, 2021
1 parent 6526eab commit 1fd5795
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "AIBECS"
uuid = "ace601d6-714c-11e9-04e5-89b7fad23838"
authors = ["Benoit Pasquier <[email protected]>"]
version = "0.10.10"
version = "0.10.11"

[deps]
Bijectors = "76274a88-744f-5084-9051-94815aaf08c4"
Expand Down
22 changes: 17 additions & 5 deletions src/SinkingParticles.jl
Original file line number Diff line number Diff line change
Expand Up @@ -155,27 +155,39 @@ export DIVO, PFDO, FATO
#end # module

"""
transportoperator(grd; kwargs)
transportoperator(grd, w)
Returns the transportoperator corresponding to the arguments.
Returns the transportoperator for the given settling velocity `w`.
The settling velocity can be provided as either a scalar
(e.g., `w = 100.0` in units of meters per second)
or as a function of depth
(e.g., `w(z) = 2z + 1`).
# Examples
Create the particle flux divergence with settling velocity of 100m/s
```julia-repl
julia> T = transportoperator(grd; w = 100.0)
julia> T = transportoperator(grd, 100.0)
```
Or with settling velocity function w(z) = 2z + 1
```julia-repl
julia> T = transportoperator(grd; w = z -> 2z + 1)
julia> T = transportoperator(grd, z -> 2z + 1)
```
By default, the seafloor flux is set to zero, so that all the particles
that reach it are remineralized there. You can let particles go through
by setting `fsedremin=0.0`.
by setting `fsedremin=0.0`, via, e.g.,
```julia-repl
julia> T = transportoperator(grd, z -> 2z + 1; fsedremin=0.0)
```
For finer control and advanced use, see the particle-flux divergence
operator function, `PFDO`.
"""
transportoperator(grd, w_top; DIVop=DIVO(grd), Iabove=buildIabove(grd)) = PFDO(w_top, DIVop, Iabove)
function transportoperator(grd, w::Function;
Expand Down

2 comments on commit 1fd5795

@briochemc
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/46725

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.10.11 -m "<description of version>" 1fd5795eb274d37a2d2f204b55f8e4ded4875873
git push origin v0.10.11

Please sign in to comment.