Skip to content

Commit

Permalink
Change timestep to 40min at T31 (#623)
Browse files Browse the repository at this point in the history
* change timestep to 40min at T31

* update changelog

* schedule tests updated

* Rossby-Haurwitz docs with shorter dt

* reduce stochastic stirrin strength
  • Loading branch information
milankl authored Dec 9, 2024
1 parent 719dce9 commit 4f07e4d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased

- Change default timestep to 40min at T31 [#623](https://github.com/SpeedyWeather/SpeedyWeather.jl/pull/623)

## v0.13

- AbstractSurfacePerturbation introduced [#631](https://github.com/SpeedyWeather/SpeedyWeather.jl/pull/631)
Expand Down
2 changes: 1 addition & 1 deletion docs/src/forcing_drag.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ using SpeedyWeather
decorrelation_time::Second = Day(2)
"Stirring strength A [1/s²]"
strength::NF = 5e-11
strength::NF = 2e-11
"Stirring latitude [˚N]"
latitude::NF = 45
Expand Down
4 changes: 3 additions & 1 deletion docs/src/initial_conditions.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,9 @@ initial_conditions = InitialConditions(
pres=PressureOnOrography())
orography = NoOrography(spectral_grid)
model = PrimitiveDryModel(spectral_grid; initial_conditions, orography, physics=false)
time_stepping = Leapfrog(spectral_grid, Δt_at_T31=Minute(30)) # 30min timestep scaled linearly
model = PrimitiveDryModel(spectral_grid; time_stepping, initial_conditions, orography, physics=false)
simulation = initialize!(model)
run!(simulation, period=Day(5))
nothing # hide
Expand Down
2 changes: 1 addition & 1 deletion src/dynamics/time_integration.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ $(TYPEDFIELDS)

# OPTIONS
"Time step in minutes for T31, scale linearly to `trunc`"
Δt_at_T31::Second = Minute(30)
Δt_at_T31::Second = Minute(40)

"Radius of sphere [m], used for scaling"
radius::NF = DEFAULT_RADIUS
Expand Down
4 changes: 2 additions & 2 deletions test/schedule.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@testset "Periodic schedule" begin
# especially T170 uses 337500 milliseconds time steps
# not representable as seconds
for trunc in (31,42,63,85,127,170,255,341)
for trunc in (31, 42, 63, 85, 127, 170, 255, 341)
spectral_grid = SpectralGrid(trunc=trunc, nlayers=1)
time_stepping = Leapfrog(spectral_grid)

Expand All @@ -10,7 +10,7 @@
SpeedyWeather.set_period!(clock, period)
initialize!(clock, time_stepping)

hour = Hour(1)
hour = Hour(2)
schedule = Schedule(every=hour)
initialize!(schedule, clock)

Expand Down

0 comments on commit 4f07e4d

Please sign in to comment.