{ "info": { "author": "Di Wu", "author_email": "di.wu@ntnu.no", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Console", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Topic :: Scientific/Engineering" ], "description": "hdg-from |---| Generate HDG files for GEMSS\n===========================================\n\n.. image:: https://img.shields.io/pypi/v/hdgfrom.svg\n :target: https://pypi.python.org/pypi/hdgfrom\n\n\"hdg-from\" is a simple command-line tool that generates HDG files for\nthe Global Environment Modelling System for Subsurface waters\n(GEMSS_).\n\nUsage Example\n-------------\n\nFor instance, if you have data produced by the Storm Water Management\nModel (SWMM_), say in a text file ``my-data.txt`` in for instance,\nwhere the flow rates are in liters per second (LPS), as follows:\n\n.. code-block:: text\n\n Table - Node 1\n Total Inflow\n Days \tHours \t(LPS)\n 0 \t00:15:00 \t0.18\n 0 \t00:30:00 \t2.30\n 0 \t00:45:00 \t2.06\n\nYou can use `hdg-from` to obtain the equivalent HDG file by entering.\n\n.. code-block:: console\n\n $ hdg-from my-data.txt\n 3 observation(s) loaded from 'my-data.txt'.\n 'my-data.hdg' successfully generated.\n\nIn the generated file, named by default ``my-data.hdg``, the flow\nvalues have been convert to cubic meters per day (CMD).\n\n.. code-block:: text\n\n $GLLVHTTVDFile, V5.0\n $Creation Date: 09/08/2017 08:52\n $Waterbody Name: Node 1\n $Created by: Unknown\n $Start Date: 01/01/2017 12:00\n $End Date: 01/01/2017 12:45\n $Number of Data Lines: 3\n $X, Y, Station Height, Missing value,Profile Format, ExceFormat, Longitude, Latitude, Anemometer Height\n $Number of bins, Depth data type, TVD file type\n 62000,6957300,0,999999999,0,0,0,0,0\n 1,0,0\n 1\n 2,0,4,1.0,0,0.0,0.0,Flow Rate,Flow Rate\n $Year,Month,Day,Hour,Minute,Bin1,Flow Rate\n 2017,1,1,12,15,0,15.55\n 2017,1,1,12,30,0,198.72\n 2017,1,1,12,45,0,177.98\n\nBelow are the options that `hdg-from` accepts:\n\n-f , --format \n\n The file format of the input file. So far only the SWMM format is\n available, but other may be supported in later versions.\n\n-n , --user-name \n\n The name of the user that creates the HDG file (see HDG Field\n ``Created By``). Should be enclosed in double quotes if it\n contains space. By default, the user name is \"Unknown\".\n\n-o , --output \n\n The HDG file to generate. By default, the generated file will have\n the same name as the given input file (only its extension will\n differ), as in the example above.\n\n-s , --start-date \n\n The date used as a starting point to convert simulated time into\n absolute time (see HDG Field ``State Date``). Dates must adhere to\n the `ISO 8601`_ standard such as 2017-01-01T12:00:00. By default,\n the date used is Jan. 1, 2017 at 12:00 AM.\n\n--unit \n\n The flow rate unit that should be used in the HDG file. By\n default, HDG files use cubic meter per day (CMD), but the other\n options are:\n\n - \"CMS\" for cubic meters per seconds\n - \"CFS\" for cubic feet per seconds\n - \"MGD\" for millions of gallon per day\n - \"GPM\" for gallons per minutes\n - \"CMD\" for cubic meters per day\n - \"CMH\" for cubic meters per hour\n\n-w , --water-body \n\n The name of the water body to set in the HDG file (see Field\n ``Waterbody Name``). This will override the one read in the SWMM\n file, if any. Should be enclosed in double quotes if it contains\n spaces. By default, the name of the water body is read from the\n input file.\n\n-h, --help\n\n Show a similar description of the available options and exit.\n\n\nInstallation\n------------\n\n`hdg-from` is a simple Python 3.3+ application (also tested on Python\n2.7) with no additional dependency. To install the *latest stable\nrelease* from the Pypi_ repository, the simplest way is to use ``pip``\nas follows:\n\n.. code-block:: console\n\n $ pip install hdgfrom\n\nAlternatively, you may want to install the *latest version under\ndevelopment*. To this end, ``pip`` you can directly install the last\ncommit on the Git repository, using:\n\n.. code-block:: console\n\n $ pip install git+https://github.com/wudi312858/hdg-from\n\n\nChange Log\n----------\n:Next version:\n - Unit conversions from the SWMM file to the HDG file.\n - Warn about conversions that lead to only zero values.\n\n:Version 0.2.0:\n - Let the user specify the name of the generated HDG file.\n - Let the user specify its name for inclusion in the HDG file.\n - Let the user override the name of the water body.\n - Tell the user how many observations were loaded from the input\n file.\n - Catch `FileNotFoundError` properly.\n - Catch invalid start dates properly.\n - Generate the correct creation date.\n - Compatibility with Python 2.7 and Python 3.3+.\n\n:Version 0.1.0:\n - Accepts text files generated by SWMM_ and generates an equivalent\n HDG file.\n - Let the user specify the starting date to convert simulated time\n into absolute time.\n - Only tested on Python 3.6.\n\n.. |---| unicode:: U+2014\n\n.. _GEMSS: http://gemss.com/gemss.html\n.. _SWMM: https://en.wikipedia.org/wiki/Storm_Water_Management_Model\n.. _sources: https://github.com/wudi312858/hdg-from/archive/master.zip\n.. _PIP: https://en.wikipedia.org/wiki/Pip_(package_manager)\n.. _`ISO 8601`: https://en.wikipedia.org/wiki/ISO_8601\n.. _Pypi: https://pypi.python.org/pypi", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/wudi312858/hdg-from", "keywords": "", "license": "LICENSE.txt", "maintainer": "", "maintainer_email": "", "name": "hdgfrom", "package_url": "https://pypi.org/project/hdgfrom/", "platform": "", "project_url": "https://pypi.org/project/hdgfrom/", "project_urls": { "Homepage": "https://github.com/wudi312858/hdg-from" }, "release_url": "https://pypi.org/project/hdgfrom/0.3.0/", "requires_dist": null, "requires_python": "", "summary": "Generate HDG files for GEMSS", "version": "0.3.0" }, "last_serial": 3083439, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "d4b08df40df430af0719174e10c07580", "sha256": "082ab03a7cbebcfb7b111d4654c6066539314fd409f4817d9e5209789b0f8062" }, "downloads": -1, "filename": "hdgfrom-0.1.0.tar.gz", "has_sig": true, "md5_digest": "d4b08df40df430af0719174e10c07580", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5062, "upload_time": "2017-08-06T13:40:36", "url": "https://files.pythonhosted.org/packages/08/36/7ec3ba759f7a4f4d94b4a2279400fe1ac69087e64a1b0be25df5dc344cb2/hdgfrom-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "f2d114313bba83a606454abf498d6a9c", "sha256": "b9913982501ead8f764a61038de7ffe5782c7a6f9918c7450673ea29b16e0823" }, "downloads": -1, "filename": "hdgfrom-0.2.0.tar.gz", "has_sig": true, "md5_digest": "f2d114313bba83a606454abf498d6a9c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6891, "upload_time": "2017-08-08T10:32:31", "url": "https://files.pythonhosted.org/packages/48/b3/dac29e99c95ae0091d1385b6838a790d1fc22f224d72e7b920a98b237e25/hdgfrom-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "6598109cc635b5946ca770961e505a89", "sha256": "b38d159a6128503908bfd1c1c14e8adcaf140994bfaa7ca22165bb5a5467dc52" }, "downloads": -1, "filename": "hdgfrom-0.3.0.tar.gz", "has_sig": true, "md5_digest": "6598109cc635b5946ca770961e505a89", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8721, "upload_time": "2017-08-09T08:07:04", "url": "https://files.pythonhosted.org/packages/b0/5d/613afe0f0cc56756b65d577ea80e64740317f5f249c0a010251e9f539828/hdgfrom-0.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6598109cc635b5946ca770961e505a89", "sha256": "b38d159a6128503908bfd1c1c14e8adcaf140994bfaa7ca22165bb5a5467dc52" }, "downloads": -1, "filename": "hdgfrom-0.3.0.tar.gz", "has_sig": true, "md5_digest": "6598109cc635b5946ca770961e505a89", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8721, "upload_time": "2017-08-09T08:07:04", "url": "https://files.pythonhosted.org/packages/b0/5d/613afe0f0cc56756b65d577ea80e64740317f5f249c0a010251e9f539828/hdgfrom-0.3.0.tar.gz" } ] }