Talk:CMETEO

From Agri4castWiki
Jump to: navigation, search


Introduction

Cmeteo stands for CORINE-meteo. Cmeteo can be seen an application suite to aggregate weather indicators from grid resolution to a regional type of division. These indicators will be aggregated to spatial themas like NUTS or agri environmental regions, or translated/adjusted for landcovers of interest like crops, etc. Translation will be accompanied by aggregation. The cmeteo package is designed to operate in several environments which may differ in both input as output datasets. All these environments need to have the basic data (both input and output) available for the CMeteo process.

Software tools needed by cmeteo

Cmeteo uses functionality which is implemented in several other software tools. The major ones are listed in the following table.

tool remarks
REGLISTS supplies specific lists of regions directed by input parameters.
MRS_PROCESS contains common used functionality for processing more complex programs like cmeteo.
ADD_PROCESS_LOG procedure to send some info to a logtable.
ADD_PROCESS_METRICS procedure to send some data, retrieved during processing, to a logtable.
MRS_STATS generic tool to collect some metrics during processing.
MRS_HTTP generic tool to handle some messages.
DATE_GENERATOR generic tool to generate specific lists of dates according to the input paramaters.

Interface

To start Cmeteo the function 'start_process' of the package 'PROCMAN' is called with up to 9 arguments.

  • p_procedure = 'cmeteo'
  • p_theme = 'weather(observed)', 'weather(observed)', 'weather(simulated) his', 'weather(simulated) ope', 'weather(simulated) eps'
  • p_resolution = 'NUTS', 'agri-environmental zones'
  • parameter1 = 'yyyy' (yr2start: first year to aggregate grid_weather to weather for some type of region (this year will be included))
  • parameter2 = 'yyyy' (yr2end: last year to aggregate grid_weather to weather for some type of region (this year will be included))
  • parameter3 = 'dd-mm-yy' (dy2start: first day to aggregate grid_weather to weather for some type of region (this day will be included))
  • parameter4 = 'dd-mm-yy' (dy2end: last day to aggregate grid_weather to weather for some type of region (this day will be included))
  • parameter5 = 'yes', 'no' (Refresh_row: indicates to update existing rows in the indicated period)
  • parameter6 = null (not used)

Objects of Cmeteo

Cmeteo uses many database objects. The objects that contain the primary datasets like weather data, landcover types and aggregation areas are listed in the table below:

object name Content Environment
CMETEO_GRID_WEATHER Weather indicators per grid CGMS / CGFS / ASIA / GWSI
CMETEO_EPS_GRID_WEATHER Weather indicators per grid (ECMWF EPS model) CGFS
CMETEO_HIS_GRID_WEATHER Weather indicators per grid (ECMWF HIS model) CGFS
CMETEO_OPE_GRID_WEATHER Weather indicators per grid (ECMWF OPE model) CGFS
CMETEO_REGION_WEATHER Weather indicators per administrative region CGMS / CGFS / ASIA / GWSI
CMETEO_REJECTED_WEATHER Rejected weather indicators per administrative region CGMS / CGFS / ASIA / GWSI
CMETEO_NUTS_WEATHER Weather indicators per NUTS region CGMS
CMETEO_EPS_NUTS_WEATHER Weather indicators per NUTS region (ECMWF EPS model) CGFS
CMETEO_HIS_NUTS_WEATHER Weather indicators per NUTS region (ECMWF HIS model) CGFS
CMETEO_OPE_NUTS_WEATHER Weather indicators per NUTS region (ECMWF OPE model) CGFS
CMETEO_ZONAL_WEATHER Weather indicators per Agri-environmental region CGMS
CMETEO_EPS_ZONAL_WEATHER Weather indicators per Agri-environmental region (ECMWF EPS model) CGFS
CMETEO_HIS_ZONAL_WEATHER Weather indicators per Agri-environmental region (ECMWF HIS model) CGFS
CMETEO_OPE_ZONAL_WEATHER Weather indicators per Agri-environmental region (ECMWF OPE model) CGFS
CMETEO_AGGREGATION_AREAS Cultivated areas per crop for Administrative region per year CGMS / CGFS / ASIA / GWSI
CMETEO_GRID_LANDCOVER_AREAS Areas for intersections of grid and administrative region CGMS / CGFS / ASIA / GWSI
CMETEO_GRID_NUTS_LCV_AREAS Areas for intersections of grid and NUTS region CGMS
CMETEO_GRID_ZONAL_LCV_AREAS Areas for intersections of grid and Agri-environmental region CGMS
CMETEO_LANDCOVERS Landcovers types or crops to be evaluated CGMS / CGFS / ASIA / GWSI
CMETEO_REGION_MAPPINGS Administrative regions and their mappings (relations) CGMS / CGFS / ASIA / GWSI


CMETEO_GRID_WEATHER

CMETEO_GRID_WEATHER is the object that contains the weather indicators in grid resolution that are needed as input for Cmeteo in a unified structure and with a uniform object name. In each environment (cgms / cgfs / asia / gwsi) the weather indicators in grid resolution are stored in tables with different names and structures. Also the collection of the attributes may vary. Cmeteo requires that the weather indicators in grid resolution are stored in an object with a specific structure and specific object name. Therefore some logic must be applied to transform the sets from various environments into a unified structure. This transformation is implemented by using views and/or synonyms on the original datasets while renaming the attributes and eventually suppliyng neutral or valuable data for missing attributes. The unified object CMETEO_GRID_WEATHER is composed of the most wide combination of attributes of the various underlying datasets.


CMETEO_REGION_WEATHER

CMETEO_REGION_WEATHER is the object that contains the output weather indicators in a regional type of resolution and in a unified structure with a uniform object name. In each environment (cgms / cgfs / asia / gwsi) these weather indicators are stored in tables with different names and structures. Also the collection of the attributes may vary. Cmeteo requires that the weather indicators are stored in an object with a specific structure and specific object name. Therefore some logic is applied to transform the unified output from Cmeteo into the unique objects of various environments. This transformation is implemented by using views and/or synonyms on the target datasets while renaming the attributes and eventually skipping data for missing attributes. The unified object CMETEO_REGION_WEATHER is composed of the most wide combination of attributes of the various underlying datasets and will process results for all attributes. If some attributes are not available in the target environment it will not be written to the target table (functionality for this is located in triggers). Weather indicators that could not be stored via CMETEO_REGION_WEATHER are stored in CMETEO_REJECTED_WEATHER.


CMETEO_AGGREGATION_AREAS

CMETEO_GRID_LANDCOVER_AREAS

  • CMETEO_GRID_LANDCOVER_AREAS
  • CMETEO_GRID_NUTS_LCV_AREAS
  • CMETEO_GRID_ZONAL_LCV_AREAS


CMETEO_LANDCOVERS

CMETEO_REGION_MAPPINGS

Examples

In the example below, cmeteo is started to aggregate grid weather based on observed station weather to NUTS resolution for all non processed day's in 2011.

procman.start_process
               (p_procedure  => 'cmeteo'
               ,p_theme      => 'weather(observed)'
               ,p_resolution => 'NUTS'
               ,parameter1   => 2011
               ,parameter2   => 2011
               ,parameter3   => null
               ,parameter4   => null
               ,parameter5   => null
               ,parameter6   => null
               );