Interpolation component for grib2io providing a Python interface to NCEPLIBS-ip
Project description
grib2io-interp: Spatial Interpolation component for grib2io
Introduction
grib2io-interp
is the spatial interpolation component for grib2io. This package provides a Python interface to the NCEPLIBS-ip Fortran Library and contains a single NumPy/F2PY extension module. Originally, it was a part of the grib2io package, but since it requires NumPy's distutil's Extension
and setup
to build and install, it needs to be handled separately from the other grib2io source that are using setuptools
. This package contains an extension module, interpolate
, that provides interfaces to Fortran subroutines and these subroutines serve as wrappers to NCEPLIBS-ip subroutines. The following table illustrates the mapping:
grib2io-interp | NCEPLIBS-ip |
---|---|
interpolate.interpolate_scalar | ipolates_grib2 |
interpolate.interpolate_vector | ipolatev_grib2 |
NOTE: It is recommended that you use grib2io.interpolate
function to access the interpolation subroutines provided by grib2io-interp.
Documentation
Required Software
Despite this package being a component for grib2io, grib2io is not a formal dependency for grib2io-interp.
- Python 3.8+
- NCEPLIBS-sp 2.4.0+
- NCEPLIBS-ip 4.1.0+
- setuptools 61.0+
- NumPy 1.22+
- Fortran Compiler: GNU (gfortran) and Intel (ifort) been tested.
NCEPLIBS Libraries
sp and ip
The NCEP Spectral Interpolation (NCEPLIBS-sp) library is a dependency for the NCEP Interpolation (NCEPLIBS-ip) library. Both of these libraries are Fortran-based and contains OpenMP directives.
Installation
If NCEPLIBS-sp, and NCEPLIBS-ip libraries have been installed to custom locations (i.e. not default paths), then define the root of these installations via environment variables SP_DIR
, and IP_DIR
, respectively.
pip install grib2io-interp
Build and Install from Source
-
Clone GitHub repository or download a source release from GitHub or PyPI.
-
Edit
setup.cfg
to define the sp, and ip library installation paths OR defineSP_DIR
andIP_DIR
environment variables. -
Build and install. Use
--user
to install into personal space ($HOME/.local
).
pip install .
To build with Intel compilers, perform the following
pip install . --config-settings="--build-option=build --fcompiler=intelem"
Disclaimer
This repository is a scientific product and is not official communication of the National Oceanic and Atmospheric Administration, or the United States Department of Commerce. All NOAA GitHub project code is provided on an 'as is' basis and the user assumes responsibility for its use. Any claims against the Department of Commerce or Department of Commerce bureaus stemming from the use of this GitHub project will be governed by all applicable Federal law. Any reference to specific commercial products, processes, or services by service mark, trademark, manufacturer, or otherwise, does not constitute or imply their endorsement, recommendation or favoring by the Department of Commerce. The Department of Commerce seal and logo, or the seal and logo of a DOC bureau, shall not be used in any manner to imply endorsement of any commercial product or activity by DOC or the United States Government.
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.