How to use the metview.set_longitudes function in metview

To help you get started, we’ve selected a few metview 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 esowc / ecPoint-Calibrate / core / postprocessors / conditional_verification.py View on Github external
title = mv.mtext(
        text_line_count=4,
        text_line_1=f"{error} Standard Deviation",
        text_line_2=f"WT Code = {code}",
        text_line_4=" ",
        text_font="arial",
        text_font_size=0.4,
    )

    df = predictor_matrix[["LonOBS", "LatOBS", error]]
    grouped_df = df.groupby(["LatOBS", "LonOBS"])[error].mean().reset_index()

    geo = mv.create_geo(len(grouped_df), "xyv")
    geo = mv.set_latitudes(geo, grouped_df["LatOBS"].to_numpy(dtype=np.float))
    geo = mv.set_longitudes(geo, grouped_df["LonOBS"].to_numpy(dtype=np.float))
    geo = mv.set_values(geo, grouped_df[error].to_numpy(dtype=np.float))

    return plot_geo(geo, coastline, symbol, legend, title)
github esowc / ecPoint-Calibrate / core / postprocessors / conditional_verification.py View on Github external
title = mv.mtext(
        text_line_count=4,
        text_line_1="OBS Frequency",  # To sostitute with "FE" values when relevant.
        text_line_2=f"WT Code = {code}",
        text_line_4=" ",
        text_font="arial",
        text_font_size=0.4,
    )

    df = predictor_matrix[["LonOBS", "LatOBS", "OBS"]]
    grouped_df = df.groupby(["LatOBS", "LonOBS"], as_index=False).count()

    geo = mv.create_geo(len(grouped_df), "xyv")
    geo = mv.set_latitudes(geo, grouped_df["LatOBS"].to_numpy(dtype=np.float))
    geo = mv.set_longitudes(geo, grouped_df["LonOBS"].to_numpy(dtype=np.float))
    geo = mv.set_values(geo, grouped_df["OBS"].to_numpy(dtype=np.float))

    return plot_geo(geo, coastline, symbol, legend, title)
github esowc / ecPoint-Calibrate / core / postprocessors / conditional_verification.py View on Github external
title = mv.mtext(
        text_line_count=4,
        text_line_1=f"{error} Mean",
        text_line_2=f"WT Code = {code}",
        text_line_4=" ",
        text_font="arial",
        text_font_size=0.4,
    )

    df = predictor_matrix[["LonOBS", "LatOBS", error]]
    grouped_df = df.groupby(["LatOBS", "LonOBS"])[error].mean().reset_index()

    geo = mv.create_geo(len(grouped_df), "xyv")
    geo = mv.set_latitudes(geo, grouped_df["LatOBS"].to_numpy(dtype=np.float))
    geo = mv.set_longitudes(geo, grouped_df["LonOBS"].to_numpy(dtype=np.float))
    geo = mv.set_values(geo, grouped_df[error].to_numpy(dtype=np.float))

    return plot_geo(geo, coastline, symbol, legend, title)