{"id":22903094,"url":"https://github.com/space-physics/msise00","last_synced_at":"2025-04-01T07:20:54.333Z","repository":{"id":29435864,"uuid":"32971905","full_name":"space-physics/msise00","owner":"space-physics","description":"NRL MSISE-00 atmospheric model-- in Python and Matlab","archived":false,"fork":false,"pushed_at":"2023-12-27T19:22:47.000Z","size":4605,"stargazers_count":46,"open_issues_count":4,"forks_count":21,"subscribers_count":9,"default_branch":"main","last_synced_at":"2024-05-02T03:09:45.762Z","etag":null,"topics":["build-on-run","msis"],"latest_commit_sha":null,"homepage":"https://ccmc.gsfc.nasa.gov/pub/modelweb/atmospheric/msis/","language":"Fortran","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/space-physics.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"github":["scivision"],"ko_fi":"scivision"}},"created_at":"2015-03-27T06:53:11.000Z","updated_at":"2023-12-26T21:21:57.000Z","dependencies_parsed_at":"2024-01-09T15:03:05.844Z","dependency_job_id":"1c4c09f0-9453-4334-ae5c-2617c3fe5e74","html_url":"https://github.com/space-physics/msise00","commit_stats":{"total_commits":274,"total_committers":2,"mean_commits":137.0,"dds":"0.0036496350364964014","last_synced_commit":"bb1bb52f291671319c438bf44224eefa8eb83d1c"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/space-physics%2Fmsise00","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/space-physics%2Fmsise00/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/space-physics%2Fmsise00/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/space-physics%2Fmsise00/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/space-physics","download_url":"https://codeload.github.com/space-physics/msise00/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246598190,"owners_count":20802975,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["build-on-run","msis"],"created_at":"2024-12-14T02:33:22.607Z","updated_at":"2025-04-01T07:20:54.311Z","avatar_url":"https://github.com/space-physics.png","language":"Fortran","funding_links":["https://github.com/sponsors/scivision","https://ko-fi.com/scivision"],"categories":[],"sub_categories":[],"readme":"# MSISE-00 in Python and Matlab\n\n[![Zenodo DOI](https://zenodo.org/badge/32971905.svg)](https://zenodo.org/badge/latestdoi/32971905)\n[![python](https://github.com/space-physics/msise00/actions/workflows/ci.yml/badge.svg)](https://github.com/space-physics/msise00/actions/workflows/ci.yml)\n[![matlab](https://github.com/space-physics/msise00/actions/workflows/ci-matlab.yml/badge.svg)](https://github.com/space-physics/msise00/actions/workflows/ci-matlab.yml)\n[![PyPi Download stats](http://pepy.tech/badge/msise00)](http://pepy.tech/project/msise00)\n\nNRL MSISE-00 atmospheric model for Python.\nAlso accessible via Matlab.\nValid from altitude z = 0..1000 km.\n\nThe plot immediately below shows a slice at 200km on a world-wide grid.\nThe yellow ball represents the sun footprint on Earth.\n\n![MSIS global time animation](./src/msise00/tests/msise00_demo.gif)\n\nThis plot is from [Matlab](./src/msise00/tests/test_msise00_matlab.m) calling MSISE00:\n\n![MSISE00 Matlab](./src/msise00/tests/msis_matlab.png)\n\n## Units\n\n* Temperature: degrees Kelvin [K]\n* Density: particles per cubic meter [m^-3]\n* Mass density: kilograms per cubic meter [kg m^-3]\n\n## Install\n\nThis process is used for the Python and [Matlab](#matlab) access to MSIS.\nAny Fortran compiler should work.\nFortran compiler may be installed by\n\n* MacOS / Homebrew: `brew install gcc`\n* Linux: `apt install gfortran`\n* [Windows](https://www.scivision.dev/install-msys2-windows)\n\nGet MSISE00 and install Python package:\n\n```sh\npip install msise00\n```\n\nor for the latest development code\n\n```sh\ngit clone https://github.com/space-physics/msise00\n\npip install -e msise00\n```\n\noptionally check that MSIS is working via:\n\n```sh\npytest msise00\n```\n\nThis Python module uses our build-on-run technique.\nThe first time you use this Python module, you will see messages from the Meson build system.\n\n## Examples\n\nMSISE00 can be used from the command line, as an imported module, and even from Matlab.\n\n### import module\n\n```python\nimport msise00\nfrom datetime import datetime\n\natmos = msise00.run(time=datetime(2013, 3, 31, 12), altkm=150., glat=65., glon=-148.)\n```\n\natmos is an\n[xarray.Dataset](http://xarray.pydata.org/en/stable/generated/xarray.Dataset.html)\ncontaining all the simulation output values.\n`atmos` is 4-D: (time, altitude, lat, lon), and indexed like `atmos['N2']`\n\n### Command Line\n\nWrite NetCDF4 output (HDF5 compatible) with command line argument `-w filename.nc`.\n\nSimple examples under [Examples/](./Examples)\n\n* Altitude Profile at a single time:\n\n  ```sh\n  msise00 -t 2017-08-21T20:48 -c 40 -90\n  ```\n* Alt. profile time-range with hourly time step:\n\n  ```sh\n  msise00 -t 2017-08-21 2017-08-22 -c 40 -90\n  ```\n* Grid: time,lat,lon: generates the plots in the README:\n\n  ```sh\n  msise00 -t 2016-09-20 2016-09-21\n  ```\n* single time lat/lon can be plotted:\n\n  ```sh\n  msise00 -t 2017-01-02T12\n  ```\n\n### Matlab\n\nMatlab use of MSISE00 is demonstrated in\n[Examples](./Examples/)\n\nMSISE00 will **automatically compile** \"build on run\" on first run from Matlab as with Python.\n\nOptionally, verify Matlab is working by from the top `msise00/` directory in Terminal\n\n```sh\nbuildtool test\n```\n\n### Fortran\n\nThose wishing to use MSIS from a plain Fortran program can do from the top-level msise00/ directory:\n\n```sh\ncmake -B build\ncmake --build build\n```\n\noptionally:\n\n```sh\nctest --test-dir build\n```\n\n## Reference\n\n* Original fortran [code](https://ccmc.gsfc.nasa.gov/pub/modelweb/atmospheric/msis/)\n* 1200+ citations 2002 [paper](http://onlinelibrary.wiley.com/doi/10.1029/2002JA009430/pdf)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspace-physics%2Fmsise00","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspace-physics%2Fmsise00","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspace-physics%2Fmsise00/lists"}