Metadata-Version: 2.4
Name: fastmikeio
Version: 0.0.4
Summary: A faster version of DHI mikeio with some added functionalities
Author-email: Abbas Jazaeri <abja@dhigroup.com>
License: Copyright (c) 2025 DHI Water and Environment Inc
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
Project-URL: Homepage, https://github.com/abja-dhi/fast-mikeio
Project-URL: Issues, https://github.com/abja-dhi/fast-mikeio/issues
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: mikecore
Requires-Dist: matplotlib
Requires-Dist: tqdm
Requires-Dist: scipy
Requires-Dist: cycler
Dynamic: license-file

# Installation
```cmd
pip install fastmikeio
```

# Notes
1. The package currently works only with 3D sigmal layer dfsu and vertical plane dfsu files

# Features
1. Export the mesh directly from 3D Dfsu file using the code below:
```python
import fastmikeio
dfsu = fastmikeio.read("3D dfsu.dfsu")
dfsu.geometry.to_mesh(output_fname)
```
2. Extract vertical profile from 3D dfsu file
```python
x = [2000, 2100]
y = [100, 234]
output_filename = "Vertical Profile.dfsu"
vertical = dfsu.vertical_extractor(x, y, output_filename)
```
3. Retrive data as useful numpy array
```python
print(dfsu)     # Helper statement to get item indices
print(dfsu.n_layers)
print(dfsu.n_timesteps)
dfsu.get_data(item_idx=1, time_idx=[0, dfsu.n_timesteps-1], layer_idx=2)    # (1, 2, 1, n_2d_elements)
dfsu.get_data(item_idx=1)       # (1, n_timesteps, n_layers, n_2d_elements)
dfsu.get_data(reshape=False)        # (n_items, n_timesteps, n_3d_elements)
dfsu.get_data()                     # (n_items, n_timesteps, n_layers, n_2d_elements)
```     
