<jupyter_start><jupyter_text>Total precipitation - default ecCharts styleThis is a single cell notebook to demonstrate precipitation plotting with default ecCharts style.At ECMWF   From your workstation: module swap (or load) Magics/new   jupyter notebook  load this notebook<jupyter_code>import Magics.macro as magics

#Setting the geographical area
projection = magics.mmap(
    subpage_map_library_area = "on",
    subpage_map_area_name    = "south_west_europe",
    page_id_line             = "off"
)

#Setting the coastline
coast = magics.mcoast()

#Loading GRIB file
precipitation = magics.mgrib(grib_input_file_name = "total_precipitation.grib")

#Defining the contour
contour = magics.mcont(contour_automatic_setting = "ecmwf",
                       legend = 'on') 

#Defining the legend
legend = magics.mlegend(
    legend_display_type       = "continuous",
    legend_automatic_position = "right",
    legend_title              = "on",
    legend_title_text         = "Total precipitation",
    legend_text_font_size     = "0.45",
    legend_text_colour        = "#2b619e",
    legend_label_frequency    = 1)

#Setting the title
title = magics.mtext( 
    text_lines          = ["Automatic shading using default ecCharts style",
                           "<grib_info key='name'/>  -  STEP <grib_info key='step'/>",
                           "START TIME: <grib_info key='base-date' format='%d %B %Y %H'/>",
                           "VALID TIME: <grib_info key='valid-date' format='%d %B %Y %H'/>"],
    text_justification  = "center",
    text_font_size      = 0.6,
    text_mode           = "automatic",
    text_colour         = "#2b619e") 

#Plotting
magics.plot(projection, precipitation, contour, coast, legend, title)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1007357102433503, 'fraction_numerical': 0.00792303338992643, 'mean_word_length': 2.911504424778761, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '79817', 'license': 'Apache-2.0', 'n_tokens_mistral': 586, 'n_tokens_neox': 556, 'n_words': 134, 'path': 'visualisation/gallery/ecmwf_style.ipynb', 'repo_name': 'sylvielamythepaut/notebook-examples', 'size': '1767'}