diff --git a/Project.toml b/Project.toml index c25973b5..03f583c8 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "AIBECS" uuid = "ace601d6-714c-11e9-04e5-89b7fad23838" authors = ["Benoit Pasquier "] -version = "0.10.10" +version = "0.10.11" [deps] Bijectors = "76274a88-744f-5084-9051-94815aaf08c4" diff --git a/src/SinkingParticles.jl b/src/SinkingParticles.jl index 1ddc87b3..53564e05 100644 --- a/src/SinkingParticles.jl +++ b/src/SinkingParticles.jl @@ -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;