FluxPrint 0.0.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,190 @@
1
+ Metadata-Version: 2.1
2
+ Name: FluxPrint
3
+ Version: 0.0.2
4
+ Summary: Python module to easily handle footprint outputsWritten by pedrohenriquecoimbra
5
+ Home-page: https://github.com/pedrohenriquecoimbra/footprint_toolkit
6
+ Author: Pedro Henrique Coimbra
7
+ Author-email: pedro-henrique.herig-coimbra@inrae.fr
8
+ License: MIT
9
+ Keywords: footprint,flux,eddy covariance,EC
10
+ Platform: any
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Environment :: Other Environment
13
+ Classifier: Framework :: Jupyter
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: Programming Language :: Python
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.8
18
+ Classifier: Programming Language :: Python :: 3.9
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Programming Language :: Python :: 3.13
23
+ Classifier: Programming Language :: Python :: 3.14
24
+ Classifier: Topic :: Other/Nonlisted Topic
25
+ Requires-Python: >=3.8
26
+ Description-Content-Type: text/markdown
27
+ License-File: LICENSE
28
+ Requires-Dist: numpy
29
+ Requires-Dist: pandas
30
+ Requires-Dist: fiona
31
+ Requires-Dist: shapely
32
+ Requires-Dist: pyproj
33
+ Requires-Dist: xarray
34
+ Requires-Dist: rasterio
35
+ Requires-Dist: requests
36
+ Provides-Extra: icoscp
37
+ Requires-Dist: icoscp; extra == "icoscp"
38
+ Requires-Dist: icoscp_core; extra == "icoscp"
39
+
40
+ # Footprint Tools
41
+
42
+ A Python library for calculating and managing flux footprints using the Kljun et al. (2015) model. The library supports reading and writing footprint data in various formats, including pandas DataFrames, dictionaries, TIFF, and NetCDF.
43
+
44
+ ---
45
+
46
+ ## Features
47
+
48
+ - **Footprint Calculation**: Calculate flux footprints using the Kljun et al. (2015) model.
49
+ - **Data Formats**: Read and write footprint data in multiple formats:
50
+ - Pandas DataFrame
51
+ - Python dictionaries
52
+ - TIFF files
53
+ - NetCDF files
54
+ - **Coordinate Transformations**: Transform coordinates between different CRS (e.g., WGS84 to UTM).
55
+ - **Aggregation**: Aggregate multiple footprints into a climatological footprint.
56
+ - **Flexible Inputs**: Accepts meteorological data in various formats for footprint calculation.
57
+
58
+ ---
59
+
60
+ ## Installation
61
+
62
+ You can install the library using `pip`:
63
+
64
+ ```bash
65
+ pip install footprint_toolkit
66
+ ```
67
+
68
+ ---
69
+
70
+ ## Usage
71
+
72
+ ### 1. Calculate a Footprint
73
+
74
+ ```python
75
+ from footprint_toolkit.core import calculate_footprint
76
+
77
+ # Input data
78
+ data = {
79
+ 'zm': 10, # Measurement height (m)
80
+ 'z0': 0.1, # Roughness length (m)
81
+ 'ws': [3.0], # Wind speed (m/s)
82
+ 'ustar': [0.3], # Friction velocity (m/s)
83
+ 'pblh': [1000], # Planetary boundary layer height (m)
84
+ 'mo_length': [-100], # Monin-Obukhov length (m)
85
+ 'v_sigma': [0.5], # Standard deviation of lateral velocity (m/s)
86
+ 'wd': [180] # Wind direction (degrees)
87
+ }
88
+
89
+ # Calculate footprint
90
+ footprint = calculate_footprint(data, domain=[-100, 100, -100, 100], dx=10, dy=10)
91
+ ```
92
+
93
+ ### 2. Save Footprint to NetCDF
94
+
95
+ ```python
96
+ from footprint_toolkit.io import write_to_netcdf
97
+
98
+ # Save footprint to NetCDF
99
+ write_to_netcdf(footprint, 'output.nc')
100
+ ```
101
+
102
+ ### 3. Save Footprint to TIFF
103
+
104
+ ```python
105
+ from footprint_toolkit.io import write_to_tif
106
+
107
+ # Save footprint to TIFF
108
+ write_to_tif(footprint, 'output.tif', crs="EPSG:4326")
109
+ ```
110
+
111
+ ### 4. Aggregate Multiple Footprints
112
+
113
+ ```python
114
+ from footprint_toolkit.core import aggregate_footprints
115
+
116
+ # List of footprints
117
+ footprints = [footprint1, footprint2, footprint3]
118
+
119
+ # Aggregate footprints
120
+ climatological_footprint = aggregate_footprints(footprints)
121
+ ```
122
+
123
+ ### 5. Transform Coordinates
124
+
125
+ ```python
126
+ from footprint_toolkit.utils import transform_coordinates
127
+
128
+ # Transform coordinates from WGS84 to UTM
129
+ x, y = transform_coordinates(48.84422, 1.95191, crs_in="EPSG:4326", crs_out="EPSG:3035")
130
+ ```
131
+
132
+ ---
133
+
134
+ ## API Reference
135
+
136
+ ### Core Functions (`core.py`)
137
+ - `calculate_footprint(data, domain, dx, dy)`: Calculate a flux footprint.
138
+ - `aggregate_footprints(footprints)`: Aggregate multiple footprints.
139
+
140
+ ### I/O Functions (`io.py`)
141
+ - `write_to_netcdf(footprint, output_path)`: Save footprint data as a NetCDF file.
142
+ - `write_to_tif(footprint, output_path, crs)`: Save footprint data as a TIFF file.
143
+ - `read_from_dataframe(df, zm, z0, ws_col, ustar_col, pblh_col, mo_length_col, v_sigma_col, wd_col)`: Prepare input data from a pandas DataFrame.
144
+
145
+ ### Utility Functions (`utils.py`)
146
+ - `transform_coordinates(x, y, crs_in, crs_out)`: Transform coordinates between CRS.
147
+ - `validate_input_data(data)`: Validate input data for footprint calculation.
148
+
149
+ ---
150
+
151
+ ## Examples
152
+
153
+ Check out the `examples/` directory for detailed usage examples:
154
+ - `example_dataframe.py`: Calculate footprints from a pandas DataFrame.
155
+ - `example_netcdf.py`: Save footprints as NetCDF files.
156
+ - `example_tif.py`: Save footprints as TIFF files.
157
+
158
+ ---
159
+
160
+ ## Contributing
161
+
162
+ Contributions are welcome! Please follow these steps:
163
+ 1. Fork the repository.
164
+ 2. Create a new branch for your feature or bugfix.
165
+ 3. Submit a pull request.
166
+
167
+ ---
168
+
169
+ ## License
170
+
171
+ This project is licensed under the MIT License. See the [LICENSE](LICENSE.txt) file for details.
172
+
173
+ ---
174
+
175
+ ## Acknowledgments
176
+
177
+ - Kljun et al. (2015) for the footprint model.
178
+ - Contributors and maintainers of the `footprint_kljun2015` library.
179
+
180
+ ---
181
+
182
+ ## Contact
183
+
184
+ For questions or feedback, please contact:
185
+ - [Pedro Henrique Coimbra](mailto:pedro-henrique.herig-coimbra@inrae.fr)
186
+ - [GitHub Issues](https://github.com/pedrohenriquecoimbra/footprint_toolkit/issues)
187
+
188
+ ---
189
+
190
+ This `README.md` provides a clear and concise overview of your library, making it easy for users to understand and use your tool. Let me know if you need further adjustments!
@@ -0,0 +1,23 @@
1
+ LICENSE
2
+ README.md
3
+ setup.py
4
+ FluxPrint.egg-info/PKG-INFO
5
+ FluxPrint.egg-info/SOURCES.txt
6
+ FluxPrint.egg-info/dependency_links.txt
7
+ FluxPrint.egg-info/requires.txt
8
+ FluxPrint.egg-info/top_level.txt
9
+ fluxprint/__init__.py
10
+ fluxprint/commons.py
11
+ fluxprint/core.py
12
+ fluxprint/exceptions.py
13
+ fluxprint/io.py
14
+ fluxprint/template.py
15
+ fluxprint/utils.py
16
+ fluxprint/version.py
17
+ fluxprint/model/Hsieh_et_al_2000.py
18
+ fluxprint/model/Kljun_et_al_2015.py
19
+ fluxprint/model/Kormann_and_Meixner_2001.py
20
+ fluxprint/model/__init__.py
21
+ fluxprint/model/Kljun_et_al_2015_original/__init__.py
22
+ fluxprint/model/Kljun_et_al_2015_original/calc_footprint_FFP.py
23
+ fluxprint/model/Kljun_et_al_2015_original/calc_footprint_FFP_climatology.py
@@ -0,0 +1,12 @@
1
+ numpy
2
+ pandas
3
+ fiona
4
+ shapely
5
+ pyproj
6
+ xarray
7
+ rasterio
8
+ requests
9
+
10
+ [icoscp]
11
+ icoscp
12
+ icoscp_core
@@ -0,0 +1 @@
1
+ fluxprint