Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Automated creation of new model interfaces #349

Closed
hkershaw-brown opened this issue May 11, 2022 · 1 comment · Fixed by #376
Closed

Feature request: Automated creation of new model interfaces #349

hkershaw-brown opened this issue May 11, 2022 · 1 comment · Fixed by #376
Assignees

Comments

@hkershaw-brown
Copy link
Member

Use case

A user wants to add a new model, where do they start from?

Is your feature request related to a problem?

When a user wants to add a new model interface (model_mod) to DART they typically copy an existing model_mod. This has a few unwanted side effects:

  • Copied code from an existing model is not necessary relevant to the new model (code is messier than it needs to be)
  • Users are not necessarily getting the latest code/best practices (creates more work for DART developers during pull requests)
  • Copied documentation can be misleading (it looks up to date, but it is for another model)

Describe your preferred solution

Create a script that automatically sets up a clean model interface for users to start developing and writing their documentation. I believe with good template files for model_mod.f90 we can have a model interface that compiles from the get-go ( note: this may not be true).

Here is a spec:
https://docs.google.com/document/d/1u1v6MoGIQTKSRIxzeCESJMVOu-hU7DFpCU-eTNDbQt4/edit?usp=sharing

Describe any alternatives you have considered

I think we just need code that writes code.

@hkershaw-brown
Copy link
Member Author

hkershaw-brown commented Jul 13, 2022

Next steps:

  • Use shell check to check the bash scripts https://www.shellcheck.net/ This may suggest some changes to the scripting.

  • For the readme.rst created in work - something sensible here for a skeleton documentation. This could be:

    ==============
    Name of the model
    ===============
    
    .. attention::
        Add your model documentation here.
    
    

    Note we do want to keep the template/readme.rst because this is the documentation: https://docs.dart.ucar.edu/en/latest/models/template/readme.html
    so you'll need to create template/new_model.rst -> work/readme.rst

  • create a oned model_mod.f90 and input.nml template. You can take a look at lorenz_96 for a working 1d model mod. The goal is to have a template version similar to the template/model_mod.f90( works for threed_sphere) that you can compile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants