Skip to main content

NWC-SAFer CLI tool simplifying NetCDF data extraction and conversion of NWC-SAF products.

Project description

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

PyPi (recommended)

  • 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:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nwc_safer-0.8.0.tar.gz (13.8 kB view details)

Uploaded Source

Built Distribution

nwc_safer-0.8.0-cp310-cp310-win_amd64.whl (11.8 kB view details)

Uploaded CPython 3.10 Windows x86-64

File details

Details for the file nwc_safer-0.8.0.tar.gz.

File metadata

  • Download URL: nwc_safer-0.8.0.tar.gz
  • Upload date:
  • Size: 13.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.0 CPython/3.10.10 Windows/10

File hashes

Hashes for nwc_safer-0.8.0.tar.gz
Algorithm Hash digest
SHA256 38cd684ecd5b68306116fdc1330b564c8ddb61e13c5394a0297dfbbe61181195
MD5 78b5c483922ebb144639f7612d9c56d2
BLAKE2b-256 faa27aa359f584888d90bfaa768fc6f3a0a3e82641c1f96eb060d7390403d9af

See more details on using hashes here.

File details

Details for the file nwc_safer-0.8.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: nwc_safer-0.8.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 11.8 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.0 CPython/3.10.10 Windows/10

File hashes

Hashes for nwc_safer-0.8.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 873433103eb4c389f4580b308fee9bc792ee0679b4420d79af04814a28bc1f6a
MD5 4fbe7f19caf0fe1d169f07a77388ff0b
BLAKE2b-256 8df3ef31da2ab826c0668b1ce804fe440070ad121d2c6aa238f3bf3f54abc554

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page