-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from SWxTREC/msis2.1
Add MSIS 2.1 and update code
- Loading branch information
Showing
31 changed files
with
856 additions
and
342 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
[flake8] | ||
exclude = .git,__pycache__,build,dist | ||
exclude = .git,__pycache__,build,dist,examples,tests | ||
max-line-length = 88 | ||
per-file-ignores = | ||
# imports not at top of file | ||
setup.py: E402 | ||
ignore = D100,D104 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,38 @@ | ||
"""This is only for CI downloading/testing.""" | ||
import os | ||
from pathlib import Path | ||
import tarfile | ||
import urllib.request | ||
|
||
MSIS21_FILE = ( | ||
"https://gist.github.com/greglucas/" | ||
"6a545a4ccbfdb93290a96ad13a0b6f81/" | ||
"raw/3f82de72d2ea5df7b1cfe492a6b2efee55349f95/" | ||
"nrlmsis2.1.tar.gz" | ||
) | ||
|
||
with urllib.request.urlopen(MSIS21_FILE) as stream: | ||
tf = tarfile.open(fileobj=stream, mode="r|gz") | ||
tf.extractall(path=Path("src/msis2.1/")) | ||
|
||
# MSIS2 Tar file | ||
SOURCE_FILE = ("https://gist.github.com/greglucas/" | ||
"6a545a4ccbfdb93290a96ad13a0b6f81/" | ||
"raw/8a853f3e1c2b324f1c4ea9e0fa1e6d073258a456/" | ||
"NRLMSIS2.0.tar.gz") | ||
MSIS20_FILE = ( | ||
"https://gist.github.com/greglucas/" | ||
"6a545a4ccbfdb93290a96ad13a0b6f81/" | ||
"raw/8a853f3e1c2b324f1c4ea9e0fa1e6d073258a456/" | ||
"NRLMSIS2.0.tar.gz" | ||
) | ||
|
||
with urllib.request.urlopen(SOURCE_FILE) as stream: | ||
with urllib.request.urlopen(MSIS20_FILE) as stream: | ||
tf = tarfile.open(fileobj=stream, mode="r|gz") | ||
tf.extractall(path=os.path.join('src', 'msis2', '')) | ||
tf.extractall(path=Path("src/msis2.0/")) | ||
|
||
# MSIS-00 fortran file | ||
MSIS00_FILE = ("https://gist.githubusercontent.com/greglucas/" | ||
"6a545a4ccbfdb93290a96ad13a0b6f81/" | ||
"raw/2c1f5d899d7b42392a6b19a041d2cc213589a5f1/" | ||
"NRLMSISE-00.FOR") | ||
MSIS00_FILE = ( | ||
"https://gist.githubusercontent.com/greglucas/" | ||
"6a545a4ccbfdb93290a96ad13a0b6f81/" | ||
"raw/2c1f5d899d7b42392a6b19a041d2cc213589a5f1/" | ||
"NRLMSISE-00.FOR" | ||
) | ||
with urllib.request.urlopen(MSIS00_FILE) as response: | ||
with open(os.path.join('src', 'msis00', 'NRLMSISE-00.FOR'), 'wb') as f: | ||
with open(Path("src/msis00/NRLMSISE-00.FOR"), "wb") as f: | ||
f.write(response.read()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
include README.rst | ||
include pymsis/msis2.0.parm | ||
include MSIS2_LICENSE | ||
include tests/* | ||
include tools/* | ||
include src/**/*.pyf | ||
# Exclude external fortran files | ||
exclude src/msis**/* | ||
exclude src/wrappers/*.[fc] | ||
include src/wrappers/*.pyf | ||
exclude pymsis/*.parm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.