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

SE and Null dycores using wrong kind for physics timestep #320

Open
nusbaume opened this issue Nov 6, 2024 · 0 comments
Open

SE and Null dycores using wrong kind for physics timestep #320

nusbaume opened this issue Nov 6, 2024 · 0 comments
Labels
bug Something isn't working correctly misc Issue that can be included in a miscellaneous PR

Comments

@nusbaume
Copy link
Collaborator

nusbaume commented Nov 6, 2024

What happened?

In the registry the timestep_for_physics variable is defined with a kind of kind_phys. However, when that variable is set with the SE and null dycores it assumes that the kind is r8, and does no conversion from the get_step_size function, which technically returns an integer. This can result in compiler warnings and non-explicit data type conversions.

What are the steps to reproduce the bug?

Look at the stepon_timestep_init subroutine for both the SE and null (none) dycore options.

What CAM-SIMA hash were you using?

e69640a

What machine were you running CAM-SIMA on?

Other (please explain below)

What compiler were you using?

Other (please specify below)

Path to a case directory, if applicable

No response

Will you be addressing this bug yourself?

Any Software Engineer can do this

Extra info

The solution for this bug is to keep the kind as kind_phys and do an explicit real(get_step_size(), kind_phys) conversion so that everything is explicitly kind_phys. There may also need to be explicit kind conversions for dtime_phys elsewhere if the timestep is used in other parts of the dycore as well (which usually assume r8).

@nusbaume nusbaume added bug Something isn't working correctly misc Issue that can be included in a miscellaneous PR labels Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly misc Issue that can be included in a miscellaneous PR
Projects
Status: To Do
Development

No branches or pull requests

1 participant