-
Notifications
You must be signed in to change notification settings - Fork 27
Reworked Configuration Namelist Access API #175
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
base: main
Are you sure you want to change the base?
Conversation
…mentation refers to.
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 notice that across the board you assign namelist values to variables before using them. Can you confirm this is a choice you've made and that, as functions, they can be used in-line. e.g. call something(value, modeldb%config%my_namelist%other_value().
Yes this is a choice, the values can be accessed in-line. I have extracted them as the variables existed and shortens the actual code so it appears cleaner.
documentation/source/how_it_works/build_system/configurator.rst
Outdated
Show resolved
Hide resolved
documentation/source/how_to_use_it/configuration/using_configuration.rst
Outdated
Show resolved
Hide resolved
documentation/source/how_to_use_it/configuration/using_configuration.rst
Show resolved
Hide resolved
documentation/source/how_to_use_it/configuration/using_configuration.rst
Show resolved
Hide resolved
infrastructure/build/tools/configurator/templates/config_type.f90.jinja
Outdated
Show resolved
Hide resolved
infrastructure/build/tools/configurator/templates/config_type.f90.jinja
Outdated
Show resolved
Hide resolved
infrastructure/build/tools/configurator/templates/extended_namelist_type.f90.jinja
Show resolved
Hide resolved
Co-authored-by: Matthew Hambley <[email protected]>
Co-authored-by: Matthew Hambley <[email protected]>
…f90.jinja Co-authored-by: Matthew Hambley <[email protected]>
…f90.jinja Co-authored-by: Matthew Hambley <[email protected]>
Co-authored-by: Matthew Hambley <[email protected]>
MatthewHambley
left a comment
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.
Not too many changes, some of which may be postponed to later sets.
infrastructure/build/tools/configurator/tests/app_config/empty_mod.f90
Outdated
Show resolved
Hide resolved
infrastructure/build/tools/configurator/tests/app_config/empty_mod.f90
Outdated
Show resolved
Hide resolved
infrastructure/build/tools/configurator/tests/app_config/empty_mod.f90
Outdated
Show resolved
Hide resolved
infrastructure/build/tools/configurator/tests/app_config/empty_mod.f90
Outdated
Show resolved
Hide resolved
infrastructure/build/tools/configurator/tests/app_config/empty_mod.f90
Outdated
Show resolved
Hide resolved
MatthewHambley
left a comment
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.
There's still much to be done to tidy things up but this gets the basic functionality in place.
mike-hobson
left a comment
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.
From a code owner's point of view, this seems fine.
PR Summary
Sci/Tech Reviewer: @allynt
Code Reviewer: @MatthewHambley
This PR is to allow users more direct access to the namelist configuration values from
Fortran object (rather than global module scope) while maintaining it's read-only nature.
e.g.
modeldb%config%<MyNamelist>%MyNamelistMember()This PR is linked to LFRic-core trac ticket #4702, which provides more details on the change itself
Code Quality Checklist
(Some checks are automatically carried out via the CI pipeline)
style guidelines
readability of the code
Testing
using this branch
acceptable (eg. kgo changes)
tests, unit tests, etc.)
and have been allocated to an appropriate testing group (i.e. the
developer tests are for jobs which use a small amount of compute resource
and complete in a matter of minutes)
trac.log
Security Considerations
Performance Impact
performance measurements have been conducted
AI Assistance and Attribution
of Generative AI tool name (e.g., Met Office Github Copilot Enterprise,
Github Copilot Personal, ChatGPT GPT-4, etc) and I have followed the
Simulation Systems AI policy
(including attribution labels)
Documentation
confirmed that it builds correctly
PSyclone Approval
interface, optimisation scripts, LFRic data structure code) then please
contact the
[email protected]
Sci/Tech Review
Please alert the code reviewer via a tag when you have approved the SR
Code Review