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

Wrapper for run_glm to override nml settings without writing a new nml #231

Open
jsta opened this issue Jun 12, 2017 · 2 comments
Open

Wrapper for run_glm to override nml settings without writing a new nml #231

jsta opened this issue Jun 12, 2017 · 2 comments

Comments

@jsta
Copy link
Member

jsta commented Jun 12, 2017

I could see some utility in being able to override nml settings without manually writing a new nml file. Then you wouldn't have so many nml files cluttering up the working directory. One way this could work is to:

  • copy the existing nml file to a tempfile
  • overwrite the specified portion of the nml file with write_nml
  • redirecting run_glm to the modified file

run_glm(sim_folder = ".", ...)

where the ... is a pass-through to set_nml

Is this a bad work-flow idea?

@lawinslow
Copy link
Member

Hmm, interesting idea. To keep the dependencies simple, it might be better to create a function in glmtools that takes an NML object, writes it, and then runs GLM against it. Maybe run_nml. That function would live in glmtools and wrap write_nml, set_nml, and run_glm. That would prevent us from having a dependency point GLMr -> glmtools.

run_nml(nml, run_dir=',', ...)

Maybe with ... pass-through to set_nml.

@jordansread
Copy link
Member

Yeah, I've always wanted something like that too...

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

No branches or pull requests

3 participants