Skip to content

How to get z-coordinate in discrete forcing term? #4388

Answered by ali-ramadhan
Leezhard asked this question in Helpdesk
Discussion options

You must be logged in to vote

Hi @Leezhard! I think you're looking for the znode function defined here for example:

@inline znode(k, grid, ℓz) = rnode(k, grid, ℓz)
@inline znode(i, j, k, grid, ℓx, ℓy, ℓz) = rnode(i, j, k, grid, ℓx, ℓy, ℓz)

where ℓz is the location in the z-direction, e.g. Face() or Center().

It's not exported so you'll have to do using Oceananigans.Grids: znode but then you can use it in forcing functions.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Leezhard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants