pyodim


Namepyodim JSON
Version 0.4 PyPI version JSON
download
home_pagehttps://github.com/vlouf/pyodim
SummaryAn ODIM hdf5 file reader.
upload_time2024-01-18 00:11:30
maintainer
docs_urlNone
authorValentin Louf
requires_python
license
keywords odim h5 file reader
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # PYODIM

A simple ODIM H5 (Opera Data Information Model - Hierarchical Data Format 
version 5) radar reader in Python. It outputs the radar date in an xarray 
Dataset. The goal is to be as barebone as possible while providing an xarray, 
so that it can easily scale up (production) or just a very lean reader for 
quicklooks into the data.

## Example

```python

import pyodim

filename = "/path/to/radar/file.h5"
rset = pyodim.read_odim(filename, lazy_load=True)  # Lazy load does not load the data in memory to save time if you are interested in only a specific sweep
radar = rset[0].compute()  # All sweeps are in a list (elevation ascending), so the 1st item of the list is the bottom sweep.
print(radar)
```

This code will output the radar data for the first sweep (lowest elevation 
scan) in the radar file as an xarray Dataset, for example:

```python
<xarray.Dataset>
Dimensions:     (azimuth: 360, range: 1283, elevation: 1, time: 360)
Coordinates:
  * range       (range) float32 125.0 375.0 625.0 ... 3.204e+05 3.206e+05
  * azimuth     (azimuth) float32 0.01111 1.011 2.011 ... 357.0 358.0 359.0
  * elevation   (elevation) float32 0.5
  * time        (time) datetime64[ns] 2024-01-16T02:49:29.337047353 ... 2024-...
Data variables: (12/17)
    DBZH        (azimuth, range) float64 nan nan nan nan nan ... nan nan nan nan
    SNRH        (azimuth, range) float64 nan nan nan nan nan ... nan nan nan nan    
    VRADH       (azimuth, range) float64 nan nan nan nan nan ... nan nan nan nan
    WRADH       (azimuth, range) float64 nan nan nan nan nan ... nan nan nan nan
    KDP         (azimuth, range) float64 nan nan nan nan nan ... nan nan nan nan
    ...          ...
    x           (azimuth, range) float32 0.02424 0.07271 ... -5.595e+03
    y           (azimuth, range) float32 125.0 375.0 ... 3.203e+05 3.206e+05
    z           (azimuth, range) float32 45.09 47.27 ... 2.84e+03 2.842e+03
    longitude   (azimuth, range) float32 144.8 144.8 144.8 ... 144.7 144.7 144.7
    latitude    (azimuth, range) float32 -37.85 -37.85 -37.85 ... -34.97 -34.96
Attributes: (12/15)
    Conventions:  ODIM_H5/V2_4
    latitude:     -37.85200119018555
    longitude:    144.75199890136722
    height:       44.0
    date:         2024-01-16T02:45:21
    object:       PVOL
    ...           ...
    beamwV:       1.0
    wavelength:   10.489999771118164
    NI:           36.5052
    highprf:      696.0
    start_time:   20240116_024928
    end_time:     20240116_024958
```

PYODIM reads the ODIM radar data and metadata. It also provides some quality of 
life feature like automatically creating the x, y, z and latitude/longitude 
coordinates for all radar gates (using the azimuthal equidistant - `aeqd` - projection). By 
default it uses `dask.delayed` to *lazily* load the data, meaning that it will 
not actually load all the sweeps in memory, as for many applications we often 
don't need all the radar sweeps. Instead, by calling the `.compute()` method 
like in the example above, PYODIM will only read and load in memory the sweep 
that you want, saving time. If you want to read all the sweeps at once in a 
list, then just set `lazy_load=False`.

## Dependencies

Mandatory:
- [numpy][1]
- [xarray][2]
- [pyproj][3]
- [dask][4]

And optionally (it will automatically populate the fields metadata using pyart 
if available): 
- [Py-ART][5] 

