How to use the meteomatics.api.query_grid 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
cluster_select=cluster_select)
        print (df_ts.head())
    except Exception as e:
        print("Failed, the exception is {}".format(e))

    print("\npng timeseries:")
    try:
        api.query_png_timeseries(prefixpath_png_ts, startdate_png_ts, enddate_png_ts, interval_png_ts, parameter_png_ts,
                                 lat_N, lon_W, lat_S, lon_E, res_lat, res_lon, username, password)
    except Exception as e:
        print("Failed, the exception is {}".format(e))

    if limits['area request option']:
        print("\ngrid:")
        try:
            df_grid = api.query_grid(startdate_grid, parameter_grid, lat_N, lon_W, lat_S, lon_E, res_lat, res_lon,
                                     username, password)
            print (df_grid.head())
        except Exception as e:
            print("Failed, the exception is {}".format(e))

        print("\nunpivoted grid:")
        try:
            df_grid_unpivoted = api.query_grid_unpivoted(valid_dates_unpiv, parameters_grid_unpiv, lat_N, lon_W, lat_S,
                                                         lon_E, res_lat, res_lon, username, password)
            print (df_grid_unpivoted.head())
        except Exception as e:
            print("Failed, the exception is {}".format(e))

        print("\ngrid timeseries:")
        try:
            df_grid_timeseries = api.query_grid_timeseries(startdate_ts, enddate_ts, interval_ts, parameters_ts, lat_N,