I have a data set with (latitude, longitude, temperature) and I'm trying to interpolate the temperature to graph it with contourf. However, the interpolated has nan values in it (I'm sure that my data does not have nan values).
df = pd.read_excel('temp_data.xlsx')
lat = df['LatDD'].values
lon = df['LongDD'].values
tem = df['Air_T'].values
# convert from ccrs.LambertConformal to ccrs.PlateCarree()
xp, yp, _ = crs.transform_points(ccrs.PlateCarree(), lon, lat ).T
xp, yp, tem = remove_nan_observations(xp, yp, tem)
alt_x, alt_y, data = interpolate_to_grid( xp, yp, tem, minimum_neighbors=1, interp_type = 'cressman', hres = 2000)
print(data.min())
Below is the interpolated temperature result (as well as some information)
Is it normal for interpolated data to have nan even though the original data does not have any? Will it affect my contourf plot at the end? If yes, how do I fix this problem?