Various helper classes to read and manipulate Daisy input and output files.
Project description
pydaisy
pydaisy provides various tools to read, write and manipulate Daisy input- and outputfiles.
Usage
.dai-files:
from pydaisy.Daisy import *
d = DaisyModel(r'C:\Program Files\Daisy 5.72\exercises\Exercise01.dai')
print(d.starttime)
dry_bulk_density = d.Input['defhorizon'][0]['dry_bulk_density'].getvalue()
d.Input['defhorizon'][0]['dry_bulk_density'].setvalue(1.1*dry_bulk_density)
d.save_as(r'C:\Program Files\Daisy 5.72\exercises\Exercise01_new.dai')
DaisyModel.path_to_daisy_executable = r'C:\Program Files\Daisy 5.72\bin\Daisy.exe'
d.run()
.dlf- and .dwf-files:
from datetime import datetime
from pydaisy.Daisy import *
dlf = DaisyDlf(r'C:\Program Files\Daisy 5.72\exercises\Taastrup6201.dwf')
pandasdata = dlf.Data
numpy_data = dlf.numpydata
i=dlf.get_index(datetime(1962,4,14))
pandasdata['Precip'][i]=10
dlf.save(r'C:\Program Files\Daisy 5.72\exercises\Taastrup6201_saved.dwf')
Parallel runs:
if __name__ == '__main__':
from pydaisy.Daisy import *
DaisyModel.path_to_daisy_executable = r'C:\Program Files\Daisy 5.72\bin\Daisy.exe'
daisyfiles =[r'c:\daisy\model1\setup.dai', r'c:\daisy\model2\setup.dai', r'c:\daisy\model3\setup.dai']
run_many(daisyfiles, NumberOfProcesses=3)
The code above will run the three daisy-simulations in parallel.
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
pydaisy-1.0.0.tar.gz
(12.6 kB
view details)
Built Distribution
pydaisy-1.0.0-py3-none-any.whl
(11.5 kB
view details)
File details
Details for the file pydaisy-1.0.0.tar.gz
.
File metadata
- Download URL: pydaisy-1.0.0.tar.gz
- Upload date:
- Size: 12.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9e0731c7c36333a16a64fbe4fdd9def26be8379d22f8160eb414a47c4cb0d93 |
|
MD5 | 05f7f51c1dfe72a6081da21c756eec45 |
|
BLAKE2b-256 | 8c4955273a6fb192e62dde11ecfb6511032adbdf22ce551dfbf8858b4b59b577 |
File details
Details for the file pydaisy-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: pydaisy-1.0.0-py3-none-any.whl
- Upload date:
- Size: 11.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 022d0ec09ec3c37edf5999615193b5307c7779415e84ff5990ebfd4ed4106916 |
|
MD5 | b51941b1273230f34aec651388268f33 |
|
BLAKE2b-256 | 075e3e1f33ace3e1a210b8dd6266735a7826c763f50d97530dd05fce13f0efb8 |