Radaer api ukca side - part one run time - #41
Radaer api ukca side - part one run time#41Alan J Hewitt (alanjhewitt) wants to merge 2 commits into
Conversation
| ! Subroutine Interface: | ||
| ! | ||
| ! Code Owner: Please refer to the UM file CodeOwners.txt | ||
| ! This file belongs in section: TOP_LEVEL |
There was a problem hiding this comment.
For files in the UKCA repo, the owning Section is just 'UKCA'
| l_exclude_lw, & | ||
| l_exclude_sw, & | ||
| ! Modal diameters from UKCA module (input) | ||
| ukca_dry_diam_um, & |
There was a problem hiding this comment.
Given that this is a LFRic-specific routine the '_um' suffix can be dropped.
| aod_ukca_all_modes_um, & | ||
| aaod_ukca_all_modes_um ) | ||
|
|
||
| USE socrates_init_mod, ONLY: n_sw_band, & |
There was a problem hiding this comment.
This will introduce a SOCRATES dependency while building UKCA and interfere with stand-alone applications like the Box model. Is there an alternative way of passing these values?
|
|
||
| USE ukca_radaer_prepare_mod, ONLY: ukca_radaer_prepare | ||
|
|
||
| USE um_physics_init_mod, ONLY: n_radaer_mode |
There was a problem hiding this comment.
um_physics_init_mod will introduce a LFRic dependency in the build. The value could be passed in as a ''configuration'' variable (glomap_config%)
| CHARACTER(LEN=*), PARAMETER, PRIVATE :: ModuleName = 'UKCA_RADAER_LFRIC_API_MOD' | ||
|
|
||
| CONTAINS | ||
|
|
There was a problem hiding this comment.
A placeholder to remind that the routine needs to be exported to LFRic via ukca_api_mod
| l_aod_ukca_cor_ins, l_aaod_ukca_cor_ins | ||
|
|
||
| ! Mass thickness of layers | ||
| REAL, INTENT(IN) :: d_mass_theta_levels_um( npd_profile, npd_layer ) |
There was a problem hiding this comment.
As above the _um suffix should be dropped.
| IF (lhook) CALL dr_hook(ModuleName//':'//RoutineName, zhook_in, zhook_handle) | ||
|
|
||
| !----------------------------------------------------------------------- | ||
|
|
There was a problem hiding this comment.
A explainer on the order of the items (modes?) will help to identify which are valid or invalid for a particular component/species.
|
|
||
| DO k = 1, npd_ukca_aod_wavel | ||
| DO i = 1, npd_profile | ||
| aod_ukca_all_modes_um(i,k,mode_ait_sol-1) = aod_ukca_this_mode_um(i,k) |
There was a problem hiding this comment.
An explanation on why the '-1' for the 3rd index is needed will help understanding. Will future additions to modes or change in order mean re-writing the indices?
|
|
||
| DO k = 1, npd_ukca_aod_wavel | ||
| DO i = 1, npd_profile | ||
| aod_ukca_all_modes_um(i,k,mode_acc_sol-1) = aod_ukca_this_mode_um(i,k) |
There was a problem hiding this comment.
See above, using '-1' for indexing
PR Summary
Sci/Tech Reviewer: Mohit Dalvi (@mcdalvi)
Code Reviewer: Yaswant Pradhan (@yaswant)
I developed the original lfric to radaer functionality in 2020. Like a lot of developments back then, it was needed in a hurry and so I developed a fudged solution with technical debt.
We will need user flexibility soon to be able to run radaer with different user settings, hence this part one of two development.
In part one, I have introduced the user flexibility that is required for run time. Its already a very large change, and this is a natural break point for splitting a big PR.
Some hard-coded settings remain in the development (on the ukca side, this is values like i_cpnt_index), which will be removed in the part two ticket to develop the initialisation stage functionality.
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