Conversation
…drabenh/gcm_v12-rc1
…peter Fix uninit variables in Solar
…t for solar and irrad
…per_band_instrumentation # Conflicts: # GEOS_RadiationShared/rad_utils.F90 # GEOSirrad_GridComp/GEOS_IrradGridComp.F90 # GEOSsolar_GridComp/GEOS_SolarGridComp.F90
…into feature/sdrabenh/gcm_v12-rc1
…per_band_instrumentation-merge-scott
…nto feature/sdrabenh/gcm_v12-rc1
…per_band_instrumentation-merge-scott
…trumentation-merge-scott Add per-band output for RRTMGP as well
v12: Fix issue with COT calculations
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.
… compute_lw_cloud_optics_mcica
Add OpenMP hybrid parallelism to RRTMGP-LW block loop in LW_Driver
Update current v12 with v1.12.0
Merge GCM v12 codebase into develop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR pulls
developintomainfor a new release for v12.