met3d_prepare

../../_images/MET3D_PREPARE.png

Retrieves and post-processes GRIB data from ECMWF’s MARS archive so that it could be used in the Met.3D visualisation system.

Note

This function performs the same task as the Met3d Prepare icon in Metview’s user interface. It accepts its parameters as keyword arguments, described below.

met3d_prepare(**kwargs)

Retrieves and post-processes GRIB data from ECMWF’s MAR archive to be used in Met.3D.

Parameters
  • mode ({"fc", "an"}, default: "fc") – Specifies the main retrieval mode. In “fc” mode the selected steps of a given forecast can be used for data generation. If mode is set to “an” a period with a start and end date and constant time-step can be defined.

  • product ({"hires", "ens"}, default: "hires") – Specifies the type of data to be retrieved from MARS. In “hires" mode the operational deterministic forecast is retrieved. While in “ens” mode the operational ENS forecast (both “pf” and “cf” members) is used. If mode is “an” this option is disabled and automatically set to “hires”.

  • number (number or list[number] or list[str], default: ["1", "TO", "50"]) – Specifies the perturbed ensemble members to be retrieved as a list. Enabled when product is set to “ens”.

  • levtype ({"pl", "ml"}, default: "pl") – Specifies the type of vertical levels. The possible values are: “pl” (pressure levels) and “ml” (ECMWF model levels).

  • pl_levelist (number or list[number] or list[str], default: [1000, 925, 850, 700, 500, 400, 300]) – Specifies the list of pressure levels in hPa when levtype is “pl”.

  • ml_levelist (number or list[number] or list[str], default: "-10") – Specifies the list of model levels when levtype is “ml”. If the list of model levels is a sole negative number (-N) it means that all the model levels will be retrieved from the surface up to level N. Please note that model level numbering starts at the topmost atmospheric level (click here for details).

  • params_2d (str or list[str], default: ["2t", "10u", "10v"]) –

    Specifies the list of surface parameters. Please note that when the following precipitation rate parameters are specified their sum is computed and added as a “tprate” field to the results:

    • Convective rain rate: crr

    • Large scale rain rate: lsrr

    • Convective snowfall rate water equivalent: csfr

    • Large scale snowfall rate water equivalent: lssfr

  • params_3d (str or list[str], default: ["t", "q", "u", "v"]) – Specifies the list of upper level parameters. Please note that on model levels “z” (geopotential) is not archived in MARS. However, when “z” is specified in param_3d it will be automatically computed (the fields needed for the computations will also be automatically retrieved). To be able to plot “jet cores” in 3D “z” is needed.

  • date (number, default: -1) – Specifies the run date of the forecast. Available when mode is “fc”. The default value is -1 (i.e. yesterday).

  • time (number, default: 0) – Specifies the run time of the forecast in hours. Available when mode is “fc”.

  • step (number or list[number], default: 0) – Specifies the forecast steps in hours. Available when mode is “fc”.

  • analysis_start_date (number, default: -1) – Specifies the start date of the analysis period. Available when mode is “an”. The default value is -1 (i.e. yesterday).

  • analysis_start_time (number, default: 0) – Specifies the start time of the period. Available when mode is “an”.

  • analysis_end_date (number, default: -1) – Specifies the end date of the period. Available when mode is “an”. The default value is -1 (i.e. yesterday).

  • analysis_end_time (number, default: 0) – Specifies the end time of the period. Available when mode is “an”.

  • analysis_step ({6, 12}, default: 6) – Specifies the timestep of the analysis period in hours. Available when mode is “an”.

  • area (list[number], default: [-90, -180, 90, 180]) – Specifies the area of the output grid in [South, West, North, East] format.

  • grid (list[number], default: [1, 1]) – Specifies the resolution of the output grid in [dx, dy] format, where dx is the grid increment in East-West direction, while dy is the grid increment in North-South direction (both in units of degrees).

  • retrieve_group_by_time ({"on", "off"}, default: "on") –

    Specifies how the MARS retrievals should be executed. When it is set to “on” the following happens:

    • forecasts: all steps are retrieved together

    • analyses: times within the same day are retrieved together

    When it is set to “off” each step/time is retrieved separately (in a loop).

Return type

Fieldset