CliMA / RRTMGP.jl

A Julia implementation of Rapid and accurate Radiative Transfer Model for General Circulation Models.
https://clima.github.io/RRTMGP.jl/latest/
Apache License 2.0
57 stars 4 forks source link

Replace exponential function in gray source calculations #467

Closed sriharshakandala closed 6 months ago

sriharshakandala commented 6 months ago

Purpose

Replace exponential function in gray source calculations


sriharshakandala commented 6 months ago

Performance on A100:

Current main branch:

Gray atmosphere longwave test with ncol = 4096, nlev = 61, OPC = OneScalar
device = ClimaComms.CUDADevice()
Integration time = 40.0 years

t_error = 0.01992161769041445; flux_grad_err = 9.998547469081132e-6

 45.436345 seconds (23.26 M allocations: 1.497 GiB, 2.24% gc time, 31.11% compilation time: 3% of which was recompilation)

Gray atmosphere longwave test with ncol = 4096, nlev = 61, OPC = TwoStream
device = ClimaComms.CUDADevice()
Integration time = 40.0 years

t_error = 0.021879060833327912; flux_grad_err = 9.998608362593586e-6

 35.682842 seconds (4.65 M allocations: 244.286 MiB, 0.24% gc time, 1.65% compilation time)

This branch:

Gray atmosphere longwave test with ncol = 4096, nlev = 61, OPC = OneScalar
device = ClimaComms.CUDADevice()
Integration time = 40.0 years

t_error = 0.01992161769041445; flux_grad_err = 9.998547469081132e-6

 43.362191 seconds (23.26 M allocations: 1.497 GiB, 2.37% gc time, 33.04% compilation time: 2% of which was recompilation)

Gray atmosphere longwave test with ncol = 4096, nlev = 61, OPC = TwoStream
device = ClimaComms.CUDADevice()
Integration time = 40.0 years

t_error = 0.021879060834208985; flux_grad_err = 9.998608362593586e-6

 32.715834 seconds (4.70 M allocations: 246.089 MiB, 0.33% gc time, 1.93% compilation time)