{
"info": {
"author": "Simon Good, Bill Mills",
"author_email": "mills.wj@gmail.com",
"bugtrack_url": null,
"classifiers": [],
"description": "[](https://travis-ci.org/IQuOD/wodpy)\n\n\nRelease History:\n\nversion | DOI\n--------|----\n1.6.0 |
\n1.5.0 |
\n1.4.1 |
\n1.4.0 |
\n1.3.0 |
\n1.2.0 |
\n1.1.0 |
\n1.0 |
\n\n## Data Unpacking\n\nWorld Ocean Database data is encoded by the specification described [here](http://data.nodc.noaa.gov/woa/WOD/DOC/wodreadme.pdf). This `WodProfile` class reads this format, and returns an object with functions to help extract useful information from it.\n\n### How to help\n\n#### Trying things out\n\nPlease try unpacking your own WOD data using wodpy, and let us know how it goes in the issues. Any problems (not just bugs, but anything confusing or unintuitive), just let us know. Also, if there are more features you'd like to see (like more parts of the profile unpacked), ask away - community requests are high priority for new features.\n\n#### Contributing\n\nContributions to wodpy are very welcome! Please follow these simple guidelines:\n\n - Please start by opening an issue or empty PR in this repo, so we can talk about your plans.\n - No PRs over 500 lines, please. (Why? See figure 1 [here](https://smartbear.com/SmartBear/media/pdfs/11_Best_Practices_for_Peer_Code_Review.pdf).)\n - New code should be packaged in small functions and classes wherever possible; no functions over 50 lines, please.\n - Write at least one test for every new function you create.\n - All tests must pass before any PR will be accepted.\n\n### Usage\n\n#### Install\nfrom pip: `sudo pip install wodpy`\n\nTo use the `WodProfile` class, open a text file that conforms to the specification defined in the link above, and pass in the resulting file object:\n\n```\nfrom wodpy import wod\n\nfid = open(\"example.dat\")\nprofile = wod.WodProfile(fid)\n```\n\n`profile` now contains an object with many helper functions for extracting useful information from the first profile in `file`:\n\n```\nprofile.latitude() # Return the latitude of the profile.\nprofile.z() # Return the depths of the observations.\nprofile.df() # Return a pandas DataFrame containing all the information for this profile\n...\n```\n\nFurther profiles in the file can be read as follows:\n```\nprofile2 = wod.WodProfile(fid) # Read the next profile.\nprofile2.is_last_profile_in_file(fid) # Is this the last profile?\n```\n\nComplete method lists and definitions are as follows.\n\n### `WodProfile` methods\n\nThese methods are intended for end-user use, for decoding useful information from a profile.\n\n#### Data Retrieval\n\nThese functions decode data from the current profile.\n\n##### numpy\n\n**Per-profile data:**\n - `cruise()`: Returns the cruise number.\n - `day()`: Returns the day.\n - `latitude_unc()`: uncertainty on latitude\n - `longitude_unc()`: uncertainty on longitude\n - `latitude()`: Returns the latitude of the profile.\n - `longitude()`: Returns the longitude of the profile.\n - `month()`: Returns the month.\n - `n_levels()`: Returns the number of levels in the profile.\n - `primary_header_keys()`: Returns a list of keys in the primary header.\n - `probe_type()`: Returns the contents of secondary header 29 if it exists, otherwise None.\n - `time()`: Returns the time.\n - `uid()`: Returns the unique identifier of the profile.\n - `year()`: Returns the year. \n - `PIs()`: Returns a list of objects with keys \"Variable code\" and \"P.I. code\"\n - `originator_station()`: Returns a string denoting the originator station\n - `originator_cruise()`: Returns a string denoting the originator cruise\n - `originator_flag_type()`: Returns the index specifying the originator flag definitions (table 2.28 in http://data.nodc.noaa.gov/woa/WOD/DOC/wodreadme.pdf)\n - `extract_secondary_header(index)`: returns the value of the secondary header indexed by the `index` argument, where this index corresponds to the 'ID' column of table 4 in https://data.nodc.noaa.gov/woa/WOD/DOC/wodreadme.pdf. For example, `extract_secondary_header(29)` is exactly equivalent to `probe_type()`.\n\n**Per-level data:**\n - `s_unc()`: Returns a numpy masked array of salinity uncertainties\n - `t_unc()`: Returns a numpy masked array of temperature uncertainties\n - `z_unc()`: Returns a numpy masked array of depth uncertainties\n - `oxygen()`: Returns a numpy masked array of oxygen content (mL / L).\n - `p()`: Returns a numpy masked array of pressures (decibar).\n - `pH()`: Returns a numpy masked array of pH levels.\n - `phosphate()`: Returns a numpy masked array of phosphate content (uM / L).\n - `s()`: Returns a numpy masked array of salinity.\n - `s_level_qc(originator=False)`: Returns the quality control flag for each salinity level.\n - `s_metadata()`: returns a list of dictionaries describing available salinity metadata\n - `s_profile_qc(originator=False)`: Returns the quality control flag for the salinity profile. \n - `s_qc_mask()`: Returns a boolean array showing which salinity levels failed quality control. If the entire cast was rejected then all levels are set to True.\n - `silicate()`: Returns a numpy masked array of silicate content (uM / L).\n - `t()`: Returns a numpy masked array of temperatures (C).\n - `t_level_qc(originator=False)`: Returns the quality control flag for each temperature level.\n - `t_metadata()`: returns a list of dictionaries describing available temperature metadata\n - `t_profile_qc(originator=False)`: Returns the quality control flag for the temperature profile.\n - `t_qc_mask()`: Returns a boolean array showing which temperature levels failed quality control. If the entire cast was rejected then all levels are set to True.\n - `z()`: Returns a numpy masked array of depths. \n - `z_level_qc(originator=False)`: Returns a numpy masked array of depth quality control flags. Set the originator option if the originator flags are required.\n\nConstructing the per-level `ndarrays` should not be done more than once per profile; for convenience, we provide the following wrapper to pull all this information out at once:\n - `npdict()`: Returns a `dict` with keys identical to the function names above, and corresponding values equal to the return values of those functions when run with default parameter values.\n\n##### pandas\n\n`profile.df()` returns a pandas `DataFrame`, with per-level information as columns and per-profile information as keys in a `.meta` attribute:\n\n**Columns:**\n - `oxygen`: oxygen content (mL / L)\n - `p`: pressure (decibar)\n - `pH`: pH levels\n - `phosphate`: phosphate content (uM / L)\n - `silicate`: silicate content (uM / L)\n - `t`: level temperature in Celcius\n - `t_level_qc`: level temperature qc flags (0 == all good)\n - `t_unc`: temperature uncertainty\n - `s`: level salinities\n - `s_level_qc`: level salinity qc flags (0 == all good)\n - `s_unc`: salinity uncertainty\n - `z`: level depths in meters\n - `z_level_qc`: level depth qc flags (0 == all good)\n - `z_unc`: depth uncertainty\n\n**Attributes:**\n\nThe following are keys in a `.meta` dictionary on the dataframe:\n\n - `cruise`: cruise ID number\n - `day`: of the month on [1, 31]\n - `latitude_unc`: uncertainty on latitude\n - `longitude_unc`: uncertainty on longitude\n - `latitude`: in degrees\n - `longitude`: in degrees\n - `month`: of the year on [1, 12]\n - `n_levels`: number of levels in profile (ie number of rows in dataframe)\n - `originator_station`\n - `originator_cruise`\n - `originator_flag_type`\n - `PIs`\n - `probe_type`: The contents of secondary header 29 if it exists, otherwise None.\n - `s_metadata`: list of dicts describing available salinity metadata\n - `t_metadata`: list of dicts describing available temperature metadata\n - `time`: in hours on the range [0, 24)\n - `uid`: unique identifier of profile\n - `year`\n\n Note that `DataFrame` attributes generally do not propagate to new `DataFrames` returned by operating on original `DataFrame`s.\n\n**Headers Only**\n - `header()`: Returns a pandas `Series` with only the header information for the profile, keyed as the custom attributes on the full data frame described above.\n\n##### CoTeDe\n\nCoTeDe is a package to quality control hydrographic data, and t\n\nThe class `Wod4CoTeDe` provides a WOD profile in the format required by CoTeDe, which is a package to quality control hydrographic data. One could use it like:\n\n>>> from wodpy.extra import Wod4CoTeDe\n\n>>> fid = open('example.dat')\n>>> p = WodProfile(fid)\n>>> profile = Wod4CoTeDe(p)\n\nor\n>>> fid = open('example.data')\n>>> profile = Wod4CoTeDe(fid)\n\nTo quality control that profile with the EuroGOOS standard:\n>>> from cotede.qc import ProfileQC\n>>> pqc = ProfileQC(profile, 'eurogoos')\n\nAll the information about the profile can be obtained at: pqc.attributes, pqc.data and pqc.flags. For more information, check CoTeDe's manual.",
"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/IQuOD/wodpy",
"keywords": "",
"license": "MIT",
"maintainer": "",
"maintainer_email": "",
"name": "wodpy",
"package_url": "https://pypi.org/project/wodpy/",
"platform": "",
"project_url": "https://pypi.org/project/wodpy/",
"project_urls": {
"Homepage": "https://github.com/IQuOD/wodpy"
},
"release_url": "https://pypi.org/project/wodpy/1.6.1/",
"requires_dist": null,
"requires_python": "",
"summary": "A parser for the WOD data format, described in http://data.nodc.noaa.gov/woa/WOD/DOC/wodreadme.pdf",
"version": "1.6.1"
},
"last_serial": 5428136,
"releases": {
"0.1": [
{
"comment_text": "",
"digests": {
"md5": "132c57a6ad847b585a97cecc4c002264",
"sha256": "45d342cfb0c137e9ddb88e974ca2e5ce3f76d24f5851b00c3ff0a2990893ee16"
},
"downloads": -1,
"filename": "wodpy-0.1.tar.gz",
"has_sig": false,
"md5_digest": "132c57a6ad847b585a97cecc4c002264",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 7565,
"upload_time": "2015-07-24T17:47:09",
"url": "https://files.pythonhosted.org/packages/c0/f5/eb72079d75d1b2cf1de0e6a74240048022440ee8f03fd8fa6a97e8caba45/wodpy-0.1.tar.gz"
}
],
"0.1.1": [
{
"comment_text": "",
"digests": {
"md5": "5c82d2446c8e368d92d4b44c06d73e18",
"sha256": "42a3eebcb9f4da05ae7c34e0508fab0b007cbea5b55ca634d0cc239884700199"
},
"downloads": -1,
"filename": "wodpy-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "5c82d2446c8e368d92d4b44c06d73e18",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 7833,
"upload_time": "2015-07-24T17:51:53",
"url": "https://files.pythonhosted.org/packages/54/19/47c2e961ec0e9e6d24a3023902fe136f56d9b0adba2b3080ecb2e637487c/wodpy-0.1.1.tar.gz"
}
],
"0.2.0": [
{
"comment_text": "",
"digests": {
"md5": "6d325313253e6d4984a8c27da9017739",
"sha256": "5e7f5a69dffcf9513b1b2864e4a207ecb8024437c6517990acbf44c11e568038"
},
"downloads": -1,
"filename": "wodpy-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "6d325313253e6d4984a8c27da9017739",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 10904,
"upload_time": "2015-08-28T20:10:08",
"url": "https://files.pythonhosted.org/packages/f7/a2/a1df999dab0fa58c54ba9bbe0a4929d4527347484f80843658dc3ecc8ed0/wodpy-0.2.0.tar.gz"
}
],
"1.0": [
{
"comment_text": "",
"digests": {
"md5": "ada87dcc3045069f52c18c08bbe98c84",
"sha256": "09673b31a6f9885dbec1bacccfa4b942f78bf9825582dae5dd267cc474b81e03"
},
"downloads": -1,
"filename": "wodpy-1.0.tar.gz",
"has_sig": false,
"md5_digest": "ada87dcc3045069f52c18c08bbe98c84",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 11106,
"upload_time": "2015-09-22T01:47:50",
"url": "https://files.pythonhosted.org/packages/f3/05/ee5efef5be169eca71a435339692a2c2cbbfc0a539241754f47148e1e867/wodpy-1.0.tar.gz"
}
],
"1.1.0": [
{
"comment_text": "",
"digests": {
"md5": "e46fa3131db7e0ab1c0f81359dae006a",
"sha256": "b71bbc6abb73208ad617dd71430f5097987eed4580207e3797a2570752d05b82"
},
"downloads": -1,
"filename": "wodpy-1.1.0.tar.gz",
"has_sig": false,
"md5_digest": "e46fa3131db7e0ab1c0f81359dae006a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 11501,
"upload_time": "2015-10-25T22:21:00",
"url": "https://files.pythonhosted.org/packages/68/c3/ae6a6fb99f17d750629921e5ad10accff83d02c2219029a354b7adb71d4b/wodpy-1.1.0.tar.gz"
}
],
"1.2.0": [
{
"comment_text": "",
"digests": {
"md5": "72224e6b63ec1e5d54b143684754480b",
"sha256": "f44021b5486a561724a03cbc83bbab21d6fcb62b8280883174e1018a17a6649b"
},
"downloads": -1,
"filename": "wodpy-1.2.0.tar.gz",
"has_sig": false,
"md5_digest": "72224e6b63ec1e5d54b143684754480b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 13095,
"upload_time": "2016-03-01T17:32:10",
"url": "https://files.pythonhosted.org/packages/7e/d6/2b9f108302213ef72341b6b87009076ee49d6f5d8e6a60575047c7b157a3/wodpy-1.2.0.tar.gz"
}
],
"1.3.0": [
{
"comment_text": "",
"digests": {
"md5": "40a661c3d12d644ff174e7a0ead87a8d",
"sha256": "41fc2c6f0c20fcb2074ca2e306ec033ddc6cf6b833e7e3a3f3123637d5d087e5"
},
"downloads": -1,
"filename": "wodpy-1.3.0.tar.gz",
"has_sig": false,
"md5_digest": "40a661c3d12d644ff174e7a0ead87a8d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 13154,
"upload_time": "2016-03-20T21:44:50",
"url": "https://files.pythonhosted.org/packages/48/f7/bda6279fdf77e7a351c3bdf2fccf1a01dc508524e63b54aaa598c4af7fbb/wodpy-1.3.0.tar.gz"
}
],
"1.4.0": [
{
"comment_text": "",
"digests": {
"md5": "91d218d58d3efb3939cae3edf781d313",
"sha256": "4f0369efe0ad6e17c614bc8ab128ed7a4e93ce39083fadc8363ed91c3111ec42"
},
"downloads": -1,
"filename": "wodpy-1.4.0.tar.gz",
"has_sig": false,
"md5_digest": "91d218d58d3efb3939cae3edf781d313",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 13674,
"upload_time": "2016-12-30T23:15:39",
"url": "https://files.pythonhosted.org/packages/d9/63/47509a37c5c921e4ceca7681640bd3c0674b9e45a2f197da32182139e8d9/wodpy-1.4.0.tar.gz"
}
],
"1.4.1": [
{
"comment_text": "",
"digests": {
"md5": "ec12cf0527566ef7783e69c9f822dcf1",
"sha256": "361b706ba62ee7f50b0a61c065dd3961756affd727a3bc6e092e6fe6f7a8e24d"
},
"downloads": -1,
"filename": "wodpy-1.4.1.tar.gz",
"has_sig": false,
"md5_digest": "ec12cf0527566ef7783e69c9f822dcf1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 13703,
"upload_time": "2017-05-19T22:18:07",
"url": "https://files.pythonhosted.org/packages/96/d5/e5c91ab358c586362f71ce087cc0512f79c35078dc061d7bfc6b69128fc3/wodpy-1.4.1.tar.gz"
}
],
"1.5.0": [
{
"comment_text": "",
"digests": {
"md5": "9fc2d97168cc863bae82bc117b3176a4",
"sha256": "79e6362c3a752218322692edd1231daa925e75e6f868267d1b14b5dfcd8e81bf"
},
"downloads": -1,
"filename": "wodpy-1.5.0.tar.gz",
"has_sig": false,
"md5_digest": "9fc2d97168cc863bae82bc117b3176a4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 14123,
"upload_time": "2017-08-05T20:55:41",
"url": "https://files.pythonhosted.org/packages/ab/5e/7b79d0feabab5cfd6d4c9e28a3580a65d1cb023ca93ebaf493bba291fc6a/wodpy-1.5.0.tar.gz"
}
],
"1.6.0": [
{
"comment_text": "",
"digests": {
"md5": "b2606a96d83f503585a2f7d45406b58a",
"sha256": "e8fd0b49e6c12826dff3a2870e2eaffcb405604c01d0c34e268d51c33fddde2c"
},
"downloads": -1,
"filename": "wodpy-1.6.0.tar.gz",
"has_sig": false,
"md5_digest": "b2606a96d83f503585a2f7d45406b58a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 11818,
"upload_time": "2018-07-01T14:33:00",
"url": "https://files.pythonhosted.org/packages/27/92/438497ed5d584248cf2b3427d1a396b343eca4004f14cad93df8f606e1b4/wodpy-1.6.0.tar.gz"
}
],
"1.6.1": [
{
"comment_text": "",
"digests": {
"md5": "a2572727b0551ae257b61799cba07b92",
"sha256": "798b0bb4de0a3541f39fc44597276ef772ba3a0552806001118fd63544a9cc24"
},
"downloads": -1,
"filename": "wodpy-1.6.1.tar.gz",
"has_sig": false,
"md5_digest": "a2572727b0551ae257b61799cba07b92",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 14850,
"upload_time": "2019-06-21T00:10:48",
"url": "https://files.pythonhosted.org/packages/c5/44/fba1e346e8ae0aaec493bf053d725e2008da2e8f6bebfa2fddc036eaa1f7/wodpy-1.6.1.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "a2572727b0551ae257b61799cba07b92",
"sha256": "798b0bb4de0a3541f39fc44597276ef772ba3a0552806001118fd63544a9cc24"
},
"downloads": -1,
"filename": "wodpy-1.6.1.tar.gz",
"has_sig": false,
"md5_digest": "a2572727b0551ae257b61799cba07b92",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 14850,
"upload_time": "2019-06-21T00:10:48",
"url": "https://files.pythonhosted.org/packages/c5/44/fba1e346e8ae0aaec493bf053d725e2008da2e8f6bebfa2fddc036eaa1f7/wodpy-1.6.1.tar.gz"
}
]
}