Code Monkey home page Code Monkey logo

Comments (5)

glwagner avatar glwagner commented on August 28, 2024

Maybe we should take a step back and think about what our goal is? What do we want from this system? Will this simplify the MITgcm algorithm?

from oceananigans.jl.

ali-ramadhan avatar ali-ramadhan commented on August 28, 2024

I think broadcasting for same-field operators, e.g. CellField .+ CellField would be really useful and make the code more readable. The simplification here is fewer loops to look at which is a big plus I think.

But cross-field broadcasting is a bit trickier so might be better to leave it unimplemented especially as it's not a very common operation, I only use it when adding f .* v to Gu or f .* u to Gv. Without it you would have to explicitly write u .+ avgx(avgy(v)) so if you forget it then it might make finding the bug a bit harder. With it, you can just write u .+ v with the averaging happening behind the scenes, so you might apply it by mistake without realizing it. Another potentially difficult bug to find.

I feel like everyone has a different opinion on this but in my mind, I'm thinking this would make the code easier to read and write (short-term), and ultimately easier to extend by users (long-term).

I just sometimes use issues leave random TODO notes and ramble.

from oceananigans.jl.

ali-ramadhan avatar ali-ramadhan commented on August 28, 2024

Will not implement cross-field operations for now, e.g. FaceFieldX .+ CellField. Too complex and rarely used.

from oceananigans.jl.

ali-ramadhan avatar ali-ramadhan commented on August 28, 2024

Reopening as this is becoming relevant for online diagnostics which may need a lot of these operations. E.g. w*T as @glwagner points out.

from oceananigans.jl.

ali-ramadhan avatar ali-ramadhan commented on August 28, 2024

This was resolved in PR #463.

from oceananigans.jl.

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.