Skip to content

Commit

Permalink
Surface fluxes modular on ocean and land (#667)
Browse files Browse the repository at this point in the history
* Surface fluxes modular on ocean and land

* update changelog

* Evaporation over land/ocean modularised

* typo for prescribed heat flux

* split sensible/evaporative flux into ocean vs land

* move prescribed fluxes to prognostic variables

* typos everywhere
  • Loading branch information
milankl authored Jan 24, 2025
1 parent 450e935 commit 7825893
Show file tree
Hide file tree
Showing 12 changed files with 509 additions and 284 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Unreleased

- Prescribed ocean/land heat fluxes modular [#667](https://github.com/SpeedyWeather/SpeedyWeather.jl/pull/667)
- NetCDF output for tracers defined, precipitation rate output at initialize! again [#657](https://github.com/SpeedyWeather/SpeedyWeather.jl/pull/657)
- Precipitation rate from large-scale condensation/convection for coupling [#669](https://github.com/SpeedyWeather/SpeedyWeather.jl/pull/669)
- Fixed a bug, so that sum now works for LowerTraingularArrays [#668](https://github.com/SpeedyWeather/SpeedyWeather.jl/pull/668)
Expand Down
5 changes: 4 additions & 1 deletion src/SpeedyWeather.jl
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,10 @@ include("physics/boundary_layer.jl")
include("physics/temperature_relaxation.jl")
include("physics/vertical_diffusion.jl")
include("physics/large_scale_condensation.jl")
include("physics/surface_fluxes.jl")
include("physics/surface_fluxes/surface_fluxes.jl")
include("physics/surface_fluxes/momentum.jl")
include("physics/surface_fluxes/heat.jl")
include("physics/surface_fluxes/moisture.jl")
include("physics/convection.jl")
include("physics/zenith.jl")
include("physics/optical_depth.jl")
Expand Down
2 changes: 1 addition & 1 deletion src/dynamics/diagnostic_variables.jl
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ $(TYPEDFIELDS)"""
# SURFACE FLUXES
"Sensible heat flux [W/m²], positive up"
sensible_heat_flux::GridVariable2D = zeros(GridVariable2D, nlat_half)

"Evaporative flux [kg/s/m^2], positive up"
evaporative_flux::GridVariable2D = zeros(GridVariable2D, nlat_half)

Expand Down
12 changes: 12 additions & 0 deletions src/dynamics/prognostic_variables.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ export PrognosticVariablesOcean

"Sea ice concentration [1]"
sea_ice_concentration::GridVariable2D = zeros(GridVariable2D, nlat_half)

"Prescribed ocean sensible heat flux [W/m²]"
sensible_heat_flux::GridVariable2D = zeros(GridVariable2D, nlat_half)

"Prescribed ocean evaporative flux [kg/s/m²]"
evaporative_flux::GridVariable2D = zeros(GridVariable2D, nlat_half)
end

export PrognosticVariablesLand
Expand All @@ -44,6 +50,12 @@ export PrognosticVariablesLand

"Soil moisture layer 2, volume fraction [1]"
soil_moisture_layer2::GridVariable2D = zeros(GridVariable2D, nlat_half)

"Prescribed land sensible heat flux [W/m²]"
sensible_heat_flux::GridVariable2D = zeros(GridVariable2D, nlat_half)

"Prescribed land evaporative flux [kg/s/m²]"
evaporative_flux::GridVariable2D = zeros(GridVariable2D, nlat_half)
end

export PrognosticVariables
Expand Down
279 changes: 0 additions & 279 deletions src/physics/surface_fluxes.jl

This file was deleted.

Loading

0 comments on commit 7825893

Please sign in to comment.