Skip to content

Commit

Permalink
FIX: Disable global msis parameter path
Browse files Browse the repository at this point in the history
  • Loading branch information
greglucas committed Nov 18, 2024
1 parent 8f6534d commit f4c787e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pymsis/msis.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
from pymsis.utils import get_f107_ap


# We need to point to the MSIS parameter file that was installed with the Python package
_MSIS_PARAMETER_PATH = str(Path(__file__).resolve().parent) + "/"
for lib in [msis00f, msis20f, msis21f]:
# Store the previous options to avoid reinitializing the model
# each iteration unless necessary
Expand Down Expand Up @@ -164,7 +162,10 @@ def run(
with msis_lib._lock:
# Only reinitialize the model if the options have changed
if msis_lib._last_used_options != options:
msis_lib.pyinitswitch(options, parmpath=_MSIS_PARAMETER_PATH)
# We need to point to the MSIS parameter file that was installed with the
# Python package
msis_parameter_path = str(Path(__file__).resolve().parent) + "/"
msis_lib.pyinitswitch(options, parmpath=msis_parameter_path)
msis_lib._last_used_options = options

output = msis_lib.pymsiscalc(
Expand Down

0 comments on commit f4c787e

Please sign in to comment.