Hi ParFlow users,
We want to alert you to recent TCL compatibility issues and a ParFlow development team decision regarding future TCL support.
TCL 9.x does not work with ParFlow
TCL 9.x has been released and is not backward compatible with TCL 8.x. ParFlow does not fully work with TCL 9.x. Please use a TCL 8.x release, or use
the Python pftools API
instead.
If you have TCL 9.x installed, only the ParFlow development branch currently compiles with it. We have patched ParFlow to compile with TCL 9.x, but not all custom TCL commands work. If you must use TCL 9.x, you should use the Python interface only.
To check your TCL version:
Configuring CMake to use a TCL 8.x installation
If you have a TCL 8.x install on your system, you can point CMake to it, for example:
TCL_DIR=<path to where TCL is installed>
cmake \
-DTCL_TCLSH=${TCL_DIR}/bin/tclsh8.6 \
-DTCL_LIBRARY=${TCL_DIR}/lib/
libtcl8.6.so \
<your other cmake options>
ParFlow 4.x
We are planning a new ParFlow release soon. This release will include feature additions, bug fixes, and portability updates. This will likely be the last release of ParFlow 3.x.
We will be rolling out ParFlow 4.0, and we will likely break some compatibility in order to address long-standing ParFlow issues. One change we plan to make is to deprecate TCL support. ParFlow releases in January 2027 and beyond may or may not include TCL
8.x support depending on support costs, and we have no plans to update ParFlow to support TCL 9.x.
Why are we deprecating TCL?
TCL 9.x is incompatible with the TCL 8.x versions we have been using. Supporting TCL 9.x will take time. Given the small size of the ParFlow developer community, supporting both Python and TCL reduces the time available for other support and development activities.
Most scripting interface development is occurring on the Python side, and we do not have resources to port everything to both APIs. The developer community has therefore decided to deprecate TCL.
What should you do if you are using TCL?
In the short term, the key point is: ParFlow does not work with TCL 9.x, so use a TCL 8.x release.
For new problem setups, consider using the Python interface, and plan to update existing TCL workflows over time.
Is there help to convert TCL scripts to Python?
We have automated scripts that can convert substational parts of a ParFlow TCL input script to Python. Conversion of
pfset commands
is automated, but additional TCL logic (moving files, simple calculations, etc.) will require manual updates.
AI chat tools can also help with code conversion. Asking how to convert specific TCL statements to Python often produces reasonable results.
The ParFlow documentation includes a short tutorial on TCL to Python conversion:
If you have concerns about this change feel free to post to this group. We will try to help with this conversion as much as we can.
As the developer who created the TCL interface, I am sad to see TCL go, but TCL lost the scripting wars long ago.
Steve