# Reusing NoiseProcess in StochasticDiffEq

**URL:** https://discourse.julialang.org/t/reusing-noiseprocess-in-stochasticdiffeq/128947
**Category:** Numerics
**Tags:** sde, sciml
**Created:** [May 13, 2025, 8:06am UTC](https://discourse.julialang.org/t/reusing-noiseprocess-in-stochasticdiffeq/128947 "2025-05-13T08:06:27Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![ymuv1](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ymuv1/32/216814_2.png) [@ymuv1](https://discourse.julialang.org/u/ymuv1)
#### Post date: [May 13, 2025, 8:06am UTC](https://discourse.julialang.org/t/reusing-noiseprocess-in-stochasticdiffeq/128947/1 "2025-05-13T08:06:27Z")

</div>

I am trying to use the same `NoiseProcess` in two different SDE integrations. I don’t mean to just use the same type of noise, but the same values as well (and potentially values in intermediate times obtained via the bridge function). I can get the NoiseProcess from the first integration by passing `get_noise=true` in the first `solve` call:

```julia
using DifferentialEquations
using Plots

function f!(du, u, p, t)
    du[1] = u[1]
end

function g!(du, u, p, t)
    du[1] = 0.1u[1]
end

tspan = (0.0, 10.0)
u0 = [1.0]

prob = SDEProblem(f!, g!, u0, tspan)

sol = solve(prob, save_noise=true)
# sol.W is the noise process

```

But I can’t find a way to use this noise in another `solve`. I would like something like this:  
`prob2 = SDEProblem(f!, g!, u0, tspan, noise=sol.W, alg=SomeOtherAlg)` but the noise argument seems to be meant for the noise type, not specific noise values.  
E.g., running the following code (after I ran the first) results in non-overlapping graphs:

```julia
plot(sol.t, sol[1, :])

prob2 = SDEProblem(f!, g!, u0, (tspan), noise=sol.W)
sol = solve(prob2, save_noise=true)
plot!(sol.t, sol[1, :])

```

---

<div class="post-metadata">

### Author: ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)
#### Post date: [May 13, 2025, 1:29pm UTC](https://discourse.julialang.org/t/reusing-noiseprocess-in-stochasticdiffeq/128947/2 "2025-05-13T13:29:58Z")

</div>

I think you’re looking for NoiseWrapper?

> **[Abstract Noise Processes · DiffEqNoiseProcess.jl](https://docs.sciml.ai/DiffEqNoiseProcess/stable/abstract_noise_processes/#Alternative-AbstractNoiseProcess-Types)**
>
> Documentation for DiffEqNoiseProcess.jl.

---

<div class="post-metadata">

### Author: ![ymuv1](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ymuv1/32/216814_2.png) [@ymuv1](https://discourse.julialang.org/u/ymuv1)
#### Post date: [May 14, 2025, 9:33am UTC](https://discourse.julialang.org/t/reusing-noiseprocess-in-stochasticdiffeq/128947/3 "2025-05-14T09:33:13Z")

</div>

That’s exactly it! Thanks!  
Also, in case anyone else encounters these problems, note that inputting the NoiseWrapper to `solve` changes the default solving algorithm, so you need to specify that as well to reproduce the same results.
