How to use the meteomatics.api.query_lightnings function in meteomatics

To help you get started, we’ve selected a few meteomatics examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github meteomatics / python-connector-api / examples / example.py View on Github external
print("filename = {}".format(filename_png))
        except Exception as e:
            print("Failed, the exception is {}".format(e))

    else:
        print("""
Your account '{}' does not include area requests.
With the corresponding upgrade you could query whole grids of data at once or even time series of grids.
Please check http://shop.meteomatics.com or contact us at shop@meteomatics.com for an individual offer.
""".format(username)
              )

    if limits['historic request option'] and limits['area request option']:
        print("\nlighning strokes as csv:")
        try:
            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,