Skip to content

Conversation

jagoosw
Copy link
Owner

@jagoosw jagoosw commented Oct 1, 2025

This PR overhauls the surface flux interface and internals to:

  1. Properly compute the stress velocity and temperature including stability functions
  2. Combines both the wind stress and heat flux into one concept (since they depend on eachother)
  3. Precompute drag and heat transfer coefficients in update_boundary_condition! so that it is only done once per time-step
  4. Abstracts the "atmosphere" so we can expand to different coupling etc. in the future

The interface now is:

using Walrus, Oceananigans

atmosphere = PrescribedAtmosphericState(wind_speed = 1.0, wind_direction = 90.0, temperature = 0.0)

U, V, Q = OceanAtmosphereBoundaryConditions(grid, atmosphere)

model = NonhydrostaticModel(; grid, 
                              boundary_conditions = (u = FieldBoundaryConditions(top = U),
                                                     v = FieldBoundaryConditions(top = V),
                                                     T = FieldBoundaryConditions(top = Q),
                              tracers = :T)

Also removed WindDrivenStokes since it didn't work well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant