Skip to content

Return Texit from the Forward Euler (feuler) integrator and add corresponding C-I test#136

Merged
yantosca merged 1 commit intodevfrom
bugfix/feuler-return-texit
May 6, 2025
Merged

Return Texit from the Forward Euler (feuler) integrator and add corresponding C-I test#136
yantosca merged 1 commit intodevfrom
bugfix/feuler-return-texit

Conversation

@yantosca
Copy link
Copy Markdown
Contributor

@yantosca yantosca commented May 5, 2025

This is the companion PR to #135. In this PR we have now done the following:

  1. Modified the int/feuler.f90 ("Forward Euler") integrator to return Texit (the time corresponding to the computed Y value) from to the calling program via RSTATUS(1). This was a bug that was causing box-model simulations using the general driver to fail, as the driver was not getting the updated time after each integration call.

  2. Added a new model named carbon based on the GEOS-Chem carbon gases mechanism. Files describing the model are located at models/carbon.def, models/carbon.eqn, models/carbon.spc.

  3. Added a new C-I test for the Forward Euler integrator using the carbon model.

  4. Updated ReadTheDocs documentation to denote that the Forward Euler (feuler) integrator now uses RSTATUS(1).

Closes #135

Tagging @RolfSander @jimmielin @msl3v

int/feuler.f90
- Return TOUT (the ending time of the integration) to the calling
  program via RSTATUS(1).  This is necessary in order for box models
  with the "general" driver to timestep properly.

models/carbon.def
models/carbon.eqn
models/carbon.spc
- Describe new KPP test model based on the GEOS-Chem carbon gases
  mechanism.  Necessary for implementing C-I tests with the
  Forward Euler integrator.

ci-tests/F90_feuler/F90_feuler.kpp
- KPP file for the F90_feuler C-I test.  Uses the carbon mechanism
  with the Forward Euler (feuler) integrator.

.ci-pipelines/ci-common-defs.sh
- Add "F90_feuler" to the list of C-I tests to be done

docs/source/using_kpp/05_output_from_kpp.rst
- Updated the RSTATUS table to denote that the feuler integrator
  now uses RSTATUS(1)

CHANGELOG.md
- Updated accordingly

Signed-off-by: Bob Yantosca <[email protected]>
@yantosca yantosca added CI / testing Related to continuous integration or other testing methods integrators Related to numerical integrators bugfix Fixes a bug or a technical issue labels 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 21:42
@yantosca yantosca self-assigned this May 5, 2025
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 fine to me, but I leave it to Mike to judge. It's his code...

@msl3v
Copy link
Copy Markdown
Contributor

msl3v commented May 6, 2025

Looks fine to me too. Easy change.

@yantosca yantosca requested a review from RolfSander May 6, 2025 13:50
@yantosca
Copy link
Copy Markdown
Contributor Author

yantosca commented May 6, 2025

Thanks @msl3v and @RolfSander. I'll merge this. I think I will prep a KPP 3.2.1 release since there have been a few fixes since the 3.2.0.

@yantosca yantosca merged commit a9fedd0 into dev May 6, 2025
1 check passed
@yantosca yantosca deleted the bugfix/feuler-return-texit branch May 6, 2025 14:38
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 CI / testing Related to continuous integration or other testing methods integrators Related to numerical integrators

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Forward Euler integrator does not return ending timestep via RSTATUS

3 participants