Skip to main content

Toolkit provided by IMK at KIT

Project description

IMK Toolkit

This toolkit provides post-processing scripts developed by members of the Institute of Meteorology and Climate Research (IMK) at the Karlsruhe Institute of Technology (KIT). The goal of this module is to gather together python post-processing scripts for the analysis of netCDF data and distribute them easily.

Usage

Simply import the library using import imktk. From then on all scripts are available using the imktk attribute:

import imktk

ds = imktk.tutorial.open_dataset("toy_weather")  # Load example dataset
anomaly_free_tmin = ds.tmin.imktk.anomalies()  # Select dataarray `xr.tmin` and execute anomalies script

The following is a list of available scripts:

Description Example usage Link to Script
Calculate temperature for adiabatic process in air ds.tmin.imktk.ad_temp(temp_at_0, press_at_0) here
Calculate monthly anomalies ds.tmin.imktk.anomalies() here
Calculate monthly climatology ds.tmin.imktk.climatology() here
Interpolation routine for flight track (incl. aircraft and satellites) ds.tmin.imktk.flight_track(**dims) here
Calculate number density from mixing ratio, temperature and pressure ds.tmin.imktk.num_den(temp, press) here
Calculate saturation vapour pressure over ice for temperatures > 110 K ds.tmin.imktk.vapour_pres_ice() here
Calculate saturation vapour pressure over liquid water for temperatures 123 K < T < 332 K ds.tmin.imktk.vapour_pres_liq() here

Getting Started

The easiest method to test the module is to use an interactive session with docker. In this environment you will have a Python 3 environment with all necessary dependencies already installed.

docker run -it imktk/imktk:latest bash

For the brave: You can test the latest release candidate by changing latest to testing

Install

Choose one of the following methods to install the package:

  1. Install using pip
  2. Install using conda
  3. Install using git clone

This package supports only Python 3 with version >=3.7. If you are using an earlier version of Python please consider updating.

pip

Releases are automatically uploaded to PyPI. Please execute following command to install the package.

python3 -m pip install imktk

conda

Currently the package does no support native installation using conda respectively conda-forge. This feature is on the roadmap and you can follow its process using issue #34. The current workaround for conda installation is to use the following steps for any given environment <env>.

  1. Activate the environment

    conda activate <env>
    
  2. Install using pip

    python3 -m pip install imktk
    

git clone

It is also possible to install the package natively by cloning the repository. If you are interested in using this method of installation please follow these steps

  1. Install build dependencies

    python3 -m pip install build
    
  2. Clone repository

    git clone https://github.com/imk-toolkit/imk-toolkit.git
    
  3. Generate the Python packages

    python3 -m build  # or `make build`
    
  4. Install packages

    pip3 install dist/imktk-<current.version>-py3-none-any.whl  # or `make install`
    

Please be aware that this package uses HDF5 and netCDF c-libraries in the backend. If you are installing using git clone the HDF5_DIR environment variable with the location of the HDF5 header files needs to be set.

Further reading

If you are interested in the inner workings of the package and details of the implementation please refer to the embedded README.md.

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

imktk-0.3.1.tar.gz (12.5 kB view details)

Uploaded Source

Built Distribution

imktk-0.3.1-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

Details for the file imktk-0.3.1.tar.gz.

File metadata

  • Download URL: imktk-0.3.1.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.10.6 Linux/5.15.0-1040-azure

File hashes

Hashes for imktk-0.3.1.tar.gz
Algorithm Hash digest
SHA256 87452c895b4dd41b87749181a7fba7f1bd5c75df57fc6e7dba1442a2c71ba426
MD5 dcdb6fcbf1563ce3a3b47a35cbd7fedb
BLAKE2b-256 a127ce0c820a5740ea31b79a591255af0e22d8a807eb60a48b3e13fd25f3bc32

See more details on using hashes here.

File details

Details for the file imktk-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: imktk-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 15.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.10.6 Linux/5.15.0-1040-azure

File hashes

Hashes for imktk-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 845832004cbbb496405575bfc69335f886e455e1f8f303e3ac6c9c5add084c60
MD5 1a3d1c096b26369db4ed825cd2dfa952
BLAKE2b-256 81f9082342a57a076c373c33defd8b20d767408d23c89239ed4e4d6d71ce07f3

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