Giter Site home page Giter Site logo

Comments (3)

Jacketless avatar Jacketless commented on August 10, 2024

I'll take a look into this over the next few days- I think it would be a good way for me to get into the particle class and resulting netcdf files. I'm likely to be working on this kind of functionality a lot in parcels I imagine.

from parcels.

mlange05 avatar mlange05 commented on August 10, 2024

I think automatically sampling and outputting each additional field on a grid is too much defaulting, since it will make it very easy to "accidentally blow-up" the output file and adds a lot of invisible "behind the curtain" behaviour. It also requires us to automatically insert particle.var = grid.Var[time, particle.lon, particle.lat] into at least one kernel executed per output timestep, which will be very awkward to do right when executing kernel chains.

Instead I would propose to have a list of "output variables" on user-defined Particle classes that defaults to all user_vars. This way output gets triggered by adding variable var to a kernel class, but users have to insert the sampling call themselves. It also gives users control over the output file, allowing them to "slim it down" if they wish to do so. I would also note that ultimately we probably want to derive user_vars automatically by inspecting the kernel objects, meaning that adding the sampling call will automatically trigger output, but that is only a syntactic shortcut to be added later.

from parcels.

erikvansebille avatar erikvansebille commented on August 10, 2024

Fixed with particle-sampling PR

from parcels.

Related Issues (20)

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.