Skip to main content

A faster version of DHI mikeio with some added functionalities

Project description

Installation

pip install fastmikeio

Notes

  1. The package currently works with the following dfsu formats:
  • Dfsu 2D Horizontal
  • Dfsu 3D Sigmal Layer
  • Dfsu Vertical Plane

Features

  1. Export the mesh directly from 3D Dfsu file using the code below:
import fastmikeio
dfsu = fastmikeio.read("3D dfsu.dfsu")
dfsu.geometry.to_mesh(output_fname)
  1. Extract vertical profile from 3D dfsu file
x = [2000, 2100]
y = [100, 234]
output_filename = "Vertical Profile.dfsu"
vertical = dfsu.vertical_extractor(x, y, output_filename)
  1. Retrive data as numpy array
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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fastmikeio-0.0.5.tar.gz (14.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fastmikeio-0.0.5-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

Details for the file fastmikeio-0.0.5.tar.gz.

File metadata

  • Download URL: fastmikeio-0.0.5.tar.gz
  • Upload date:
  • Size: 14.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for fastmikeio-0.0.5.tar.gz
Algorithm Hash digest
SHA256 5be0a9cddf3eecb1f1d06f2f6cc8f36eae776ff3166fce442fa3280bf8ad490d
MD5 599f5b3af4b33251bc5c04b1f1b85c07
BLAKE2b-256 5ec006d57519653bc1a6f999c2d59cb00dcfd6fbdcaa7a2c7dbb3bc7878ab435

See more details on using hashes here.

File details

Details for the file fastmikeio-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: fastmikeio-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 15.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for fastmikeio-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 bffe85126ad1cbe4ddafed13b573c56521b8c4fee348f386eade6389a74ba7fa
MD5 9a607205a72b7c1d09c568e014fea628
BLAKE2b-256 6d166e1a7228776b8018f35842e0e73edf8e1aad96a2f79e21b38f376b1b90e2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page