-
Notifications
You must be signed in to change notification settings - Fork 58
Radaer seg #191
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
base: main
Are you sure you want to change the base?
Radaer seg #191
Conversation
|
Hi Chirs, I migrated the development from fcm. There are some outstanding tasks before this development is ready. Obtain timings for one, two, four threads. Replace hand edited OpenMP directives in the radaer kernel with psyclone transformation functionality. Replace the hard coded segment size ukca_radaer_segment_size with a namelist item of the same name. Add an integer namelist control option i_radaer_openmp to decide if we apply OpenMP in radaer. Alan |
PR Summary
Sci/Tech Reviewer:
Code Reviewer: @Pierre-siddall
Developments included in this ticket
RADAER FULL DOMAIN
Reinitialise um_size: Set um_size to the number of horizontal cells before invoking the RADAER kernel, and reset it to 1 after the invocation.
Switch operation mode: Change the mode from column to domain in radaer_kernal_mod.F90 so that Psyclone can recognise the update, automatically generate the radaer_alg_mod_psy.f90 file, and provide suitable arguments for all subroutines. This enables the full horizontal and vertical domain data transfer to the RADAER code.
Update variable dimensions: Adjust variable sizes in radaer_kernal_mod.F90 to accept whole-domain data. A do loop was then introduced to initialise variables passed into key RADAER subroutines and to store the computed results, that involved a change of the data structure extents and associated loops from an "I-first" to a "K-first" approach.
Bug fix
Both the p_theta_levels and t_theta_levels pass the wrong number of dimensions to ukca_radaer_prepare.
Rafactor radaer kernel
In order to limit the number of times we switch from I-first to K-first addressing, I have made a UKCA side interface module that calls all of the UKCA side science code. I also reordered the sequence of I-first to K-first addressing.
Segmentation
All of the arrays passed to the UKCA side are now allocatable, so that correct segments can be passed with each iteration of the segmentation loop. The order of deallocation is the reverse order of allocation to prevent memory striding.
The I-first to K-first addressing changes from #841 full domain have been refactored so that the memory points to the part of memory associated with the segment for each iteration of the segment loop. This was complicated and is difficulty to describe in words, but I think will make sense when looking at the code change.
For short wave only, radaer_band_average does not need to be called for nightside segments, and this is a considerable cost save. We determine if any of the columns within each segment are on the dayside or not and pass that information to the UKCA interface code. This logical is calculated inside the segmentation loop.
Similirly, as the AOD diagnostics are optional, we only have to call the diagnostic modules if they are requested. I gather this information outside the segmentation loop.
Code Quality Checklist
Testing
trac.log
Security Considerations
Performance Impact
AI Assistance and Attribution
Documentation
PSyclone Approval
Sci/Tech Review
(Please alert the code reviewer via a tag when you have approved the SR)
Code Review