Skip to content

RK45 not working #1516

@daanreijnders

Description

@daanreijnders

The Runge-Kutta45 kernel does not work as expected. I'm using it for 2D advection using output from a 1/12th-degree NEMO run, and time steps explode so that particles end up all over the place. I've prepared a zip with some data and a notebook to illustrate the issue.

Both Parcels 2.4.2 and 3.0.2 exhibit this issue. In Parcels2, I get an OutOfBoundsError that shows that time steps grow to values of: 2457600.0s

The figure below is after 90 days of simple advection, using a single flow field snapshot, so particles should follow streamlines.

image

A suggested improvement would be for users to define a maximum timestep (max_dt). However, I find it strange that the timestep is blowing up so much anyway. Only implementing a maximum timestep doesn't guarantee that the RK45 algorithm works as it should, as it might reduce the algorithm to RK4.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions