Skip to content

Conversation

@milankl
Copy link
Member

@milankl milankl commented Dec 3, 2024

Implements a general interface for stochastically perturbed parameterization tendencies SPPT as well as inputs. Running the same model twice now gives already different trajectories

image

one can however create a random process with a non-zero seed that would sample the same sequence of random numbers for reproducibility (default no)

random_process = SpectralAR1Process(spectral_grid, seed=123)

(seed=0 means seed from Julia's global RNG)

@minqi6 this would give you another somewhat adhoc stochastic physics baseline than the stochastic convection you are working on!

@matt-graham maybe that's the added stochasticity you'd need?

@CakeMixCore It sounded like you were more interested in perturbing parameters but if you just want to create ensembles then this is a much better way of doing it!

To be used like

using SpeedyWeather

spectral_grid = SpectralGrid()
random_process = SpectralAR1Process(spectral_grid)
sppt = StochasticallyPerturbedPhysicsTendencies(spectral_grid)

model = PrimitiveWetModel(spectral_grid; random_process, stochastic_physics=sppt)
simulation = initialize!(model)
run!(simulation)

default remains: random_process = NoRandomProcess() and stochastic_physics = NoStochasticPhysics()

@milankl milankl added parameterizations 🌧️ Parameterizations of unresolved physical processes stochastic 🎲 Random or stochastic components in a simulation labels Dec 3, 2024
@milankl milankl merged commit bdac940 into main Dec 5, 2024
5 checks passed
@milankl milankl deleted the mk/sppt branch December 8, 2024 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

parameterizations 🌧️ Parameterizations of unresolved physical processes stochastic 🎲 Random or stochastic components in a simulation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants