Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
df_lightning = api.query_lightnings(startdate_l, enddate_l, lat_N_l, lon_W_l, lat_S_l, lon_E_l, username,
password)
print(df_lightning.head())
except Exception as e:
print("Failed, the exception is {}".format(e))
else:
print("""
Your account '{}' does not include historic requests.
With the corresponding upgrade you could query data from the past as well as forecasts.
Please check http://shop.meteomatics.com or contact us at shop@meteomatics.com for an individual offer.
""".format(username)
)
if limits['model select option']:
print("\nnetCDF file:")
try:
api.query_netcdf(filename_nc, startdate_nc, enddate_nc, interval_nc, parameter_nc, lat_N, lon_W, lat_S,
lon_E,
res_lat, res_lon, username, password)
print("filename = {}".format(filename_nc))
except Exception as e:
print("Failed, the exception is {}".format(e))
print("\nGrads plot:")
try:
api.query_grads(filename_grads, startdate_grads, parameters_grads, lat_N, lon_W, lat_S, lon_E, res_lat,
res_lon,
username, password, model_grads, area=area_grads)
print("filename = {}".format(filename_grads))
except Exception as e:
print("Failed, the exception is {}".format(e))
print("\ngrads timeseries:")