Skip to main content

A Python package developed to support EMMP tasks

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

pyemmp-0.0.10.tar.gz (118.1 kB view details)

Uploaded Source

Built Distribution

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

pyemmp-0.0.10-py3-none-any.whl (134.3 kB view details)

Uploaded Python 3

File details

Details for the file pyemmp-0.0.10.tar.gz.

File metadata

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

File hashes

Hashes for pyemmp-0.0.10.tar.gz
Algorithm Hash digest
SHA256 21e25f701184d227f8f5959ce925d33b8baea7e9122f8830750b08099938857e
MD5 a30ae0f8c46aa0e1b60061ba8aeb9d79
BLAKE2b-256 8c20a0b07eeeb31d91f6703814ca1369721303c2e9ca21a1e7da5e4a1aa0090f

See more details on using hashes here.

File details

Details for the file pyemmp-0.0.10-py3-none-any.whl.

File metadata

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

File hashes

Hashes for pyemmp-0.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 c852a5788c5e640e4983f5646866db7c93e5da59b43c85eabc44a8531b2f1fed
MD5 368c964e5519d535253eca94b43f1822
BLAKE2b-256 1c13c43ca2212c69dc9d09ec849e4392ba65ca8647d4f58151142d1cd1cb4943

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