Skip to content

Allow constants in #INITVALUES to have Fortran double-precision "d" exponents#134

Merged
yantosca merged 1 commit intodevfrom
feature/initvalues-d-exponents
May 5, 2025
Merged

Allow constants in #INITVALUES to have Fortran double-precision "d" exponents#134
yantosca merged 1 commit intodevfrom
feature/initvalues-d-exponents

Conversation

@yantosca
Copy link
Copy Markdown
Contributor

@yantosca yantosca commented May 5, 2025

This is the companion PR to issue #133, in which we do the following:

  1. Add dD to the regular expression for the FLOAT and UFLOAT tokens in src/scan.l. This will parse constants in the #INITVALUES section having Fortran "d" exponents.

  2. Added a Note section in the "#INITVALUES" section (in the "Input for KPP" chapter) of ReadTheDocs explaining about Fortran double-precision exponents.

docs/source/using_kpp/04_input_for_kpp.rst
- Use plain text to for the "2 slashes and a space" comment character,
  as :code: or :literal: doesn't seem to work.
- Added note about using Fortran D exponents.

src/scan.l
- Added "dD" to the FLOAT and UFLOAT tokens so that it will parse
  Fortran double-precision exponents properly

CHANGELOG.md
- Updated accordingly

Signed-off-by: Bob Yantosca <[email protected]>
@yantosca yantosca added the bugfix Fixes a bug or a technical issue label May 5, 2025
@yantosca yantosca added this to the 3.2.1 milestone May 5, 2025
@yantosca yantosca requested a review from RolfSander May 5, 2025 15:30
@yantosca yantosca self-assigned this May 5, 2025
@yantosca yantosca changed the base branch from main to dev May 5, 2025 15:30
Copy link
Copy Markdown
Contributor

@RolfSander RolfSander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. At least we can use 1D0 now. Allowing _sp and _dp as well would be nice but is probably not worth the effort.

@yantosca yantosca merged commit 8029b02 into dev May 5, 2025
1 check passed
@yantosca yantosca deleted the feature/initvalues-d-exponents branch May 5, 2025 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Fixes a bug or a technical issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: KPP does not parse constants with "d" exponents in the #INITVALUES section

2 participants