Skip to content

Easiest way to zero negative values for some tracers? #2409

Discussion options

You must be logged in to vote

Maybe

zero_tracer(sim) = map!(c -> ifelse(c < 0, 0.0, c), parent(sim.model.tracers.c), parent(sim.model.tracers.c))
simulation.callbacks[:zero_tracer] = Callback(zero_tracer)

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@iuryt
Comment options

iuryt Mar 31, 2022
Collaborator Author

@glwagner
Comment options

@glwagner
Comment options

@iuryt
Comment options

iuryt Mar 31, 2022
Collaborator Author

@iuryt
Comment options

iuryt Mar 31, 2022
Collaborator Author

Answer selected by iuryt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants