Skip to main content

Horizontal Wind Model 1993 in Python

Project description

Build Status Coverage Status Build status PyPi version PyPi formats PyPi Download stats

HWM93 in Python

NASA Horizontal Wind Model HWM93 in Python ≥ 3.6


Works with many Fortran compilers, including:

  • Gfortran 5, 6, 7, 8
  • Intel ifort
  • PGI pgf90
  • Nvidia flang


pip install -e .

test by

pytest -sv


HWM93 can be used from the command line or as an imported Python module in other programs. Matlab ≥ R2014b also can use HWM93.

Command line

RunHWM93 -h

Write data to NetCDF (HDF5) with -o option.

import module

import hwm93
from datetime import datetime

winds =,11,12,8), altkm=150., 
                    glat=65., glon=-148., f107a=150, f107=150, ap=4)

winds is an xarray.Dataset

Dimensions:     (alt_km: 1)
  * alt_km      (alt_km) float64 150.0
Data variables:
    meridional  (alt_km) float64 4.827
    zonal       (alt_km) float64 -20.5
    time:     2017-11-12T08:00:00
    glat:     65.0
    glon:     -148.0

If you want just a single variable, say



You can import this Python module from Matlab ≥ R2014b as in hwm93.m


[Optional] Fortran-only use

Most users don't need this.

cd bin
cmake ..
cmake --build .
ctest -V


f2py -c src/hwm93_sub.f  -m hwm93 only: gws5 :


Original A. E. Hedin Fortran 77 HWM93 code

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

hwm93-0.9.1.tar.gz (23.0 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page