Skip to content

Commit

Permalink
sign error?
Browse files Browse the repository at this point in the history
  • Loading branch information
jagoosw committed Dec 26, 2023
1 parent c05242b commit 51ce405
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/wind_stress.jl
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ end

= - wind_speed * sind(wind_direction)

return - stress_velocity * (uʷ - u)
return stress_velocity * (uʷ - u)
end

@inline function (wind_stress::WindStress)(x, y, t, u, v, ::Val{:y})
Expand All @@ -198,7 +198,7 @@ end

= - wind_speed * cosd(wind_direction)

return - stress_velocity * (vʷ - v)
return stress_velocity * (vʷ - v)
end

summary(::WindStress) = string("Wind stress model")
Expand Down Expand Up @@ -250,6 +250,15 @@ end
log(params.reference_height/z₀)/(params.κ * params.wind_speed) *
(params.ν * params.b + params.aᶜ * (params.κ * params.wind_speed / log(params.reference_height/z₀))^3) - z₀

"""
find_velocity_roughness_length(wind_speed, reference_height, params)
A function that finds the velocity roughness length for the `LogarithmicNeutralWind` drag
coefficient model.
This will sometimes fail as the function is not well behaved at either low reference heights
(it has been tuned for 10m wind), or high (⪆ 20 m/s).
"""
@inline function find_velocity_roughness_length(wind_speed, reference_height, params)
z₀ = reference_height

Expand Down

0 comments on commit 51ce405

Please sign in to comment.