[1]: http://www.scipy.org/
[2]: http://numba.pydata.org
[3]: https://pypi.org/project/pyproj/
[4]: https://www.dask.org/
[5]: https://github.com/ARM-DOE/pyart

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/vlouf/pyodim",
    "name": "pyodim",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "odim h5 file reader",
    "author": "Valentin Louf",
    "author_email": "valentin.louf@bom.gov.au",
    "download_url": "https://files.pythonhosted.org/packages/02/0e/c383199579641781b8cffd4a26bd13f02f55cc7c3d6770e22f70f2c75710/pyodim-0.4.tar.gz",
    "platform": null,
    "description": "# PYODIM\r\n\r\nA simple ODIM H5 (Opera Data Information Model - Hierarchical Data Format \r\nversion 5) radar reader in Python. It outputs the radar date in an xarray \r\nDataset. The goal is to be as barebone as possible while providing an xarray, \r\nso that it can easily scale up (production) or just a very lean reader for \r\nquicklooks into the data.\r\n\r\n## Example\r\n\r\n```python\r\n\r\nimport pyodim\r\n\r\nfilename = \"/path/to/radar/file.h5\"\r\nrset = pyodim.read_odim(filename, lazy_load=True)  # Lazy load does not load the data in memory to save time if you are interested in only a specific sweep\r\nradar = rset[0].compute()  # All sweeps are in a list (elevation ascending), so the 1st item of the list is the bottom sweep.\r\nprint(radar)\r\n```\r\n\r\nThis code will output the radar data for the first sweep (lowest elevation \r\nscan) in the radar file as an xarray Dataset, for example:\r\n\r\n```python\r\n<xarray.Dataset>\r\nDimensions:     (azimuth: 360, range: 1283, elevation: 1, time: 360)\r\nCoordinates:\r\n  * range       (range) float32 125.0 375.0 625.0 ... 3.204e+05 3.206e+05\r\n  * azimuth     (azimuth) float32 0.01111 1.011 2.011 ... 357.0 358.0 359.0\r\n  * elevation   (elevation) float32 0.5\r\n  * time        (time) datetime64[ns] 2024-01-16T02:49:29.337047353 ... 2024-...\r\nData variables: (12/17)\r\n    DBZH        (azimuth, range) float64 nan nan nan nan nan ... nan nan nan nan\r\n    SNRH        (azimuth, range) float64 nan nan nan nan nan ... nan nan nan nan    \r\n    VRADH       (azimuth, range) float64 nan nan nan nan nan ... nan nan nan nan\r\n    WRADH       (azimuth, range) float64 nan nan nan nan nan ... nan nan nan nan\r\n    KDP         (azimuth, range) float64 nan nan nan nan nan ... nan nan nan nan\r\n    ...          ...\r\n    x           (azimuth, range) float32 0.02424 0.07271 ... -5.595e+03\r\n    y           (azimuth, range) float32 125.0 375.0 ... 3.203e+05 3.206e+05\r\n    z           (azimuth, range) float32 45.09 47.27 ... 2.84e+03 2.842e+03\r\n    longitude   (azimuth, range) float32 144.8 144.8 144.8 ... 144.7 144.7 144.7\r\n    latitude    (azimuth, range) float32 -37.85 -37.85 -37.85 ... -34.97 -34.96\r\nAttributes: (12/15)\r\n    Conventions:  ODIM_H5/V2_4\r\n    latitude:     -37.85200119018555\r\n    longitude:    144.75199890136722\r\n    height:       44.0\r\n    date:         2024-01-16T02:45:21\r\n    object:       PVOL\r\n    ...           ...\r\n    beamwV:       1.0\r\n    wavelength:   10.489999771118164\r\n    NI:           36.5052\r\n    highprf:      696.0\r\n    start_time:   20240116_024928\r\n    end_time:     20240116_024958\r\n```\r\n\r\nPYODIM reads the ODIM radar data and metadata. It also provides some quality of \r\nlife feature like automatically creating the x, y, z and latitude/longitude \r\ncoordinates for all radar gates (using the azimuthal equidistant - `aeqd` - projection). By \r\ndefault it uses `dask.delayed` to *lazily* load the data, meaning that it will \r\nnot actually load all the sweeps in memory, as for many applications we often \r\ndon't need all the radar sweeps. Instead, by calling the `.compute()` method \r\nlike in the example above, PYODIM will only read and load in memory the sweep \r\nthat you want, saving time. If you want to read all the sweeps at once in a \r\nlist, then just set `lazy_load=False`.\r\n\r\n## Dependencies\r\n\r\nMandatory:\r\n- [numpy][1]\r\n- [xarray][2]\r\n- [pyproj][3]\r\n- [dask][4]\r\n\r\nAnd optionally (it will automatically populate the fields metadata using pyart \r\nif available): \r\n- [Py-ART][5] \r\n\r\n[1]: http://www.scipy.org/\r\n[2]: http://numba.pydata.org\r\n[3]: https://pypi.org/project/pyproj/\r\n[4]: https://www.dask.org/\r\n[5]: https://github.com/ARM-DOE/pyart\r\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "An ODIM hdf5 file reader.",
    "version": "0.4",
    "project_urls": {
        "Bug Reports": "https://github.com/vlouf/pyodim/issues",
        "Homepage": "https://github.com/vlouf/pyodim",
        "Source": "https://github.com/vlouf/pyodim/"
    },
    "split_keywords": [
        "odim",
        "h5",
        "file",
        "reader"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "020ec383199579641781b8cffd4a26bd13f02f55cc7c3d6770e22f70f2c75710",
                "md5": "b1708b53e335289311b3f99313c40cbf",
                "sha256": "079dc65910b5dbcf90311e361868b4542945d25c0a03728d9514b057902598fd"
            },
            "downloads": -1,
            "filename": "pyodim-0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "b1708b53e335289311b3f99313c40cbf",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 9715,
            "upload_time": "2024-01-18T00:11:30",
            "upload_time_iso_8601": "2024-01-18T00:11:30.735105Z",
            "url": "https://files.pythonhosted.org/packages/02/0e/c383199579641781b8cffd4a26bd13f02f55cc7c3d6770e22f70f2c75710/pyodim-0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-18 00:11:30",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "vlouf",
    "github_project": "pyodim",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pyodim"
}
        
Elapsed time: 0.15590s