Replies: 2 comments 15 replies
-
I think you just need to pass I haven't tested it, but your code would look something like this: α=2e-4; β=8e-4
g=g_Earth
T= model.tracers.T; S = model.tracers.S;
N2 = @at(Center, Center, Center) g * α * ∂z(T) - g* β* ∂z(S)
outputs = (u=model.velocities.u, v=model.velocities.v, w=model.velocities.w, T=model.tracers.T, S=model.tracers.S,
νₑ = model.diffusivity_fields.νₑ, kT=model.diffusivity_fields.κₑ.T, N2=N2,)
output_interval = 1minutes
simulation.output_writers[:field_output] =
NetCDFOutputWriter(model, outputs,
schedule = TimeInterval(output_interval),
filepath = joinpath(@__DIR__,"junk_LT_TSUini_2h.nc"),
mode = "c")
run!(simulation) Can you test this and see if this works? Also I don't think you need the Also(2) in the latest version of Oceananigans you'll have to slighly change your call to
|
Beta Was this translation helpful? Give feedback.
2 replies
-
I hadn't gotten to the outputs yet, since this line doesn't work for me: It gives error:
|
Beta Was this translation helpful? Give feedback.
13 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Following up on a thread on the #oceananigans channel on the Julia Slack:
I am trying to add computed fields to a model output; fields derived from simulated tracers and velocities, e.g. N2, Ri
This is related to the closed issue #2337 I believe, but the solution there doesn't yet seem to work for me.
Here's my code, which is roughly based on the Langmuir Turbulence example.
Other than the
----Computed field ---
section this code runs.Beta Was this translation helpful? Give feedback.
All reactions