Skip to content

GitFlow: Merge develop (v12) into main#92

Merged
mathomp4 merged 102 commits into
mainfrom
develop
May 27, 2026
Merged

GitFlow: Merge develop (v12) into main#92
mathomp4 merged 102 commits into
mainfrom
develop

Conversation

@mathomp4
Copy link
Copy Markdown
Member

This PR pulls develop into main for a new release for v12.

dr0cloud and others added 30 commits April 12, 2024 14:16
…per_band_instrumentation

# Conflicts:
#	GEOS_RadiationShared/rad_utils.F90
#	GEOSirrad_GridComp/GEOS_IrradGridComp.F90
#	GEOSsolar_GridComp/GEOS_SolarGridComp.F90
…trumentation-merge-scott

Add per-band output for RRTMGP as well
wmputman and others added 25 commits March 2, 2026 12:29
Replaces the two-phase nBlocks computation and the in-loop partial-block
dealloc/realloc with a single ceiling-division nBlocks and per-iteration
alloc/dealloc sized to ncols_block = min(rrtmgp_blockSize, remaining).
Removes partial_block and partial_blockSize variables. Simplifies
urand(:,:,1:ncols_block) slices to plain urand now that the array is
exactly sized. No semantic change -- pure refactoring prerequisite for
subsequent subroutine extraction targeting OpenMP parallelism.

Refs: GEOS-ESM/GEOSgcm_GridComp#1387
Pulls gas_concs%get_subset and k_dist%gas_optics into a new module-level
subroutine compute_gas_optics. gas_concs_block and error_msg become locals
(thread-private in future OMP use). TEST_ is bracketed with #define/#undef
since the macro is undef'd before this point in the file. No semantic change.

Refs: GEOS-ESM/GEOSgcm_GridComp#1387
Pulls aerosol optical property loading, renormalization, and value clamping
into a new module-level subroutine compute_aer_optics. The need_aer_optical_props
guard becomes an early return inside the subroutine. taua/ssaa/asya pointer
arrays are passed as assumed-shape intent(in) dummies. No semantic change.

Refs: GEOS-ESM/GEOSgcm_GridComp#1387
…ed polymorphic dummy

In PROCESS_RRTMGP_BLOCK, aer_props is only allocated when need_aer_optical_props
is true. Passing an unallocated polymorphic class allocatable to a non-allocatable
dummy argument (as compute_rte_sw was doing) is undefined behaviour and caused a
runtime crash when aerosols were inactive.

Fix: remove aer_props and need_aer_optical_props from compute_rte_sw's interface;
perform the aer_props%increment(optical_props) call at the PROCESS_RRTMGP_BLOCK
call site, guarded by the need_aer_optical_props check, where aer_props is known
to be allocated.
Passing an unallocated polymorphic allocatable to a non-allocatable
dummy argument is undefined behaviour. Guard the call with
need_aer_optical_props so aer_props is always allocated when passed.
Add OpenMP hybrid parallelism to RRTMGP shortwave block loop
Replace two-phase nBlocks+partial_block pattern with ceiling division
so every iteration is structurally identical. Per-block objects
(optical props, sources, cloud/aer scratch arrays) now allocated at
top of each iteration and freed at bottom. Prerequisite for subroutine
extraction and OMP PARALLEL DO.
Move aerosol optical property loading and normalization out of the
block loop body into a module-level sibling subroutine. Call site
guarded by need_dirty_optical_props so aer_props is always allocated
when passed.
Add OpenMP hybrid parallelism to RRTMGP-LW block loop in LW_Driver
@mathomp4 mathomp4 self-assigned this May 27, 2026
@mathomp4 mathomp4 requested review from a team as code owners May 27, 2026 14:24
@mathomp4 mathomp4 added the Non 0-diff The changes in this pull request are non-zero-diff label May 27, 2026
@mathomp4 mathomp4 merged commit cd53063 into main May 27, 2026
5 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Non 0-diff The changes in this pull request are non-zero-diff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants