-
Notifications
You must be signed in to change notification settings - Fork 233
How can I use Field as input in UniformStokesDrift? #4292
-
Hi all, |
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 4 comments · 6 replies
-
converting this to a discussion where we can continue the conversation! |
Beta Was this translation helpful? Give feedback.
All reactions
-
@qingli411 @BrodiePearson have you used this feature? |
Beta Was this translation helpful? Give feedback.
All reactions
-
I tried to use the field as input but failed. |
Beta Was this translation helpful? Give feedback.
All reactions
-
What is the specific error you are getting? I am not sure if it an issue with the fields you are inputting, the execution of code, or the numerics. Your Stokes drift specification does have a typo: you should be specifying ∂t_vˢ=new_dVSDdt. Perhaps that could be causing numerical issues? |
Beta Was this translation helpful? Give feedback.
All reactions
-
❤️ 1
-
I got this error when I run the simulation. The error message is too long, so I only captured a portion of it
|
Beta Was this translation helpful? Give feedback.
All reactions
-
Does it work on CPU? |
Beta Was this translation helpful? Give feedback.
All reactions
-
|
Beta Was this translation helpful? Give feedback.
All reactions
-
Your error references a module Note that support for commit: 0e06f28 What version of Oceananigans are you using? |
Beta Was this translation helpful? Give feedback.
All reactions
-
My previous version is 0.86, and after updating to 0.96.2, it started working! Thank you so much! However, I got some new errors with the continuous boundary conditions. I tried using a wall model as the bottom boundary condition, but some new errors appeared. The error messages are as follows:
and my bottom boundary contion is set as:
This error only occurs when using continuous boundary conditions, whereas there are no errors when using discrete boundary conditions. |
Beta Was this translation helpful? Give feedback.
All reactions
-
I think that's a current bug in ContinuousBoundaryConditions. It should be fixed soon though: #4008 the latest release is 0.96.9: https://github.com/CliMA/Oceananigans.jl/releases/tag/v0.96.9 something is blocking your upgrade in the julia environment you are running this code in, which you likely want to address to get the next bugfix (which will probably be on 0.96.10). a few more things... your code contains z₁ = -1 * znodes(grid, Center())[grid.Nz] # Closest grid center to the bottom the comment is incorrect, because Note here, const cᴰᵇ = (κ / log(z₁ / z₀))^2 # Drag coefficient you pass this as a parameter to the boundary condition, so it does not need to be |
Beta Was this translation helpful? Give feedback.
All reactions
This discussion was converted from issue #4291 on March 27, 2025 15:14.
Your error references a module
StokesDrift.jl
, but the current module is calledStokesDrifts.jl
: https://github.com/CliMA/Oceananigans.jl/blob/main/src/StokesDrifts.jlNote that support for
Field
Stokes drift was added fairly recently, in 0.95.9: #2320commit: 0e06f28
What version of Oceananigans are you using?