Skip to content

Commit

Permalink
modified: config/default_configs/default_config.yml
Browse files Browse the repository at this point in the history
	modified:   config/model_configs/sphere_baroclinic_wave_rhoe_equilmoist.yml
	modified:   examples/Manifest.toml
	modified:   src/prognostic_equations/implicit/implicit_tendency.jl
	modified:   src/utils/abbreviations.jl

	modified:   NEWS.md

Fixes

Make default

Fixes
  • Loading branch information
akshaysridhar authored and charleskawczynski committed Dec 24, 2024
1 parent 5600f26 commit 28253f9
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 4 deletions.
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ v0.28.1
-------
### Features

### Add van Leer class operator

Added a new vertical transport option `vanleer_limiter` (for tracer and energy variables)
which uses methods described in Lin et al. (1994) to apply slope-limited upwinding. Adds
operator

### Read initial conditions from NetCDF files

Added functionality to allow initial conditions to be overwritten by
Expand Down
8 changes: 4 additions & 4 deletions config/default_configs/default_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,11 @@ viscous_sponge:
help: "Viscous sponge [`true`, `false` (default)]"
value: false
tracer_upwinding:
help: "Tracer upwinding mode [`none` (default), `first_order` , `third_order`, `boris_book`, `zalesak`]"
value: none
help: "Tracer upwinding mode [`none` (default), `first_order` , `third_order`, `boris_book`, `zalesak`, `vanleer_limiter`]"
value: vanleer_limiter
energy_upwinding:
help: "Energy upwinding mode [`none` (default), `first_order` , `third_order`, `boris_book`, `zalesak`]"
value: none
help: "Energy upwinding mode [`none` (default), `first_order` , `third_order`, `boris_book`, `zalesak`, `vanleer_limiter`]"
value: vanleer_limiter
orographic_gravity_wave:
help: "Orographic drag on horizontal mean flow [`nothing` (default), `gfdl_restart`, `raw_topo`]"
value: ~
Expand Down
11 changes: 11 additions & 0 deletions src/prognostic_equations/implicit/implicit_tendency.jl
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,17 @@ vertical_transport!(
::Val{:first_order},
ᶜdivᵥ,
) = @. ᶜρχₜ += -coeff * (ᶜdivᵥ(ᶠwinterp(ᶜJ, ᶜρ) * ᶠupwind1(ᶠu³, ᶜχ)))
vertical_transport!(
coeff,
ᶜρχₜ,
ᶜJ,
ᶜρ,
ᶠu³,
ᶜχ,
dt,
::Val{:vanleer_limiter},
ᶜdivᵥ,
) = @. ᶜρχₜ += -coeff * (ᶜdivᵥ(ᶠwinterp(ᶜJ, ᶜρ) * ᶠlin_vanleer(ᶠu³, ᶜχ, dt)))
vertical_transport!(
coeff,
ᶜρχₜ,
Expand Down
5 changes: 5 additions & 0 deletions src/utils/abbreviations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ const ᶠfct_zalesak = Operators.FCTZalesak(
bottom = Operators.FirstOrderOneSided(),
top = Operators.FirstOrderOneSided(),
)
const ᶠlin_vanleer = Operators.LinVanLeerC2F(
bottom = Operators.FirstOrderOneSided(),
top = Operators.FirstOrderOneSided(),
constraint = Operators.MonotoneLocalExtrema(), # (Mono5)
)

const ᶜinterp_matrix = MatrixFields.operator_matrix(ᶜinterp)
const ᶜleft_bias_matrix = MatrixFields.operator_matrix(ᶜleft_bias)
Expand Down

0 comments on commit 28253f9

Please sign in to comment.