{ "info": { "author": "Erin Nagel, Jason Greenlaw", "author_email": "erin.nagel@noaa.gov, jason.greenlaw@noaa.gov", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Science/Research", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "s100py\n======\n\nPython Utilities for Working with IHO S-100 Data Formats\n\nOverview\n--------\n\nThis python package provides utilities for encoding hydrographic\ndatasets in the International Hydrographic Organization (IHO) S-100\nformat.\n\nBackground\n----------\n\nThe IHO S-100 standard is a data framework for digital products and\nservices for hydrographic, maritime, and GIS communities, comprised of\nmultiple data encoding formats designed for interoperability with\nElectronic Navigational Charts (ENCs).\n\nThe initial focus of this package is on two of the S-100 encoding\nformats:\n\n- S-104 Water Level Information for Surface Navigation\n- S-111 Surface Currents\n\nHowever, support for additional formats will likely be added in the\nfuture.\n\nFor further information about S-100 formats, see the [IHO\nwebsite](http://s100.iho.int/S100/).\n\nFeatures\n--------\n\n- Create and modify S-111 compliant HDF5 files in all four data coding\n formats:\n\n\n 1. Time-series at fixed station\n 2. Regularly-gridded arrays\n 3. Ungeorectified gridded arrays (i.e. irregular grid)\n 4. Time series for moving platform\n\n- Chop output into multiple subgrids (i.e. tiles), each written to a\n distinct S-111 file, to reduce file sizes\n\n- Create and modify HDF5 S-100/S-111 metadata\n\nRequirements\n------------\n\nThis codebase is written for Python 3 and relies on the following python\npackages:\n\n- h5py\n- numpy\n- [thyme](https://github.com/noaa-ocs-modeling/thyme)\n\nInstallation\n------------\n\nThis package relies on [thyme](https://github.com/noaa-ocs-modeling/thyme),\nwhich may require downloading/compiling additional libraries before\ninstallation. See the `thyme` documentation for install instructions.\n\nAfter `thyme` has been installed, s100py can be installed with `pip`:\n\n```python\npip install s100py\n```\n\nExample Usage\n-------------\n\n**Create an S-111 File (Type 1):**\n\n```python\nfrom s100py import s111\n\ndata_coding_format = 1\n\n# meters below sea surface (0 = at/near surface)\ncurrent_depth = 0\n\nfile_metadata = s111.S111Metadata(\n \"Gulf of Mexico\", # region\n \"harmonic_current_predictions\", # product description\n 3, # current type code for astronomical prediction\n \"US\", # producer code\n \"station1234\", # station id\n None) # model identifier\n\ninput_data = []\ninput_data.append(\n s111.S111TimeSeries(\n longitude, # 1D `numpy.ndarray` containing longitude values\n latitude, # 1D `numpy.ndarray` containing latitude values\n speed, # 1D `numpy.ndarray` containing speed values in knots\n direction, # 1D `numpy.ndarray` containing Direction values in arc-degrees\n datetime_values)) # List containing a `datetime.datetime` for each observation in the series\n\ns111.time_series_to_s111(\n input_data,\n '/path/to/s111_directory',\n file_metadata,\n data_coding_format,\n current_depth)\n```\n\n**Create an S-111 File (Type 2)**\n\nNOS Chesapeake Bay Operational Forecast System file valid at 7/9/2019\n0000 UTC:\n\n```python\nimport datetime\nfrom s100py import s111\nfrom thyme.model import roms\n\ndata_coding_format = 2\ntarget_cellsize = 500 # meters\n\n# meters below sea surface (0 = at/near surface), default = 4.5 m\ntarget_depth = 0\n\nfile_metadata = s111.S111Metadata(\n \"Chesapeake Bay\", # region\n \"ROMS_Hydrodynamic_Model_Forecasts\", # product type description\n 6, # current data type for hydrodynamic forecast\n \"US\", # producer code\n None, # station id\n \"CBOFS\") # model identifier\n\nnative_model_file = roms.ROMSFile('/path/to/nos.cbofs.fields.f001.20190709.t00z.nc')\nmodel_index_file = roms.ROMSIndexFile('/path/to/create/index_file.nc')\n\ntry:\n native_model_file.open()\n model_index_file.open()\n model_index_file.init_nc(native_model_file, target_cellsize, 'my_roms_model', '/path/to/shoreline_shapefile.shp')\n\nfinally:\n model_index_file.close()\n native_model_file.close()\n\ns111.model_to_s111(\n model_index_file,\n [native_model_file],\n '/path/to/s111_directory',\n datetime.datetime(2019, 7, 9, 0, 0),\n file_metadata,\n data_coding_format,\n target_depth)\n```\n**Create an S-111 File (Type 3)**\n\nNOS Chesapeake Bay Operational Forecast System file valid at 7/9/2019\n0000 UTC:\n\n```python\nimport datetime\nfrom s100py import s111\nfrom thyme.model import roms\n\ndata_coding_format = 3\n\n# meters below sea surface (0 = at/near surface), default = 4.5 m\ntarget_depth = 0\n\nfile_metadata = s111.S111Metadata(\n \"Chesapeake Bay\", # region\n \"ROMS_Hydrodynamic_Model_Forecasts\", # product type description\n 6, # current data type for hydrodynamic forecast\n \"US\", # producer code\n None, # station id\n \"CBOFS\") # model identifier\n\nnative_model_file = roms.ROMSFile('/path/to/nos.cbofs.fields.f001.20190709.t00z.nc')\n\ns111.model_to_s111(\n None,\n [native_model_file],\n '/path/to/s111_directory',\n datetime.datetime(2019, 7, 9, 0, 0),\n file_metadata,\n data_coding_format,\n target_depth)\n\n```\n**Create an S-111 file (Type 4):**\n\n```python\nfrom s100py import s111\n\ndata_coding_format = 4\n\n# meters below sea surface (0 = at/near surface)\ncurrent_depth = 15\n\nfile_metadata = s111.S111Metadata(\n \"Western_N_Pacific_Ocean_Philippine_Sea\", # region\n \"argos_lagrangian_drifter_12hr_interpolated\", # product type description\n 4, # current type code for analysis or hybrid method\n \"US\", # producer code\n None, # station id\n None) # model identifier\n\ninput_data = []\ninput_data.append(\n s111.S111TimeSeries(\n longitude, # 1D `numpy.ndarray` containing longitude values\n latitude, # 1D `numpy.ndarray` containing latitude values\n speed, # 1D `numpy.ndarray` containing speed values in knots\n direction, # 1D `numpy.ndarray` containing Direction values in arc-degrees\n datetime_values)) # List containing a `datetime.datetime` for each observation in the series\n\ns111.time_series_to_s111(\n input_data,\n '/path/to/s111_directory',\n file_metadata,\n data_coding_format,\n current_depth)\n```\n\nAuthors\n-------\n\n- Erin Nagel (UCAR), \n- Jason Greenlaw (ERT), \n\nLicense\n-------\n\nThis work, as a whole, is licensed under the BSD 2-Clause License (see\n[LICENSE](LICENSE)), however it contains major contributions from the\nU.S. National Oceanic and Atmospheric Administration (NOAA), 2017 -\n2019, which are individually dedicated to the public domain.\n\nDisclaimer\n----------\n\nThis repository is a scientific product and is not official\ncommunication of the National Oceanic and Atmospheric Administration, or\nthe United States Department of Commerce. All NOAA GitHub project code\nis provided on an 'as is' basis and the user assumes responsibility for\nits use. Any claims against the Department of Commerce or Department of\nCommerce bureaus stemming from the use of this GitHub project will be\ngoverned by all applicable Federal law. Any reference to specific\ncommercial products, processes, or services by service mark, trademark,\nmanufacturer, or otherwise, does not constitute or imply their\nendorsement, recommendation or favoring by the Department of Commerce.\nThe Department of Commerce seal and logo, or the seal and logo of a DOC\nbureau, shall not be used in any manner to imply endorsement of any\ncommercial product or activity by DOC or the United States Government.\n\nAcknowledgments\n---------------\n\nThis software has been developed by the National Oceanic and Atmospheric\nAdministration (NOAA)/National Ocean Service (NOS)/Office of Coast\nSurvey (OCS)/Coast Survey Development Lab (CSDL) for use by the\nscientific and oceanographic communities.\n\nCSDL wishes to thank the following entities for their assistance:\n\n- NOAA/NOS/Center for Operational Oceanographic Products and Services\n (CO-OPS)\n- Canadian Hydrographic Service (CHS)\n- Teledyne CARIS\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/noaa-ocs-s100/s100py", "keywords": "", "license": "BSD-2-Clause", "maintainer": "", "maintainer_email": "", "name": "s100py", "package_url": "https://pypi.org/project/s100py/", "platform": "", "project_url": "https://pypi.org/project/s100py/", "project_urls": { "Homepage": "https://github.com/noaa-ocs-s100/s100py" }, "release_url": "https://pypi.org/project/s100py/0.3.0/", "requires_dist": [ "thyme (>=0.3.3)", "numpy", "h5py" ], "requires_python": "", "summary": "This python package provides utilities for encoding hydrographic datasets in the International Hydrographic Organization (IHO) S-100 format", "version": "0.3.0" }, "last_serial": 5602210, "releases": { "0.3.0": [ { "comment_text": "", "digests": { "md5": "ad0113d838760dd40fce4fe960e19d63", "sha256": "3b7cde4780e81ed5699fabaf9b0e71f42a361960932c420c8332c18c69f76489" }, "downloads": -1, "filename": "s100py-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "ad0113d838760dd40fce4fe960e19d63", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 13769, "upload_time": "2019-07-29T21:54:55", "url": "https://files.pythonhosted.org/packages/ac/b6/d0697907383592cceb3f8d86d8ad431acb0fef20b90aac87753a55822ba3/s100py-0.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "61e1fb29496033e6009674f7e68c845a", "sha256": "352e9dc6c02de5c30c511df397459f0ec88443bad5bef6ecb75005583fe5fa4b" }, "downloads": -1, "filename": "s100py-0.3.0.tar.gz", "has_sig": false, "md5_digest": "61e1fb29496033e6009674f7e68c845a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15558, "upload_time": "2019-07-29T21:54:57", "url": "https://files.pythonhosted.org/packages/2a/04/518840ceea3a61e4e237e142fc7cedbfc2216a6e08fec0151b785540bd05/s100py-0.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ad0113d838760dd40fce4fe960e19d63", "sha256": "3b7cde4780e81ed5699fabaf9b0e71f42a361960932c420c8332c18c69f76489" }, "downloads": -1, "filename": "s100py-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "ad0113d838760dd40fce4fe960e19d63", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 13769, "upload_time": "2019-07-29T21:54:55", "url": "https://files.pythonhosted.org/packages/ac/b6/d0697907383592cceb3f8d86d8ad431acb0fef20b90aac87753a55822ba3/s100py-0.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "61e1fb29496033e6009674f7e68c845a", "sha256": "352e9dc6c02de5c30c511df397459f0ec88443bad5bef6ecb75005583fe5fa4b" }, "downloads": -1, "filename": "s100py-0.3.0.tar.gz", "has_sig": false, "md5_digest": "61e1fb29496033e6009674f7e68c845a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15558, "upload_time": "2019-07-29T21:54:57", "url": "https://files.pythonhosted.org/packages/2a/04/518840ceea3a61e4e237e142fc7cedbfc2216a6e08fec0151b785540bd05/s100py-0.3.0.tar.gz" } ] }