Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Downloading these data is rather straight forward using the CDS web interface. The registered user needs to tick a few boxes to specify the index, period of interest and type of data, then click on a `Download' button. For larger data requests, the use of the CDS API is recommended. Below an example script is provided.

Code Block
import cdsapi

c = cdsapi.Client()

c.retrieve(
      'cems-fire-seasonal-reforecast',
      {
            'product_typeformat': 'ensemble_meangrib',
            'variable': 'dangerfire_daily_severity_rating',
            'yearsystem_version': '20194_1',
        'month': [
            '01', '07',
        ],
        'leadtime': '1_month',
        'format': 'zip',
    },
    'download.zip        'year': '1985',
        'month': '09',
        'leadtime_hour': '1020',
    },
    'download.grib')

Plotting data using the CDS toolbox

To harness the power of the CDS, users are invited to familiarise with the CDS Toolbox. This is an interactive environment that allows to process and plot data without necessarily downloading them. This is particularly useful for users with limited bandwidth and/or unstable connections. The toolbox is designed to develop python applications that can be shared with other users, hence streamlining collaborative research and development. The script below can be pasted in the toolbox editor to generate a static map of the Fire Weather Index (as they are shown in the EFFIS and GWIS platform) that can be exported and used for reports and publications. 

Wiki Markupcode
import cdstoolbox as ct
# Magics plot configuration dictionary
MAP_CONFIG = {    
    'contour': {
        'contour_level_selection_type': 'level_list',
        'contour_level_list': [0, 5.2, 11.2, 21.3, 38, 50, 150],
        'contour_shade': 'on',
        'contour_label': 'off',
        'contour_shade_method': 'area_fill',
        'contour_shade_colour_method': 'list',
        'contour_shade_colour_list': ['#84F07F', '#FFEB3C', '#FFB00C',
                                      '#FA4F00', '#B40000', '#280923'],
        'contour': 'off',
        'legend': 'on',
    },
    'legend': {
        'legend_text_colour': 'black',
        'legend_text_font_size': 0.4,
        'legend_display_type':'continuous',
    }
}
# Initialise the application
@ct.application(title='Static map', fullscreen=True)
@ct.output.figure()
def application():
    # Retrieve full resolution FWI data for a single date
    data = ct.catalogue.retrieve(
        'cems-fire-historical',
        {
            'product_type': 'reanalysis',
            'variable': 'fire_weather_index',
            'version': '3.1',
            'dataset': 'Intermediate dataset',
            'year': '2020',
            'month': '07',
            'day': '01',
        }
    )
    
    # Plot the data using the defined configuration MAP_CONFIG on a dynamic map
    plot = ct.map.plot(data, **MAP_CONFIG)
    
    return plot