All Projects → space-physics → hwm93

space-physics / hwm93

Licence: MIT license
NASA Horizontal Wind Model HWM93 in Python and Matlab

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects
matlab
3953 projects
Meson
512 projects
CMake
9771 projects

Projects that are alternatives of or similar to hwm93

piradar
Radar using Red Pitaya for RF: using Raspberry Pi 3 for quad-core radar signal processing
Stars: ✭ 59 (+321.43%)
Mutual labels:  geoscience, ionosphere
xdem
Analysis of digital elevation models (DEMs)
Stars: ✭ 50 (+257.14%)
Mutual labels:  geoscience
Petropy
A petrophysics python package for geoscience python computing of conventional and unconventional formation evaluation. Reads las files and creates a pandas dataframe of the log data. Includes a basic petrophysical workflow and a simple log viewer based on XML templates.
Stars: ✭ 115 (+721.43%)
Mutual labels:  geoscience
f2py-examples
Examples of using f2py to get high-speed Fortran integrated with Python easily
Stars: ✭ 44 (+214.29%)
Mutual labels:  f2py
Aspect
A parallel, extensible finite element code to simulate convection in both 2D and 3D models.
Stars: ✭ 120 (+757.14%)
Mutual labels:  geoscience
mesos-pinspider
A framework called "pinspider" on Apache mesos, to get basic user information from a pinterest page of a user.
Stars: ✭ 18 (+28.57%)
Mutual labels:  mesosphere
Notebooks
IPython Notebooks
Stars: ✭ 91 (+550%)
Mutual labels:  geoscience
Thredds
THREDDS Data Server v4.6
Stars: ✭ 249 (+1678.57%)
Mutual labels:  geoscience
try-gmt
Try GMT, PyGMT, and GMT.jl online! All in one place!
Stars: ✭ 34 (+142.86%)
Mutual labels:  geoscience
spatial efd
A spatial aware implementation of elliptical Fourier analysis
Stars: ✭ 19 (+35.71%)
Mutual labels:  geoscience
2016 Ml Contest
Machine learning contest - October 2016 TLE
Stars: ✭ 135 (+864.29%)
Mutual labels:  geoscience
Mintpy
Miami InSAR time-series software in Python
Stars: ✭ 195 (+1292.86%)
Mutual labels:  geoscience
marathon-appcop
Marathon applications law enforcement
Stars: ✭ 18 (+28.57%)
Mutual labels:  mesosphere
Georinex
Python RINEX 2 / 3 NAV / OBS / sp3 reader & batch convert to HDF5 with C-like speed
Stars: ✭ 118 (+742.86%)
Mutual labels:  geoscience
python-aos-lesson
Python for Atmosphere and Ocean Scientists
Stars: ✭ 78 (+457.14%)
Mutual labels:  geoscience
Pyrate
A Python tool for estimating velocity and time-series from Interferometric Synthetic Aperture Radar (InSAR) data.
Stars: ✭ 110 (+685.71%)
Mutual labels:  geoscience
python-fortran
Python-Fortran bindings examples
Stars: ✭ 45 (+221.43%)
Mutual labels:  f2py
Estimate-Core-Permeability-from-NMR-data-using-either-Map-Inversion-or-kNN
Estimate Core-based Permeability from NMR well log data
Stars: ✭ 14 (+0%)
Mutual labels:  geoscience
rockhound
NOTICE: This library is no longer being developed. Use Ensaio instead (https://www.fatiando.org/ensaio). -- Download geophysical models/datasets and load them in Python
Stars: ✭ 33 (+135.71%)
Mutual labels:  geoscience
bun
DC/OS diagnostics bundle analysis tool
Stars: ✭ 13 (-7.14%)
Mutual labels:  mesosphere

Actions Status

PyPi version PyPi Download stats

HWM93 in Python

NASA Horizontal Wind Model HWM93 in Python ≥ 3.6

image

Works with many Fortran compilers, including:

  • Gfortran ≥ 5
  • Intel ifort
  • PGI pgf90
  • Nvidia flang

Install

A Fortran compiler such as gfortran is needed. We use f2py (part of numpy) to seamlessly use Fortran libraries from Python. If you don't have a Fortran compiler, here is how to install Gfortran:

  • Linux: apt install gfortran

  • Mac: brew install gcc

  • Windows

    pip install -e .

test by

pytest -sv

Windows

If you get ImportError on Windows for the Fortran module, try from the hwm93 directory:

del *.pyd
python setup.py build_ext --inplace --compiler=mingw32

Usage

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

Command line

python RunHWM93.py -h

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

import module

import hwm93
from datetime import datetime

winds = hwm93.run(t=datetime(2017,11,12,8), altkm=150.,
                    glat=65., glon=-148., f107a=150, f107=150, ap=4)

winds is an xarray.Dataset

 <xarray.Dataset>
Dimensions:     (alt_km: 1)
Coordinates:
  * alt_km      (alt_km) float64 150.0
Data variables:
    meridional  (alt_km) float64 4.827
    zonal       (alt_km) float64 -20.5
Attributes:
    time:     2017-11-12T08:00:00
    glat:     65.0
    glon:     -148.0

If you want just a single variable, say

print(winds.zonal.values)

Matlab

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

Notes

[Optional] Fortran-only use

Most users don't need this.

meson build

meson test -C build

or

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

Reference

Original A. E. Hedin Fortran 77 HWM93 code

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].