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

switching between the namelist options requires a re compile #227

Open
arezoorn opened this issue Nov 28, 2020 · 5 comments
Open

switching between the namelist options requires a re compile #227

arezoorn opened this issue Nov 28, 2020 · 5 comments

Comments

@arezoorn
Copy link

When I added a new namelist configuration to the json files, I had to recompile. Compilation should be independent of the json files except from the compile json file, but I do not think they are. I usually recompile with every change in the json files to be cautious but sometime I forget and I get into trouble.

@rcabell
Copy link
Collaborator

rcabell commented Nov 28, 2020

You should be able to cd to an empty directory and re-run compose on the simulation object. That being said, a recompose option would be nice to have!

@arezoorn
Copy link
Author

The experiment directory should always be non existing, otherwise it will complain that the directory exists. But I am not sure if you mean that by your comment.

@rcabell
Copy link
Collaborator

rcabell commented Nov 28, 2020 via email

@jmccreight
Copy link
Collaborator

The heart of the matter is that the (run-time) model-side namelist goes into the model object and when it is restored, the model-side namelist from compile-time is restored.

I think the most elegant way to handle this is a Model.restore() method which takes an optional model-side namelist path and warns when it is not supplied.

In the mean time, one can manually edit this but it's not very elegant.

@jmccreight
Copy link
Collaborator

Simply recomposing wont solve the problem which is that a pickled model object has a previous model-side name list. Alternatively, pickling the model object could remove that namelist and then the namelist path i suggested previously would be required. There are pros and cons.

I'd have to look, but I'm not sure you can compose twice (without starting over). IE, I think that compose flags something in the simulation object like is_composed.

Composed is a bad term (joe and I argued over this), because the solution is to "recompose" the simulation object (start it over) and then compose to a new/fresh dir.

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