Skip to content

Commit

Permalink
expose BIL-2000 option
Browse files Browse the repository at this point in the history
There is an artifact in IRI when used with the standard bottomside model. Dieter Bilitza suggested using the JF(4) switch (note: that's jf(3) in Python indexing) to use the BIL-2000 model which doesn't have the bug. This update exposes this switch to the user.
  • Loading branch information
bharding512 committed Jan 4, 2021
1 parent c28fa46 commit 9bf2b36
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
10 changes: 8 additions & 2 deletions src/pyglow/iri.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ def run(
compute_Ni=True,
f107=None,
f107a=None,
f1_layer=True,
f1_layer=True,
bil2000=False,
):
"""
Run IRI model at point time/location and update the object state
Expand All @@ -82,7 +83,8 @@ def run(
:param compute_Ni: Switch to compute Ni
:param f107: User specified F107
:param f107a: User specified F107A
:param f1_layer: If True (default) include F1-layer (JF switches 19,20 = True)
:param f1_layer: If True (default) include F1-layer (JF switches 19,20 = True)
:param bil2000: If True, use Bil-2000 model for bottomside (JF switch 4). Default IRI is False
"""

if version == 2016:
Expand Down Expand Up @@ -163,6 +165,10 @@ def init_iri(): return False
# Set jf(19) and jf(20) to False (in Fortran index)
jf[18] = 0
jf[19] = 0

if bil2000:
# Set jf(4) to True (in Fortran index)
jf[3] = True

# Get current directory:
my_pwd = os.getcwd()
Expand Down
5 changes: 4 additions & 1 deletion src/pyglow/pyglow.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ def run_iri(
compute_Te_Ti=True,
compute_Ni=True,
f1_layer=True,
bil2000=False,
):
"""
Executes IRI and assigns results to instance.
Expand All @@ -175,7 +176,8 @@ def run_iri(
:param compute_Ne: Switch to compute Ne
:param compute_Te_Ti: Switch to compute Te and Ti
:param compute_Ni: Switch to compute Ni
:param f1_layer: If True (default) include F1-layer (JF switches 19,20 = True)
:param f1_layer: If True (default) include F1-layer (JF switches 19,20 = True)
:param bil2000: If True, use Bil-2000 model for bottomside (JF switch 4). Default IRI is False
"""

# Check if user supplies indices:
Expand All @@ -202,6 +204,7 @@ def run_iri(
f107=f107,
f107a=f107a,
f1_layer=f1_layer,
bil2000=bil2000,
)

# Assign output of IRI:
Expand Down

0 comments on commit 9bf2b36

Please sign in to comment.