You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: bindings/python/README.md
+45-3Lines changed: 45 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,7 +65,9 @@ You can build and install the package into your current Python interpreter in ed
65
65
66
66
## Usage
67
67
68
-
After installation, you can use PyForeFire in your Python code as follows:
68
+
### Verifying the Installation
69
+
70
+
The first step is to confirm that the PyForeFire library was installed and linked correctly. The following code creates a `ForeFire` instance and defines a simulation domain.
print("PyForeFire installed and domain created successfully.")
86
+
```
87
+
88
+
If this script runs without an `ImportError` or linking error, your installation is working. *Note: You may see warnings about missing fuel tables, which is expected at this stage.*
89
+
90
+
### Running a Simple Simulation
91
+
92
+
To see a simulation in action, this example starts a fire in the center of a domain and runs it for 1000 seconds.
# 5. Print the state of the fire front to the console
113
+
print(ff.execute("print[]"))
83
114
```
84
115
85
-
Additionally, helper modules are provided which make use of NumPy and Matplotlib for data processing and visualization.
116
+
This will produce text output describing the location of the fire front nodes.
117
+
118
+
To generate a `circle.kml` file for visualization in Google Earth, you can set the `dumpMode` parameter before the final print command:
119
+
```python
120
+
# Optional: Set output mode to KML and save to a file
121
+
ff["dumpMode"] ="kml"
122
+
ff.execute("print[circle.kml]")
123
+
```
124
+
125
+
### More Advanced Examples
126
+
127
+
For more complex examples that use real-world data (like fuel, topography, and wind), please see the scripts located in the `tests/python/` directory of the main repository.
86
128
87
129
---
88
130
@@ -119,4 +161,4 @@ This project is licensed under the terms specified in the `LICENSE` file.
0 commit comments