Improved PC2 "smooth" initiation option#404
Improved PC2 "smooth" initiation option#404MichaelWhitall wants to merge 11 commits intoMetOffice:mainfrom
Conversation
…e um branch for me!
…fail checks against existing meta-data as using the new option 'smooth_fix' under the existing multip-option switch 'pc2_init_logic'.
…ax error about the template character if before).
| compulsory=true | ||
| description=Options for where to allow PC2 initiation to operate | ||
| !enumeration=true | ||
| help=(1) Original logic; |
There was a problem hiding this comment.
This meta-data was copied from the UM previously. I just spotted that it still refers to the allowed integer values for this multi-option switch in the UM. The LFRic namelists now accept character strings for multi-option switches instead of the integers. So I've replaced the confusing integers with the appropriate character strings here.
| @@ -437,11 +438,11 @@ subroutine pc2_bm_initiate( & | |||
|
|
|||
| alphl=repsilon*lc/r | |||
|
|
|||
There was a problem hiding this comment.
I have re-imported this file into lfric_apps from my equivalent UM branch and then ran the lfric code-styling script to make the code-style consistent (i.e. lower-case the UM's capitalised fortran keywords). However, clearly the lfric code-styling script has been modified since the original import of this file from the UM. The styling script formerly lower-cased fortran keywords within OMP directives (but not the other OMP keywords). But it now just leaves OMP directives alone. This means my re-import and rerunning of the styling script has re-capitalised the fortran keywords in OMP directives. But I've decided to just leave this as-is; the OMP directives are clearer if consistently all capitalised, rather than having a confusing mix of lower / upper case for different words!)
James Bruten (james-bruten-mo)
left a comment
There was a problem hiding this comment.
Macro approved
PR Summary
Sci/Tech Reviewer:
Code Reviewer: Alistair Pirrie (@mo-alistairp)
In the PC2 cloud-scheme, "initiation" is the process of creating new cloud based on a call to the diagnostic cloud-scheme. Under the existing "smooth" initiation option, the cloud liquid water content from the diagnostic scheme is taken as a minimum limit on the prognostic cloud water each timestep (so the diagnostic scheme only applies if the prognosed cloud-water falls below the diagnostic scheme's prediction). However, the cloud fraction was only relaxed partially towards the diagnostic scheme's prediction, as a function of how much cloud water has been added by initiation. This led to a problem where initiation would systematically increase cloud-water by a larger proportion than cloud-fraction, so that in-cloud water content spuriously increases.
The new PC2 initiation option avoids this problem by imposing the diagnostic cloud-scheme's predicted cloud-fraction as a hard limit on the prognosed cloud-fraction instead of relaxing partially towards it, so that cloud water content and fraction are both handled consistently.
Branch at vn3.1: vn3.1_pc2_init_logic_cflim
Test branch: pc2_init_logic_cflim_test
closes #249
Code Quality Checklist
****I checked this by searching for the names of files I modified in the job.err file from thebuild_lfric_atm_azspice_gnu_full-debug-32bitcompile in rose-stem. I could only find compiler warnings related to pre-existing issues (numerous instances ofPossible change of value in conversion from REAL(8) to REAL(4)where arrays are copied inbl_imp2_kernel_mod).**Thecheck_cr_approvedCI check is clearly not going to complete successfully until the code review has been approved.Testing
***The newpc2_init_logicoption has been switched on in thecomorph_devrose-stem app to test the new functionality. Therefore all the rose-stem tests of this configuration have changes answers.trac.log
Test Suite Results - lfric_apps - pc2_init_logic_cflim_test/run1
Suite Information
Task Information
❌ failed tasks - 6
⌛ waiting tasks - 2
Note: I have intentionally left the update of KGO checksums out of the test branch, so that those tests which change KGO show-up above as failures in the
check_lfric_atmtasks for clarity. These tasks would not fail on the dev branch as the KGO files have been updated there.Security Considerations
NANAPerformance Impact
Not expecting any significant performance impact.
AI Assistance and Attribution
NOTE: I initially tried to get Met Office Github Copilot to port the code-changes I had already made in a UM branch into the lfric_apps branch for this PR. Copilot's attempt at this can be seen in the first 2 commits in the branch, 87c9ffc and eed3190 (hence those commits are not verified). However, this was a failure; copilot inexplicably deleted most of the contents of one file, and then did not attempt the rest of the changes. I made the 3rd commit 7b102da which simply reverts the changes made by Copilot, and then ported the changes manually in the subsequent commits.
Documentation
Documentation pending...
PSyclone Approval
Sci/Tech Review
(Please alert the code reviewer via a tag when you have approved the SR)
Code Review