Git Product home page Git Product logo

Comments (5)

rgieseke avatar rgieseke commented on June 3, 2024

Two ideas/questions:

Couldn't MAGICC.__init__() detect the version? If root_dir is not None it will try to detect the version?

Could we get the MAGICC core devs agree to a convention to call MAGICC7 binaries magicc7.exe or magicc7?

from pymagicc.

lewisjared avatar lewisjared commented on June 3, 2024

It can be even simpler if we don't have to detect the version, but rather explicitly define it. I like the idea of being able to do the following:

from pymagicc import MAGICC6, MAGICC7
with MAGICC6() as p:
    p.run()

with MAGICC7 as p:
    p.run()

For that to work we have to track two separate MAGICC installations and pass either a version or path to MAGICC.__init__(). The default settings will work for 9/10 users

The code could look something like:

class MAGICC7(MAGICC):
    version = 7
    executable = config['MAGICC7_EXECUTABLE']

class MAGICC6(MAGICC):
    version = 6
    executable = config['MAGICC6_EXECUTABLE']

from pymagicc.

lewisjared avatar lewisjared commented on June 3, 2024

The executable naming is a @znicholls question

from pymagicc.

znicholls avatar znicholls commented on June 3, 2024

I really like the idea of 'with class as x' statements.

We can call magicc executable whatever you want. Just let me know and I'll recompile. Malte won't care either, he either seperately compile or change the one line he needs to in his wrappers

from pymagicc.

lewisjared avatar lewisjared commented on June 3, 2024

I have added the MAGICC6 and MAGICC7 classes in #32. Some feedback would be great!

from pymagicc.

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.