[![Zenodo DOI](https://zenodo.org/badge/32971905.svg)](https://zenodo.org/badge/latestdoi/32971905)
[![Travis-CI](https://travis-ci.org/scivision/msise00.svg)](https://travis-ci.org/scivision/msise00)
[![Coverage](https://coveralls.io/repos/scivision/msise00/badge.svg?branch=master&service=github)](https://coveralls.io/github/scivision/msise00?branch=master)
[![Build status](https://ci.appveyor.com/api/projects/status/g58w79defiiiu6j6?svg=true)](https://ci.appveyor.com/project/scivision/msise00)
[![Maintainability](https://api.codeclimate.com/v1/badges/f6f206d6f6605bcf435d/maintainability)](https://codeclimate.com/github/scivision/msise00/maintainability)
[![Python versions (PyPI)](https://img.shields.io/pypi/pyversions/msise00.svg)](https://pypi.python.org/pypi/msise00)
[![PyPi Download stats](http://pepy.tech/badge/msise00)](http://pepy.tech/project/msise00)
# MSISE-00 in Python and Matlab
NRL MSISE-00 atmospheric model for Python ≥ 3.6, also accessible via Matlab.
Valid from altitude z = 0..1000 km.
The plot immediately below shows a slice at 200km on a world-wide grid.
The yellow ball represents the sun footprint on Earth.
![MSIS global time animation](./tests/msise00_demo.gif)
This plot is from [Matlab](./tests/test_msise00_matlab.m) calling MSISE00:
![MSISE00 Matlab](./tests/msis_matlab.png)
## Install
This process is used for the Python and [Matlab](#matlab) access to MSIS.
- Mac: `brew install gcc`
- Linux: `apt install gfortran`
- [Windows](https://www.scivision.co/windows-gcc-gfortran-cmake-make-install/)
And then:
```sh
pip install -e .
```
## Examples
MSISE00 can be used from the command line, as an imported module, and even from Matlab.
### import module
```python
import msise00
from datetime import datetime
atmos = msise00.run(time=datetime(2013, 3, 31, 12), altkm=150., glat=65., glon=-148.)
```
atmos is an [xarray.Dataset](http://xarray.pydata.org/en/stable/generated/xarray.Dataset.html) containing all the simulation output values.
`atmos` is 4-D: (time, altitude, lat, lon), and indexed like `atmos['N2']`
### Command Line
Write NetCDF4 output (HDF5 compatible) with command line argument `-w filename.nc`.
Simple examples include:
* AltitudeProfile.py
* TimeProfile.py
* Worldgrid.py
* Altitude Profile at a single time:
```sh
msise00.py -t 2017-08-21T20:48 -c 40 -90
```
* Alt. profile time-range with hourly time step:
```sh
msise00.py -t 2017-08-21 2017-08-22 -c 40 -90
```
* Grid: time,lat,lon: generates the plots in the README:
```sh
msise00.py -t 2016-09-20 2016-09-21
```
* single time lat/lon can be plotted:
```sh
msise00.py -t 2017-01-02T12
```
### Matlab
Matlab and GNU Octave users can seamlessly access Python modules, as demonstrated in
[AltitudeProfile.m](./matlab/AlitudeProfile.m) and
[msise00.m](./matlab/msise00.m).
1. Install MSISe00 by running [setup_msise00.m](./matlab/setup_msise00.m)
2. From Matlab, verify everything is working by from the `msise00/` directory:
```matlab
runtests('tests')
```
## Fortran source
The MSISE00 Fortran source code may also be used directly.
We have provided for easy code reuse in
[CMake](./src/CMakeLists.txt)
and
[Meson](./src/meson.build)
projects.
## Reference
* Original fortran [code](https://ccmc.gsfc.nasa.gov/pub/modelweb/atmospheric/msis/)
* 1200+ citations 2002 [paper](http://onlinelibrary.wiley.com/doi/10.1029/2002JA009430/pdf)
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
msise00-1.3.0.2.tar.gz (53个子文件)
msise00-1.3.0.2
MANIFEST.in 317B
PKG-INFO 5KB
.coveragerc 410B
Worldgrid.py 407B
msise00
worldgrid.py 349B
plots.py 6KB
__init__.py 36B
base.py 5KB
suntest.py 1KB
msise00.py 2KB
pytest.ini 74B
AltitudeProfile.py 394B
archive
f2py.py 2KB
TimeProfile.py 437B
msise00.egg-info
PKG-INFO 5KB
requires.txt 155B
SOURCES.txt 51KB
entry_points.txt 40B
top_level.txt 8B
dependency_links.txt 1B
tests
msise00_demo.gif 3.76MB
ref1.nc 16KB
ref5.nc 14KB
test_module.py 3KB
ref4.nc 19KB
ref3.nc 77KB
test_matlab.py 671B
ref2.nc 16KB
ref6.nc 14KB
assert_allclose.m 259B
msis_matlab.png 20KB
test_script.py 2KB
test_mod.m 1KB
matlab
datetimerange.m 124B
AltitudeProfile.m 290B
plotalt.m 1KB
setup_msise00.m 585B
plottime.m 607B
date2doy.m 156B
TimeProfile.m 345B
msise00.m 2KB
python-matlab
plotmsis.m 627B
xarrayind2vector.m 479B
xarray2mat.m 70B
msise00.m 532B
LICENSE 1KB
src
nrlmsise00_sub.for 107KB
msise00_driver.f90 2KB
meson.build 284B
CMakeLists.txt 436B
setup.cfg 1KB
setup.py 1KB
README.md 3KB
共 53 条
- 1
资源评论
挣扎的蓝藻
- 粉丝: 13w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功