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.18.tar.gz (119.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.18-py3-none-any.whl (135.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyemmp-0.0.18.tar.gz
  • Upload date:
  • Size: 119.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.18.tar.gz
Algorithm Hash digest
SHA256 729aceb5b06b3286af1231db72a8491eb1aa1fd53d46cfcc667c3aa97cf3b1af
MD5 376c3137011ec2b5c83467b850262aed
BLAKE2b-256 06d30ce84bef912f5d407d842f6525e5dc60f1f19d50c1ae8b3a991d2480301d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyemmp-0.0.18-py3-none-any.whl
  • Upload date:
  • Size: 135.4 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.18-py3-none-any.whl
Algorithm Hash digest
SHA256 c838a2d3a41a3ba8956f7934ea675d768c81270b82bd9fd0b5ef523d3f344959
MD5 ec7d66ea51b20e2a0d40f9490ac715b7
BLAKE2b-256 e297d54e4d6bb3413ffdaf13be629608631a32328a3394a65917007876c822b6

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