Function for tracers #2361
-
Hi, I would like to force a tracer to a specific value at a specific time and location in my grid. Any creative suggestions on how to do this?
Any help appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
I think you'll have to chain @inline t_unforced(t) = t < ti
@inline i_unforced(i) = i < 1 | i > 3
@inline k_unforced(k) = k < 1 | k > 3
@inline unforced(i, k, t) = t_unforced(t) | i_unforced(i) | k_unforced(k)
@inline forcing(i, j, k, grid, clock, fields) = ifelse(unforced(i, k, clock.time), 0.0, 1.0)
c_forcing = Forcing(forcing, discrete_form=true) I think that will work... |
Beta Was this translation helpful? Give feedback.
-
Has anyone tried this on a GPU? I use
to apply a tracer forcing at a single surface grid cell over the first 15 days (using ClimaOcean's
errors in
|
Beta Was this translation helpful? Give feedback.
I think you'll have to chain
|
logic in adiscrete_form
forcing function. I tried to make it readable:I think that will work...