Replies: 1 comment
-
Hi @keli559! This feature is described in our documentation: To save at some specific # Selected indices are i, j = 3, 4
ii = 3
jj = 4
column_indices = (ii, jj, :) # indices of a column with all points in z, and one point in x, y
# syntax is the same for `NetCDFOutputWriter`
output_writer = JLD2OutputWriter(model, outputs; indices=column_indices, other_kw...) To select indices corresponding to a particular location you can use something like x = xnodes(grid, Center(), Center(), Center())
x_of_interest = 4.1 # for example
ii = searchsortedfirst(x, x_of_interest) This might need additional work for the GPU (or just PS I'm converting this to a discussion so we can continue there; I don't think this issue motivates any changes to the source code. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In the demo, I saw using the following code to collect the output. How would I do it if I only want to save one slice at certain x and y ?
My velocities fields are 4d, time, depth, lat and lon. I only want to save time and depth with fixed lat and lon.
fields_to_output = merge(model.velocities, model.tracers, (; νₑ, dbdz, dcdz))
Beta Was this translation helpful? Give feedback.
All reactions