Skip to content

Commit b9a919c

Browse files
committed
Use pdbufr to read DWD radar data in bufr format
1 parent 48fc337 commit b9a919c

File tree

9 files changed

+177
-50
lines changed

9 files changed

+177
-50
lines changed

.github/workflows/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ fi
1010
echo "Installing package and requirements for ${flavor}"
1111

1212
if [[ "${flavor}" = "testing" ]]; then
13-
poetry install --no-interaction --extras=sql --extras=export --extras=restapi --extras=explorer
13+
poetry install --no-interaction --extras=sql --extras=export --extras=restapi --extras=explorer --extras=bufr --extras=pdbufr
1414

1515
elif [[ "${flavor}" = "docs" ]]; then
1616
poetry install --no-interaction --extras=docs

.github/workflows/tests.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,15 @@ jobs:
5353
path: ${{ steps.poetry-cache-dir.outputs.dir }}
5454
key: poetry-${{ runner.os }}-py${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }}-${{ env.CACHE_NUMBER }}
5555

56+
- name: Install eccodes (Mac only)
57+
run: |
58+
if [ "$RUNNER_OS" == "macOS" ]; then
59+
brew install eccodes
60+
fi
61+
shell: bash
62+
5663
- name: Install dependencies
57-
#run: poetry install --no-interaction --no-root --extras=sql --extras=export --extras=restapi --extras=explorer
5864
run: .github/workflows/install.sh testing
59-
#if: steps.poetry-cache-flag.outputs.cache-hit != 'true'
60-
61-
#- name: Install library
62-
# run: poetry install --no-interaction
63-
# #if: steps.poetry-cache-flag.outputs.cache-hit != 'true'
6465

6566
- name: Test
6667
run: poetry run poe test

CHANGELOG.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Added
99

1010
- Enable selecting a parameter precisely from a dataset by passing a tuple like [("precipitation_height", "kl")] or
1111
[("precipitation_height", "precipitation_more")], or for cli/restapi use "precipitation_height/kl"
12+
- Allow parsing DWD radar data in bufr format to a pandas DataFrame
1213

1314
Changed
1415
=======

poetry.lock

Lines changed: 75 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ click-params = "^0.1.1"
104104
cloup = "^0.8.0"
105105

106106
# Optional dependencies aka. "extras"
107-
matplotlib = { version = "^3.3.2", optional = true }
107+
matplotlib = { version = "^3.3.2", optional = true }
108108

109109
openpyxl = { version = "^3.0.7", optional = true }
110110
pyarrow = { version = "^3.0.0", optional = true, markers = "sys_platform != 'darwin' or (sys_platform == 'darwin' and platform_machine != 'arm64')" }
@@ -119,23 +119,25 @@ psycopg2-binary = { version = "^2.8.6", optional = true }
119119
# HTTP REST API service
120120
fastapi = { version = "^0.61.1", optional = true }
121121
uvicorn = { version = "^0.13.3", optional = true }
122+
123+
# Radar
122124
wradlib = { version = "^1.9.0", optional = true }
125+
pdbufr = { version = "^0.9.0", optional = true }
123126

124127
# Explorer UI service
125128
plotly = { version = "^4.14.3", optional = true }
126129
dash = { version = "^1.19.0", optional = true }
127130
dash-bootstrap-components = { version = "^0.12.0", optional = true }
128131

129-
sphinx = { version = "^3.2.1", optional = true }
130-
sphinx-material = { version = "^0.0.30", optional = true }
131-
sphinx-autodoc-typehints = { version = "^1.11.0", optional = true }
132-
sphinxcontrib-svg2pdfconverter = { version = "^1.1.0", optional = true }
133-
tomlkit = { version = "^0.7.0", optional = true }
134-
ipython = { version = "^7.10.1", optional = true }
135-
ipython-genutils = { version = "^0.2.0", optional = true }
136-
zarr = { version = "^2.7.0", optional = true, markers = "sys_platform != 'darwin' or (sys_platform == 'darwin' and platform_machine != 'arm64')" } # not supported through numcodecs
137-
xarray = { version = "^0.17.0", optional = true }
138-
132+
sphinx = { version = "^3.2.1", optional = true }
133+
sphinx-material = { version = "^0.0.30", optional = true }
134+
sphinx-autodoc-typehints = { version = "^1.11.0", optional = true }
135+
sphinxcontrib-svg2pdfconverter = { version = "^1.1.0", optional = true }
136+
tomlkit = { version = "^0.7.0", optional = true }
137+
ipython = { version = "^7.10.1", optional = true }
138+
ipython-genutils = { version = "^0.2.0", optional = true }
139+
zarr = { version = "^2.7.0", optional = true, markers = "sys_platform != 'darwin' or (sys_platform == 'darwin' and platform_machine != 'arm64')" } # not supported through numcodecs
140+
xarray = { version = "^0.17.0", optional = true }
139141

140142
[tool.poetry.dev-dependencies]
141143
black = "^20.8b1"
@@ -183,8 +185,8 @@ influxdb = ["influxdb", "influxdb-client"]
183185
cratedb = ["crate"]
184186
mysql = ["mysqlclient"]
185187
postgresql = ["psycopg2-binary"]
186-
radar = ["wradlib", "pybufrkit", "h5py"]
187-
bufr = ["pybufrkit"]
188+
radar = ["wradlib", "pybufrkit", "h5py", "pdbufr"]
189+
bufr = ["pybufrkit", "pdbufr"]
188190

189191
[tool.poetry.scripts]
190192
wetterdienst = 'wetterdienst.ui.cli:cli'

tests/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,7 @@
1010
mac_arm64_unsupported = pytest.mark.skipif(
1111
mac_arm64, reason="can't be tested under mac arm64 due to h5py incompatibility"
1212
)
13+
mac_only = pytest.mark.skipif(
14+
sys.platform.startswith("win") or sys.platform.startswith("lin"),
15+
reason="can't be tested under windows due to eccodes incompatibility",
16+
)

0 commit comments

Comments
 (0)