Skip to content

Conversation

@akshaysridhar
Copy link
Member

@akshaysridhar akshaysridhar commented Apr 11, 2025

Pass metric scaling term to RRTMGP solver functions for use within the flux calculations to account for column expansion with altitude in deep-atmosphere configurations.

Also fixes broken OS unit tests due to missing package in test env (Random)

Performance comparison:
(main) : https://buildkite.com/clima/rrtmgp-clima-a100-pipeline/builds/53
(PR) : https://buildkite.com/clima/rrtmgp-clima-a100-pipeline/builds/61
Degradation is approx 0.2%

e.g. build log: https://buildkite.com/clima/climacoupler-coarse-nightly-amip/builds/317/steps

@akshaysridhar akshaysridhar requested review from dennisYatunin, sriharshakandala and szy21 and removed request for szy21 April 11, 2025 20:27
@akshaysridhar akshaysridhar force-pushed the as/scaled-metrics branch 2 times, most recently from a20f92d to 0d94a18 Compare April 11, 2025 22:19
@szy21
Copy link
Member

szy21 commented Apr 11, 2025

While it might be better to change the integration rather than the flux directly in the future, I think this is easier for now and is fine. The only problem I can see is that flux_dn_dir is slightly inconsistent as it doesn't take into account the metric scaling, but it is not important.

@szy21
Copy link
Member

szy21 commented Apr 11, 2025

Is there an easy way to make this backward compatible by e.g. making the default of the metric_scaling one if it's not provided? If not, please open a corresponding PR in ClimaAtmos, so that other people who are running AMIP know what to change if their workflow is affected, thanks!

@akshaysridhar
Copy link
Member Author

akshaysridhar commented Apr 11, 2025

Is there an easy way to make this backward compatible by e.g. making the default of the metric_scaling one if it's not provided? If not, please open a corresponding PR in ClimaAtmos, so that other people who are running AMIP know what to change if their workflow is affected, thanks!

Yes - my current approach is to handle the backward compatibility through RRTMGPInterface in ClimaAtmos (this may need to change soon anyway but we can manage through branching statements in ClimaAtmos if needed)

@akshaysridhar akshaysridhar force-pushed the as/scaled-metrics branch 3 times, most recently from 0237b3b to 5409fb6 Compare April 17, 2025 16:04
@akshaysridhar akshaysridhar force-pushed the as/scaled-metrics branch 8 times, most recently from e1dc057 to 440d3da Compare April 23, 2025 18:21
@akshaysridhar akshaysridhar force-pushed the as/scaled-metrics branch 3 times, most recently from 4726767 to c014707 Compare April 23, 2025 19:51
@akshaysridhar akshaysridhar added enhancement New feature or request Tests labels Apr 23, 2025
@akshaysridhar akshaysridhar requested a review from Sbozzolo April 24, 2025 21:24
@akshaysridhar
Copy link
Member Author

@Sbozzolo your 3 comments have been resolved in the latest commit.

modified:   src/optics/Fluxes.jl
modified:   test/all_sky_with_aerosols_utils.jl
modified:   test/all_sky_with_aerosols_dyamond_gpu_benchmark.jl
modified:   test/clear_sky_utils.jl
modified:   test/clear_sky_dyamond_gpu_benchmark.jl
modified:   test/cloudy_sky_utils.jl
modified:   test/cloudy_sky_dyamond_gpu_benchmark.jl
modified:   test/Project.toml
modified:   test/aqua.jl
@akshaysridhar akshaysridhar merged commit 1282d4b into main Apr 25, 2025
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants