-
Notifications
You must be signed in to change notification settings - Fork 161
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
Hotfix for RRTMGP using multiple threads #247
Hotfix for RRTMGP using multiple threads #247
Conversation
Please add Qinfu Liu as a reviewer |
Dusan,
Thank you very much. I will start reviewing the code changes.
Qingfu
…On Tue, Feb 23, 2021 at 1:04 PM Dusan Jovic ***@***.***> wrote:
@DusanJovic-NOAA <https://github.com/DusanJovic-NOAA> requested your
review on: #247 <#247> Hotfix for
RRTMGP using multiple threads.
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
<#247 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGTS6UQZEBFM3F7BVYW3M53TAPUZLANCNFSM4XW7NPHA>
.
|
@@ -6438,6 +6437,14 @@ subroutine interstitial_create (Interstitial, IM, Model) | |||
allocate (Interstitial%toa_src_sw (IM,Model%rrtmgp_nGptsSW)) | |||
allocate (Interstitial%toa_src_lw (IM,Model%rrtmgp_nGptsLW)) | |||
allocate (Interstitial%active_gases_array (Model%nGases)) | |||
! ty_gas_concs |
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.
Obviously %ncol and %nlay are fixed throughout the run.
What about gas_name, concs, conc? Do they depend on each grid, and if yes, do they need to be persistent? If not, then we should add them to the %rad_reset calls for the DDT (for clarity) - in the next PR. If they need to be persistent, they need to be moved to radtend or something like that (also in the next PR).
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.
@climbfuji
I set the ncol and nlay here once in the DDT, type-bound procedures rely on it later.
gas_concentrations(ty_gas_concs) should be added to rad_reset. I will make sure to include this in my next PR.
This PR contains several changes to the initialization and setup of the RRTMGP radiation scheme to allow for use across multiple openMP threads.
*) Moved Interstitial RRTMGP DDTs (ty_rrtmgp_gas_optics, ty_cloud_optics) to static fields defined during initialization in module memory.
*) Add "$omp critical" statements around the calling type-bound procedures during initialization.
*) Move allocation of ty_gas_conc from Interstitial to GFS_typedefs. Initialize ty_gas_concs for all blocks during initialization.
This issue was brought to our attention by @yangfanglin and Qingfu Liu at EMC while testing RRTMGP in high-resolution cases, which require multiple threads.
The GP regression tests on hera using Intel were successful.
There are no changes to the baselines
Waiting on NCAR/ccpp-physics#568