Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Time "integration" #993

Open
milankl opened this issue May 2, 2024 · 0 comments
Open

Time "integration" #993

milankl opened this issue May 2, 2024 · 0 comments

Comments

@milankl
Copy link

milankl commented May 2, 2024

I was curious how Mimi handles the time integration, but looking into the examples it seems that in Mimi every run_timestep has to be formulated as recurrence relation, i.e.

$$X_{i+i} = F(X_i, t_i; P)$$

the next time step $i+1$ of a variable(s) $X$ as a function of its current value(s) $X_i$ some time $t_i$ and some parameters $P$ in contrast to formulating it as a differential equation

$$\frac{dX}{dt} = F(X_i, t_i; P)$$

whereby F, the run_timestep, would return the tendency. Consequently, I found some examples where some Euler forward step essentially seems to be hardcoded into the run_timestep function, e.g.

https://github.com/raddleverse/MimiBRICK.jl/blob/84c4bc4a6823c04c0b9467394a2d9822f7cdf105/src/components/thermal_expansion_component.jl#L44

https://github.com/anthofflab/MimiDICE2016R2.jl/blob/3d48bb075455542e61622b78444d927b7557c992/src/components/emissions_component.jl#L30

https://github.com/anthofflab/MimiFAIR.jl/blob/5b334a00ac0492af38e8e1f2a69cde786e561c40/src/components/temperature.jl#L32

I'm just wondering how much control would one have if a formulation as differential equation was preferred, I see the time dimension often defined as 2015:2100 or 2015:ts:2100 or similar, so it seems to me you're using year as unit here but one could use sub-year steps or multiyear steps?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant