-
Notifications
You must be signed in to change notification settings - Fork 6
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
Offline driver initialisation refactor continued #472
Offline driver initialisation refactor continued #472
Conversation
8869691
to
03fc10d
Compare
Note: testing with |
96bf22c
to
b38ae68
Compare
@SeanBryan51 Overall looks quite good! Very nice to see the code becoming simpler and easier to understand. I'm afraid I had forgotten to merge #469, but that's now done. Would you mind rebasing your branch onto main so that it's a bit easier to review the detailed changes? |
93bad75
to
e402038
Compare
@micaeljtoliveira rebased off main |
@SeanBryan51 Thanks for rebasing. Not much else to say at this point, all looks quite good :) Are you planning on doing more changes in this PR? |
@micaeljtoliveira I have a couple small commits coming which refactor the initialisation of |
893d692
to
6a12e9d
Compare
@micaeljtoliveira no more changes from this point - ready for review |
I've tested these changes with PBS log file:
Benchcab version:
Spatial (MPI) runs all execute as expected (note outputs do not reproduce as per issue #463). |
6a12e9d
to
6c0c386
Compare
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.
All good. A suggestion to improve the text for the documentation.
l_casacnp = icycle > 0 | ||
|
||
IF (l_casacnp .AND. (icycle == 0 .OR. icycle > 3)) THEN | ||
STOP 'icycle must be 1 to 3 when using casaCNP' | ||
END IF |
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.
This block is highly dependent on the previous block copied below:
IF (icycle > CASAONLY_ICYCLE_MIN) THEN
icycle = icycle - CASAONLY_ICYCLE_MIN
CASAONLY = .TRUE.
CABLE_USER%CASA_DUMP_READ = .TRUE.
CABLE_USER%CASA_DUMP_WRITE = .FALSE.
happening so that if icycle=12
in the namelist for example, it still works and doesn't error.
But you are quite right that this l_casacnp
and icycle
stuff need a rethink.
Add new namelist options: filename%new_sumbal filename%trunk_sumbal
The NEWUNIT specifier is introduced to remove magic numbers used for file units.
…mand-line to cable_driver_init
The optional namelist parameter `CASAonly` is restored for consistency with the documentation.
Note LALLOC is not added as a namelist switch for this change as this should be acompanied with a description of the behaviour of LALLOC (which I am not familiar with). However, LALLOC is declared as a module variable so that it can be easily added as a namelist switch.
6c0c386
to
7511139
Compare
…#498) This change further consolidates the initialisation logic within the offline drivers (in particular logic related to `cable_user%MetType`) to remove code duplication and improve code clarity across each of the drivers (see #425, #440, #469 and #472). As part of the refactoring changes, the `cable_user%MetType = 'gpgs'` namelist parameter is deprecated as it is equivalent to setting `cable_user%MetType = 'gswp'` and `leaps = .TRUE.`. ## Type of change - [x] Code refactor - [x] New or updated documentation ## Checklist - [x] The new content is accessible and located in the appropriate section. - [x] I have checked that links are valid and point to the intended content. - [x] I have checked my code/text and corrected any misspellings <!-- readthedocs-preview cable start --> ---- 📚 Documentation preview 📚: https://cable--498.org.readthedocs.build/en/498/ <!-- readthedocs-preview cable end -->
This change further consolidates the initialisation logic within the offline drivers to remove code duplication and improve code clarity across each of the drivers (see #425, #440 and #469).
As part of the refactoring changes, new optional namelist options (
filename%new_sumbal
andfilename%trunk_sumbal
) are introduced to replace hard coded filenames and optional namelist optionCASAonly
is restored for consistency with the documentation.Type of change
Checklist
📚 Documentation preview 📚: https://cable--472.org.readthedocs.build/en/472/