Skip to content

Add outflow_source option to pi() (cape_star vs cape_env) and docume… - #85

Merged
dgilford merged 1 commit into
masterfrom
alternative_OTL
Jan 13, 2026
Merged

dgilford merged 1 commit into
masterfrom
alternative_OTL

Conversation

@dgilford

Copy link
Copy Markdown
Owner

This pull request introduces a new configuration option for the pi function in the tcpyPI package, allowing users to choose how the outflow temperature and level are defined when calculating tropical cyclone potential intensity (PI). The changes add the outflow_source parameter (with options "cape_star" and "cape_env"), update documentation and sample code to reflect this, and include new tests to ensure correct behavior.

Key changes:

New Feature: Outflow Source Selection

  • Added an outflow_source parameter to the pi function, allowing users to select whether the outflow temperature/level is defined using the saturated CAPE* calculation ("cape_star", default) or the environmental CAPE calculation ("cape_env"). The implementation ensures the correct values are used based on the user's choice. [1] [2] [3]

Documentation Updates

  • Expanded the README.md to document the new outflow_source option and other sensitivity/configuration options, including usage examples.
  • Updated docstrings in src/tcpyPI/pi.py to include the new parameter and clarify its behavior. [1] [2]

API and Sample Code Adjustments

  • Modified the run_sample_dataset function in run_sample.py to accept the outflow_source parameter and pass it through to the pi function, updating both the function signature and docstring. [1] [2] [3]

Testing

  • Added a new test module tests/test_outflow_source.py to verify that both outflow_source modes produce valid results and that invalid values raise appropriate errors.

@dgilford
dgilford merged commit 872dcf4 into master Jan 13, 2026
5 checks passed
@dgilford
dgilford deleted the alternative_OTL branch January 13, 2026 18:24
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

Successfully merging this pull request may close these issues.

1 participant