Skip to content

Commit

Permalink
initialize! orography for SWM correctly called
Browse files Browse the repository at this point in the history
  • Loading branch information
milankl committed Oct 18, 2023
1 parent 27307b8 commit d23cbb0
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions src/dynamics/models.jl
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ Calls all `initialize!` functions for components of `model`,
except for `model.output` and `model.feedback` which are always called
at in `time_stepping!`."""
function initialize!(model::Barotropic)
(;spectral_grid,forcing,drag,horizontal_diffusion) = model
(;spectral_grid) = model

spectral_grid.nlev > 1 && @warn "Only nlev=1 supported for BarotropicModel, \
SpectralGrid with nlev=$(spectral_grid.nlev) provided."

initialize!(forcing,model)
initialize!(drag,model)
initialize!(horizontal_diffusion,model)
initialize!(model.forcing,model)
initialize!(model.drag,model)
initialize!(model.horizontal_diffusion,model)

# initial conditions
prognostic_variables = PrognosticVariables(spectral_grid,model)
Expand Down Expand Up @@ -116,16 +116,15 @@ Calls all `initialize!` functions for components of `model`,
except for `model.output` and `model.feedback` which are always called
at in `time_stepping!` and `model.implicit` which is done in `first_timesteps!`."""
function initialize!(model::ShallowWater)
(;spectral_grid,forcing,horizontal_diffusion,drag,
orography,planet,spectral_transform,geometry) = model
(;spectral_grid) = model

spectral_grid.nlev > 1 && @warn "Only nlev=1 supported for ShallowWaterModel, \
SpectralGrid with nlev=$(spectral_grid.nlev) provided."

initialize!(forcing,model)
initialize!(drag,model)
initialize!(horizontal_diffusion,model)
initialize!(orography,planet,spectral_transform,geometry)
initialize!(model.forcing,model)
initialize!(model.drag,model)
initialize!(model.horizontal_diffusion,model)
initialize!(model.orography,model)

# initial conditions
prognostic_variables = PrognosticVariables(spectral_grid,model)
Expand Down

0 comments on commit d23cbb0

Please sign in to comment.