稳态流模型与python对dfs文件的访问

hydroinform的Python项目详细描述


HydroInform

此包包含一个稳态流模型和一些从dhi访问.dfs文件的工具

用法

编写要与mikezero一起使用的泵提取文件:

#Import DFS from HydroInform
from hydroinform import DFS

#The number of Items (In this case number of pumping wells)numberofitems=5;#Now create the file._tso= DFS.DFS0.new_file(r'c:\temp\extraction.dfs0'), numberofitems);#Loop the items and set the units etc.for itemCount in range (0, numberofitems):
    _tso.items[itemCount].value_type = DFS.DataValueType.MeanStepBackward
    _tso.items[itemCount].eum_item = DFS.EumItem.eumIPumpingRate
    _tso.items[itemCount].eum_unit = DFS.EumUnit.eumUm3PerYear
    _tso.items[itemCount].name ="Item number: " + str(itemCount)#Loop the years where you have pumping datatscount=0;for year in range(2010, 2016):
    #For every year append a new timestep
    _tso.append_time_step(datetime.datetime(year, 12, 31, 12))#Loop the items and set a value for this timestepfor itemCount in range (0, numberofitems):
        #Sets the data. Note that timesteps count from 0 and Items count from 1
        _tso.set_data(tscount, itemCount+1, year * itemCount)tscount+=1#Call dispose which will save and close the file.
_tso.dispose();

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java Camera API如何聚焦图像中多边形的中心?   来自Java的spring Filling邮戳模板   java只能编织本地JAR的方面吗?   javajavax。加密。BadPaddingException:解密错误无法解密加密的公钥   从java运行ansibleplaybook   在Java中,如何从不同的偏移量读取大块的字符串文件?   java Android GridView将无法确定正确的位置   executorservice如何使用自动线程管理在Java中实现生产者/消费者   JavaEJB3.1嵌入式API单元测试EJB+JPA实体   API的java输出自动停止   java Checkmarx缺陷解决方案   java缓存,获取最早的元素   WebSphere8中的JavaEJB问题   两个时区之间的java Jodatime时差   Java 8不兼容类型错误   java TableCellEditor:如果按下该键,则清除原始文本;如果没有输入,则保留值