Classical Runge-Kutta 4th Order Integration

I’ve been using the “rk4” solver, with luck, to solve the system of ODE’s translated from Stella. The original authors of the translation script used this setting, though I’m not entirely sure what it does. Is this the same type of solver that Stella uses? Looking back at the doc, I have flashbacks to my […]

Continue reading..Classical Runge-Kutta 4th Order Integration

Using dede() from the deSolve package in R

The problem is, it seems the delay slows things down a lot. I found out the reason is because the lag variables calculated in dede() during integration indeed are calculating the lags of all the state variables, and there’s no way around it. I’m curious if the lag() R function would work while it was […]

Continue reading..Using dede() from the deSolve package in R

Google Earth Engine: GIS of the Future!

This is so nuts to me: one of my supervisors introduced me to Google Earth Engine, and we’ve been playing with it for our spatial analyses. It’s imagery/spatial analysis in the cloud, with the tagline “letting scientists focus on science instead of downloading and managing data.” Well, Google, you have my attention. The intro video […]

Continue reading..Google Earth Engine: GIS of the Future!

Using ode() from the deSolve Package in R

My latest adventures have revolved around solving ordinary differential equations (ODE’s), for the most part, in R. To do this, I’ve been using the ode() function from the deSolve package. In the next step of what I’m trying to do, though, it seems I need dede() for delayed differential equations. From what I understand, you […]

Continue reading..Using ode() from the deSolve Package in R

Part 2: Fixing the Stella R Python Script

Background Welcome to my continued adventures in translating Stella models to R. To catch you up in case you haven’t been following along (i.e. a high probability that this applies to you) I’ve been retooling the StellaR.py script that I found on the internet. The latest version on the linked site is buggy and old, […]

Continue reading..Part 2: Fixing the Stella R Python Script

Part 1: Fixing the Stella R Python Script

To fix along yourself, first download StellaR.py v. 1.3. First, I’ll start with in-place changes so I can reference the original line numbers. Line 321 needs an added test to see if there’s really anything “to” the model, even if the INIT is found: if init_match and len(lines[i-1].strip().split()[6:-2]) > 0: Line 354: I added the […]

Continue reading..Part 1: Fixing the Stella R Python Script