Uh oh!
There was an error while loading. Please reload this page.
Radaer api ukca side - part two initialisation - #45
Radaer api ukca side - part two initialisation#45Alan J Hewitt (alanjhewitt) wants to merge 19 commits into
Conversation
Alan J Hewitt (alanjhewitt)
commented
Aug 25, 2026
Hi Mohit, this development is now ready for SciTech review. Alan |
| ! Purpose: | ||
| ! To save structure ukca_radaer_lfric | ||
| ! | ||
| ! --------------------------------------------------------------------- |
There was a problem hiding this comment.
Could ukca_radaer_lfric be declared in the 'struct_mod' itself, avoiding the need for this module? The ukca_radaer_lfric_struct_mod will need to be accessed by calling/ downstream routines in any case.
If module is to be retained: check copyright statement (should be LICENCE file) and add ownership details
There was a problem hiding this comment.
I updated the copyright statement. It would probably be fine to move it into struct_mod but i was a bit wary of creating a circular calling tree, so i put this separately.
| INTEGER(KIND=jpim), PARAMETER :: zhook_in = 0 | ||
| INTEGER(KIND=jpim), PARAMETER :: zhook_out = 1 | ||
| REAL(KIND=jprb) :: zhook_handle | ||
| CHARACTER(LEN=*), PARAMETER :: RoutineName='UKCA_RADAER_LFRIC_INIT' |
| ! Code description: | ||
| ! Language: FORTRAN 90 | ||
| ! This code is written to UMDP3 programming standards. | ||
| ! |
There was a problem hiding this comment.
Check copyright statement (should be LICENCE file).
| IF (lhook) CALL dr_hook(ModuleName//':'//RoutineName,zhook_out,zhook_handle) | ||
| END SUBROUTINE allocate_radaer_lfric_struct | ||
There was a problem hiding this comment.
Does the structure/ instance stay in memory throughout, or is there a need for a 'deallocate' routine?
There was a problem hiding this comment.
This is the initialisation step and these values are needed every run time step. I guess I could deallocate them at he end of the run, but we wouldnt need to free up the extra memory by then.
Alan J Hewitt (alanjhewitt)
commented
Sep 1, 2026
The UM dependencies.yaml file needs updating as a linked PR |
Pierre Siddall (Pierre-siddall)
left a comment
There was a problem hiding this comment.
Hi Alan J Hewitt (@alanjhewitt), once again this looks good just a couple of small changes regarding the names of two variable to make them slightly clearer to understand, then I'll be happy to approve and put this PR into testing along with it's linked PRs.
| INTEGER :: i, j | ||
| ! In-loop copy of mode names | ||
| CHARACTER(LEN=7) :: this_name |
There was a problem hiding this comment.
Maybe this variable would be more informative if it was named like this ?
| CHARACTER(LEN=7) ::this_name | |
| CHARACTER(LEN=7) ::mode_name |
| CHARACTER(LEN=7) :: this_name | ||
| ! In-loop mode type | ||
| INTEGER :: this_type |
There was a problem hiding this comment.
Similarly to the previous comment renaming the variable here would be more informative.
| INTEGER::this_type | |
| INTEGER::mode_type |
PR Summary
This change allows users to change the GLOMAP setting (i_mode_setup) that is passed to RADAER.
Sci/Tech Reviewer: Mohit Dalvi (@mcdalvi)
Code Reviewer: Pierre Siddall (@Pierre-siddall)
This development increases the flexibility of RADAER so that when called from LFRic_apps parent with setting GLOMAP_MODE_UKCA RADAER will run with the setting of i_mode_setup.
When called from LFRic_apps parent with setting GLOMAP_MODE_CLIMATOLOGY RADAER will run with the fixed setting of SUBCOCSSDU_7mode. This preserves the existing functionality but replaces hard coded settings in radaer_kernel_mod.
When called from LFRic_apps parent with setting GLOMAP_MODE_DUST_AND_CLIM UKCA will run with fixed setting DUonly_2modes and RADAER will run with the fixed setting of SUBCOCSSDU_7mode. This preserves the existing functionality but replaces hard coded settings in radaer_kernel_mod.
Lists used by radaer_kernel_mod are SAVED and stored in UKCA modules
n_ukca_mode and n_ukca_cpnt used by radaer_kernel_mod are SAVED and stored in UKCA modules.
Code Quality Checklist
(Some checks are automatically carried out via the CI pipeline)
Testing
I have run UKCA box model test with suite u-dr481
trac.log
From vanilla UM branch with only change dependencies.yaml pointing at this UKCA branch
https://github.com/alanjhewitt/um/tree/radaer_api_um_side_5
Test Suite Results - um - radaer_api_um_side_5/run1
Suite Information
Approvals
Code Owners
Config Owners
No UM Config Owners Required
Task Information
✅ succeeded tasks - 1306
Test Suite Results - lfric_apps - BoB_radaer_api_la_side_5x/run1
Suite Information
Task Information
✅ succeeded tasks - 1602
Security Considerations
Performance Impact
performance measurements have been conducted
AI Assistance and Attribution
Documentation
Sci/Tech Review
Please alert the code reviewer via a tag when you have approved the SR
Code Review