Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion kamodo_ccmc/flythrough/SF_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def Functionalize_TimeSeries(utc_time, variable_name, variable_units,

# Define an interpolator for the given time series array.
interp = interp1d(utc_time, variable_data, bounds_error=False,
fill_value=np.NaN)
fill_value=np.nan)

# Functionalize the time series array
@kamodofy(units=variable_units, data=variable_data) # units
Expand Down
4 changes: 2 additions & 2 deletions kamodo_ccmc/readers/adelphi_tocdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def combine_hemispheres(north_file, south_file):
data[key][:, 1:, :len_lat] = np.flip(data_S[key], axis=2) # S data
data[key][:, 1:, len_lat] = data[key][:, 1:, len_lat-1] # value buffer
data[key][:, 1:, len_lat+1:len_lat+3] = \
np.tile(np.NaN, (new_shape[0], new_shape[1]-1, 2)) # NaN buffer
np.tile(np.nan, (new_shape[0], new_shape[1]-1, 2)) # NaN buffer
data[key][:, 1:, len_lat+3] = data[key][:, 1:, len_lat+4] # value buff
data[key][:, 1:, len_lat+4:] = data_N[key] # N hemisphere data

Expand All @@ -156,7 +156,7 @@ def combine_hemispheres(north_file, south_file):
NP_idx -= 1
zero_check = np.count_nonzero(data[key][:, :, NP_idx])
# replace 'extra' latitude rows from data with NaNs
data[key][:, :, slice_idx] = np.tile(np.NaN, (
data[key][:, :, slice_idx] = np.tile(np.nan, (
new_shape[0], new_shape[1], len(slice_idx)))

# data wrangling complete, return data dictionary
Expand Down
2 changes: 1 addition & 1 deletion kamodo_ccmc/readers/hapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def __init__(self, server, dataset, parameters = None, start = None, stop = None
# Fix wonky geotail data
aunit="nT"
afill = 0.1*float(afill)
adata = 0.1*adata.astype(np.float)
adata = 0.1*adata.astype(np.float64)
if aunit == "n/cc":
# The unit n/cc should be 1/cc to register properly in Kamodo
aunit = "1/cc"
Expand Down
6 changes: 3 additions & 3 deletions kamodo_ccmc/readers/superdarn_tocdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,12 @@ def df_data(df_file, verbose=False):
tmp[:, 2:-1] = variables[var] # copy data into grid
tmp[:, -1] = np.mean(tmp[:, -2], axis=0)
tmp[:, 1] = variables[var][:, 0] # buffer row
tmp[:, 0] = np.NaN # add NaNs on equator side
tmp[:, 0] = np.nan # add NaNs on equator side
else: # south pole at beginning of array
tmp[:, 1:-2] = variables[var] # copy data into grid
tmp[:, 0] = np.mean(tmp[:, 1], axis=0)
tmp[:, -2] = variables[var][:, 0] # buffer row
tmp[:, -1] = np.NaN # add NaNs on equator side
tmp[:, -1] = np.nan # add NaNs on equator side
variables[var] = tmp

# latitude wrapping in coordinate grid
Expand Down Expand Up @@ -357,7 +357,7 @@ def ea_data(ea_file, verbose=False):

# addind NaN on equator-side assuming the data never reaches it.
variables[var][new_vals[1]] = variables[var][lat_equator] # buffer row
variables[var][new_vals[0]] = np.NaN * \
variables[var][new_vals[0]] = np.nan * \
np.ones(shape=variables[var][lat_equator].shape)

# hemisphere spcific data wrangling complete. return data.
Expand Down
2 changes: 1 addition & 1 deletion kamodo_ccmc/readers/swmf_gm_octree.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ def interpolator(xvec):
ypos=OCTREE_BLOCK_GRID_FFI.new("float[]",list(xvec[:,1]))
zpos=OCTREE_BLOCK_GRID_FFI.new("float[]",list(xvec[:,2]))
npos=len(list(xvec[:,0]))
return_data=list(np.zeros(npos,dtype=np.float))
return_data=list(np.zeros(npos,dtype=np.float64))
return_data_ffi=OCTREE_BLOCK_GRID_FFI.new("float[]",return_data)
# print(xpos,ypos,zpos,npos)
# print(var_data,return_data_ffi)
Expand Down
4 changes: 2 additions & 2 deletions kamodo_ccmc/readers/verb3d_4D.py
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ def _intrep_xvec_data_prepare(self, xvec):
# Check for NaN values
nan_check = np.isnan(L) | np.isnan(Y) | np.isnan(Z)
if np.all(nan_check):
return L, Y, Z, np.full(nobs, np.NaN), None, None
return L, Y, Z, np.full(nobs, np.nan), None, None

# Handle NaN points in the input data
L[nan_check] = np.nan
Expand All @@ -663,7 +663,7 @@ def _intrep_xvec_data_prepare(self, xvec):
limax = min(limax + 1, num_L_grid - 1)

if (Lmax > max_L_grid and Lmin > max_L_grid) or (Lmax < min_L_grid and Lmin < min_L_grid):
return L, Y, Z, np.full(nobs, np.NaN), limin, limax
return L, Y, Z, np.full(nobs, np.nan), limin, limax

return L, Y, Z, None, limin, limax

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ python-markdown-math
markdown_include
kamodo
cffi
numpy<2.0.0
numpy>=1.24.0
pandas<2.0.0
netCDF4<1.7.0
nbformat
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ include_package_data = True
install_requires =
kamodo
setuptools<65
numpy<2.0.0
numpy>=1.24.0
pandas
netCDF4<1.7.0
nbformat
Expand Down