Giter Club home page Giter Club logo

l96-visualization's People

Contributors

raspstephan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

l96-visualization's Issues

Shifting with np.roll( )

Dear Stephan,

Thanks a lot for making the code publicly available! It has been very helpful to me!

Is it possible that np.roll(X, shift_param) shifts in the opposite direction of what is intended?

Example:

print(initX[0:5])
> [7.22218496 2.99854488 1.42502222 3.22644313 3.42971768]
print(np.roll(initX[0:5], -1))
> [2.99854488 1.42502222 3.22644313 3.42971768 7.22218496]

I think this thus gives $x_{k + 1}$ not $x_{k -1}$ for the multiplier in the advection term from https://towardsdatascience.com/lorenz-96-is-too-easy-machine-learning-research-needs-a-more-realistic-toy-model-6add938f6cc0 for example.

Should thus the shift parameters be negated and changed to the following?

    def _rhs(self, X):
        """Compute the right hand side of the ODE."""
        dXdt = (
                - np.roll(X, 1) * (np.roll(X, 2) - np.roll(X, -1)) -
                X + self.F
        )
        return dXdt

I am unsure if this actually changes much as the ordering of the k X variables/X states is arbitrary.

Thanks in advance,
Kim

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.