Skip to content
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

Efficiency improvements for CAM physics #44

Open
nusbaume opened this issue Oct 11, 2021 · 0 comments
Open

Efficiency improvements for CAM physics #44

nusbaume opened this issue Oct 11, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@nusbaume
Copy link
Collaborator

nusbaume commented Oct 11, 2021

This issue has been created to be a location where people can list possible efficiency modifications to various physics schemes that currently can't be applied due to the need to maintain bit-for-bit (b4b) reproducibility with the results from CAM.

Once all of the various schemes needed to reproduce CAM have been converted and verified, then these efficiency improvements can be applied.

To start, in apply_heating_rate_run in utilities/physics_tendency_updaters.F90, instead of doing:

 do klev = 1, nz
    temp(:, klev) = temp(:, klev) + (heating_rate(:, klev) * dt / cpair)
    dTdt_total(:, klev) = dTdt_total(:, klev) + (heating_rate(:, klev) / cpair)
 end do

One could do:

 cpair_inv = 1._kind_phys/cpair
 do klev = 1, nz
    temp(:, klev) = temp(:, klev) + (heating_rate(:, klev) * dt * cpair_inv)
    dTdt_total(:, klev) = dTdt_total(:, klev) + (heating_rate(:, klev) * cpair_inv)
 end do

which would reduce the number of (relatively more expensive) division calculations that are performed.

Feel free to add to this issue if any other efficiency improvements that could produce round-off changes are found.

@nusbaume nusbaume added the enhancement New feature or request label Oct 11, 2021
@nusbaume nusbaume added this to To do in atmospheric_physics development via automation Oct 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

1 participant