Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Implement
from_namelist
method #43Implement
from_namelist
method #43Changes from 12 commits
3791e8f
5375197
76b1722
71d11e5
e074650
749c16a
b1a3c0e
0da64b5
8ac4c72
72f0434
4dc3417
82ca98d
2a1d06b
c0dfd5c
52ac3fb
066adce
c68bdf7
a9ecfe5
9f7e188
54e1b24
4b7578d
2dc3e23
271d7cd
501c120
abdb9f2
c485512
18b82fa
2165ab7
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can now move
_check_namelist_entries
inZgr
, so we run the exact same checks to the namelists and the arguments of our classes. (I think we just have to make a small change to support optional arguments).This is why I'm using
isinstance(value, int)
which is a less strict check compared totype(value) == int
.For example,
isinstance(True, int)
isTrue
which is OK forpydomcfg
although NEMO would probably complain.But I think it makes sense to use
isinstance
as we are not creating namelists to feed into NEMO.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@malmans2 I guess this is where nml_meld will diverge then as
1 != .true.
in NEMO speak. But I think that's fine.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, if eventually pydomcfg will make use of nml_meld, I think we just need an extra argument list
isinstance=True
for pydomcfg butFalse
by default.