Skip to main content
logo

NWC-SAFer

An awesome CLI tool simplifying NetCDF data extraction of NWC-SAF products and transformation to different file formats!

Last commit Issues Forks Stars License: MIT

Report Bug · Request Feature


Table of Contents

About the Project

This is a modern and simplified Command Line Interface tool created to extract info and metadata from NetCDF files and convert them into different file formats such as Csv, Excel, plain text, etc.

Its aim is to simplify data extraction from NWC SAF products and their transformation to different file formats, more readable and easier to access and edit. ΝWC-SAF is an initiative of EUMETSAT to provide operational services ensuring the optimum use of meteorological satellite data in Nowcasting and Very Short Range Forecasting.

Tech Stack

The tech stack of this project consists of the following main technologies/frameworks/tools:

  • Python

  • Typer

  • Poetry

  • Watchdog

  • Python Queues and thread handling is applied to enhance user experience

  • NetCDF4, Pandas, xarray libraries are used for file manipulation

Getting Started

Prerequisites

You just need to have installed Python language preferrably > 3.10 version and a Python package/dependency management tool like Pip, Poetry, Conda etc.

The tool is compatible with all popular OS.

Better used along with CLIs that support emojis and Unicode characters for a better user experience.

Installation

  • Install it from PyPi using pip or any other python package manager
      pip install --user nwc-safer
    
  • Enable auto-completion by executing the following command
      nwc-safer --install-completion
    

Source

  • Clone the Git repo
      git clone https://github.com/fotioudim/nwc-safer.git
    
  • Install using poetry in the corresponding directory
      poetry install
    

Run Locally

Just run it using nwc-safer. Get help for the available commands

  nwc-safer --help

Usage

Run nwc-safer or nwc-safer -- help in your CLI to get a better description of the available commands and options.

Watch directory and convert incoming files

Constantly watch a directory for incoming NetCDF files, in order to extract the desired data and export them in the form of Csv/Excel/Text files.

  nwc-safer watch [OPTIONS] [INPUT_PATH] [OUTPUT_PATH]

Arguments:

  • input_path: The path (relative/absolute) for the directory desired to be watched [default: .]
  • output_path: The path (relative/absolute) for the output directory [default: .\output]

Options:

  • --lat -la: The latitude coordinate range in ascending order, given in the form of two int values (min & max)
  • --lon -lo: The longitude coordinate range in ascending order, given in the form of two int values (min & max)
  • --format -f: The output file format [default: csv]
  • --recursive -r: Watch for incoming files recursively in all the subdirectories of the specified directory
  • --existing -e: Convert pre-existing files in the specified directory

Manual file conversion

Process a single or multiple NetCDF file(s), by extracting the desired data and exporting them in a new file format (eg. Csv, Excel).

  nwc-safer convert [OPTIONS] [FILE_PATHS]...

Arguments:

  • file_paths: The path(s) (relative/absolute) for the file(s) desired to be converted [default: None] [required]

Options:

  • --lat -la: The latitude coordinate range in ascending order, given in the form of two int values (min & max)
  • --lon -lo: The longitude coordinate range in ascending order, given in the form of two int values (min & max)
  • --output -o: The path (relative/absolute) for the output directory [default: .\output]
  • --format -f: The output file format [default: csv]

Check compatible products

Check which NWC-SAF products are currently supported by the tool

  nwc-safer compatibility

Launch Github repository

Launch NWC-SAF NetCDF Data Exporter Github repository in the web browser

  nwc-safer repo

Roadmap

  • Add continuous watching & conversion operation
  • Single conversion operation
  • OS agnostic functionality
  • Multiple conversion operation
  • Subset dataset based on coordinates range
  • Support 3 output file formats (.csv, .xlsx, txt)
  • Generalize solution for a bigger set of NWC SAF products

License

Distributed under the MIT License. See LICENSE.md for more information.

Contact

You can reach me at:

Metadata

Release files for nwc-safer 0.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nwc-safer 0.8.0
File Size Uploaded Provenance Actions
nwc_safer-0.8.0.tar.gz 13.8 kB Without provenance Details for nwc_safer-0.8.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nwc-safer 0.8.0
File Interpreter ABI Platform Actions
nwc_safer-0.8.0-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details for nwc_safer-0.8.0-cp310-cp310-win_amd64.whl

Total release size: 25.6 kB

Release files / nwc_safer-0.8.0.tar.gz

Download URL nwc_safer-0.8.0.tar.gz
Size 13.8 kB
Tags Source
SHA-256 checksum
How to use checksums
38cd684ecd5b68306116fdc1330b564c8ddb61e13c5394a0297dfbbe61181195
BLAKE2b-256 checksum
How to use checksums
faa27aa359f584888d90bfaa768fc6f3a0a3e82641c1f96eb060d7390403d9af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.0 CPython/3.10.10 Windows/10

Release files / nwc_safer-0.8.0-cp310-cp310-win_amd64.whl

Download URL nwc_safer-0.8.0-cp310-cp310-win_amd64.whl
Size 11.8 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
873433103eb4c389f4580b308fee9bc792ee0679b4420d79af04814a28bc1f6a
BLAKE2b-256 checksum
How to use checksums
8df3ef31da2ab826c0668b1ce804fe440070ad121d2c6aa238f3bf3f54abc554
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.0 CPython/3.10.10 Windows/10

Security for nwc-safer 0.8.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page