For some years msis.run() does not work at all
Closed this issue · 2 comments
pkalaczynski commented
Hi,
when trying e.g. year 2007, 2008 or 2021 I get:
122 input_shape, input_data = create_input(dates, lons, lats, alts, f107s, f107as, aps)
124 if np.any(~np.isfinite(input_data)):
--> 125 raise ValueError(
126 "Input data has non-finite values, all input data must be valid."
127 )
129 # convert to string version
130 version = str(version)
ValueError: Input data has non-finite values, all input data must be valid.
To reproduce:
from pymsis import msis
import numpy as np
alts=np.arange(0,1000,1)
msis.run(dates=np.datetime64(str(2007)+'-01-01T12:00'), lons=0, lats=0, alts=alts,version=2.0)
greglucas commented
That is because those dates may have bad F10.7 or Ap data. I've switched the source for these data which will smooth over some of these values in #29, which removes the error with your example.
pkalaczynski commented
Alright, thanks!