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

Use literals in double precision #12

Open
tenomoto opened this issue Oct 1, 2022 · 1 comment
Open

Use literals in double precision #12

tenomoto opened this issue Oct 1, 2022 · 1 comment

Comments

@tenomoto
Copy link

tenomoto commented Oct 1, 2022

Unlike Python, the type of a numeric literal is implicitly assumed. Float literals are assumed to be real*4. We need to either explicitly add a type like tref = 288.0_p or promote all floats without type specification with a command line option -fdefault-real-8. With tref = 288.0, tref is declared to be real(p), but an imprecise value of real*4 is assigned without _p after the literal or without the option.

@tenomoto
Copy link
Author

tenomoto commented Oct 1, 2022

The difference of surface pressure with and without -fdefault-real-8 (modified minus original).
ps198201100000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant