@@ -233,6 +233,19 @@ Interfacer.get_field(sim::OceananigansSimulation, ::Val{:surface_diffuse_albedo}
233
233
# NOTE: This is 3D, but it will be remapped to 2D
234
234
Interfacer. get_field (sim:: OceananigansSimulation , :: Val{:surface_temperature} ) = 273.15 + sim. ocean. model. tracers. T
235
235
236
+ """
237
+ FluxCalculator.update_turbulent_fluxes!(sim::OceananigansSimulation, fields)
238
+
239
+ Update the turbulent fluxes in the simulation using the values stored in the coupler fields.
240
+ These include latent heat flux, sensible heat flux, momentum fluxes, and moisture flux.
241
+
242
+ A note on sign conventions:
243
+ SurfaceFluxes and Oceananigans both use the convention that a positive flux is an upward flux.
244
+ No sign change is needed during the exchange, except for moisture/salinity fluxes:
245
+ SurfaceFluxes provides moisture moving from atmosphere to ocean as a negative flux at the surface,
246
+ and Oceananigans represents moisture moving from atmosphere to ocean as a positive salinity flux,
247
+ so a sign change is needed when we convert from moisture to salinity flux.
248
+ """
236
249
function FluxCalculator. update_turbulent_fluxes! (sim:: OceananigansSimulation , fields)
237
250
# Only LatitudeLongitudeGrid are supported because otherwise we have to rotate the vectors
238
251
@@ -349,6 +362,13 @@ by the coupler.
349
362
350
363
Update the portion of the surface_fluxes for T and S that is due to radiation and
351
364
precipitation. The rest will be updated in `update_turbulent_fluxes!`.
365
+
366
+ A note on sign conventions:
367
+ ClimaAtmos and Oceananigans both use the convention that a positive flux is an upward flux.
368
+ No sign change is needed during the exchange, except for precipitation/salinity fluxes.
369
+ ClimaAtmos provides precipitation as a negative flux at the surface, and
370
+ Oceananigans represents precipitation as a positive salinity flux,
371
+ so a sign change is needed when we convert from precipitation to salinity flux.
352
372
"""
353
373
function FieldExchanger. update_sim! (sim:: OceananigansSimulation , csf, area_fraction)
354
374
(; ocean_reference_density, ocean_heat_capacity, ocean_fresh_water_density) = sim. ocean_properties
0 commit comments