Issue 35 co2 interactive#37
Open
Rob Waters (RobWatersMet) wants to merge 4 commits into
Open
Conversation
Author
Option 1 - Always allocate it
Option 2 - Make it a module variable
Option 3 - Make the dummy allocatable (preferred option)
|
Author
reshaping required & allocation guard addedI've also made it consistent against all 3 interfaces. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
PR Summary
Sci/Tech Reviewer:
Code Reviewer: Sam Clarke-Green (@t00sa)
so the CO2 environmental field is held in a co2_interactive variable
CO2 is only added to fld_names if ukca_config%l_chem_environ_co2_fld
It is then allocated
But then in
ukca_main1it is passed in unconditionally intoukca_chemistry_ctlandukca_chemistry_ctl_fullas an input variable. Inside both ctl files it has the following intent:so it is an explicit shaped array dummy variable - which needs to have been allocated.
Fortran standards:
However some compilers consider it fine and others don't - seems like GNU in particular doesn't allow it.
Code Quality Checklist
(Some checks are automatically carried out via the CI pipeline)
readability of the code
Testing
stem suites
acceptable (eg. kgo changes)
tests, unit tests, etc.)
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
Sci/Tech Review
Please alert the code reviewer via a tag when you have approved the SR
Code Review