Tools to download (relevant parts of) various NWP products.
Project description
NWP Downloading Utilities
Contains utilities for downloading (relevant parts) of NWP products.
Currently focussing on MetNo.
Product | Remote Access (OPeNDAP) | Local Access (NetCDF4) | Comment |
---|---|---|---|
MEPS | Yes | No | |
MyWaveWAM | Yes | Yes | Broken |
NorKyst800m | Yes | No |
The package is pre-Alpha software. It does what we need it to do and not much more.
Development
We'll assume you're using Miniforge.
Setting up a development space
conda create --name nwpdl-dev
conda activate nwpdl-dev
mamba install numpy xarray pandas pytest pyresample netCDF4 dask
conda deactivate nwpdl-dev
conda activate nwpdl-dev
To run the tests, simply run pytest
in the base directory.
Development Mode
You can use development mode to make the current version of the code available to other packages. To proceed, enter the virtual environment of whatever program you're working on, navigate to the ./nwp_dl_utils
root directory, remove the existing installation of nwp-dl-utils
(if it exists), and install it in development mode, viz.
pip uninstall nwp-dl-utils
pip install --editable .
When done, remove, and reinstall the version from PyPI
, viz.
pip uninstall nwl-dl-utils
pip install --ugrade nwp-dl-utils
This needs pip>=21.3
, see here and here. You can upgrade Pip via pip install --upgrade pip
.
Build and Distribute
Setup environment
conda create --name nwpdl-build
conda activate nwpdl-build
pip install --upgrade pip
pip install --upgrade build
pip install --upgrade twine
Build and upload
python -m build
python -m twine upload --repository testpypi dist/*
Drop --repository testpypi
to upload to real PyPI.
Test build
conda create --name nwpdl-test
conda activate nwpdl-test
pip install --index-url https://test.pypi.org/simple/ --no-deps nwp-dl-utils
Drop --index-url https://test.pypi.org/simple/ --no-deps
to download from real PyPI.
References
- https://packaging.python.org/en/latest/tutorials/packaging-projects/.
- https://setuptools.pypa.io/en/latest/userguide/development_mode.html
Blame and Contact
- Volker Hoffmann (volker.hoffmann@sintef.no)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file nwp_dl_utils-0.0.12.tar.gz
.
File metadata
- Download URL: nwp_dl_utils-0.0.12.tar.gz
- Upload date:
- Size: 94.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 097f676c33cb20715958384e81f9ef5019167518992740ce9b8212cff7fb70f4 |
|
MD5 | 83e6f8b69e639ca41c5ad0d4dff20883 |
|
BLAKE2b-256 | de5d0ebc5f1ab9bf262da511c950ea9a9f94bbdaa3a2bf55f3659455c7a93ae3 |
File details
Details for the file nwp_dl_utils-0.0.12-py3-none-any.whl
.
File metadata
- Download URL: nwp_dl_utils-0.0.12-py3-none-any.whl
- Upload date:
- Size: 10.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 617731e97a9d96f6b29168868de7766332ff5bb663fe8e2af48488662324a56e |
|
MD5 | 601fd9c1616d3eaff7b0374bbf37fb8d |
|
BLAKE2b-256 | a839ca90c1f8634f2416e33fca5aed2a21a6a1d2ceb1f883c73cae47808506e4 |