Difference between revisions of "Talk:CMETEO"

From Agri4castWiki
Jump to: navigation, search
(Interface)
 
(8 intermediate revisions by the same user not shown)
Line 26: Line 26:
  
 
==Interface==
 
==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:
 
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:
  
Line 40: Line 52:
 
|-
 
|-
 
|[[#CMETEO_REGION_WEATHER|CMETEO_REGION_WEATHER]]    || Weather indicators per administrative region          || CGMS / CGFS / ASIA / GWSI
 
|[[#CMETEO_REGION_WEATHER|CMETEO_REGION_WEATHER]]    || Weather indicators per administrative region          || CGMS / CGFS / ASIA / GWSI
 +
|-
 +
|[[#CMETEO_REGION_WEATHER|CMETEO_REJECTED_WEATHER]]  || Rejected weather indicators per administrative region  || CGMS / CGFS / ASIA / GWSI
 
|-
 
|-
 
|[[#CMETEO_REGION_WEATHER|CMETEO_NUTS_WEATHER]]      || Weather indicators per NUTS region                    || CGMS  
 
|[[#CMETEO_REGION_WEATHER|CMETEO_NUTS_WEATHER]]      || Weather indicators per NUTS region                    || CGMS  
Line 57: Line 71:
 
|[[#CMETEO_REGION_WEATHER|CMETEO_OPE_ZONAL_WEATHER]] || Weather indicators per Agri-environmental region (ECMWF OPE model) || CGFS  
 
|[[#CMETEO_REGION_WEATHER|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_AGGREGATION_AREAS|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_LANDCOVERS            || Landcovers types or crops to be evaluated                          || CGMS / CGFS / ASIA / GWSI
+
|[[#CMETEO_GRID_LANDCOVER_AREAS|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_LANDCOVER_AREAS|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_GRID_LANDCOVER_AREAS|CMETEO_GRID_ZONAL_LCV_AREAS]] || Areas for intersections of grid and Agri-environmental region || CGMS
 
|-
 
|-
|CMETEO_REJECTED_WEATHER      || Weather indicators per region that could not be stored via CMETEO_REGION_WEATHER || CGMS / CGFS / ASIA / GWSI
+
|[[#CMETEO_LANDCOVERS|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_REGION_MAPPINGS|CMETEO_REGION_MAPPINGS]]          || Administrative regions and their mappings (relations)         || CGMS / CGFS / ASIA / GWSI
 
|}
 
|}
  
Supporting objects that are required by Cmeteo:
+
{|class="collapsing_table collapsible collapsed"
 +
!Supporting objects that are required by Cmeteo
 +
|-
 +
|
 
{|class="wikitable"
 
{|class="wikitable"
 
!object name !! Content !! Environment
 
!object name !! Content !! Environment
Line 101: Line 116:
 
|-
 
|-
 
|PROCMAN                    || || CGMS / CGFS / ASIA / GWSI
 
|PROCMAN                    || || CGMS / CGFS / ASIA / GWSI
 +
|}
 
|}
 
|}
 +
  
 
====CMETEO_GRID_WEATHER====
 
====CMETEO_GRID_WEATHER====
Line 126: Line 143:
 
| GWSI || {{Object|GRID_WEATHER_MODEL_10}} (table)    ||                                          || CMETEO_GRID_WEATHER (view)
 
| GWSI || {{Object|GRID_WEATHER_MODEL_10}} (table)    ||                                          || CMETEO_GRID_WEATHER (view)
 
|}
 
|}
The intermediate objects are views in the CGFS environment to convert the structure of the primary data source into a unified structure. They are alternately used by the synonym {{Object|CMETEO_GRID_WEATHER}} to acquire the unified object name.
+
The intermediate objects in the CGFS environment are views to convert the structure of the primary data source into a unified structure. They are alternately used by the synonym CMETEO_GRID_WEATHER to acquire the unified object name.
  
 
====Structure conversion====
 
====Structure conversion====
 
{|class="wikitable"
 
{|class="wikitable"
 
!Environment
 
!Environment
|CMETEO (unified object)
 
 
|CGMS
 
|CGMS
 
|CGFS
 
|CGFS
 
|ASIA
 
|ASIA
 
|GWSI
 
|GWSI
 +
|CMETEO (unified object)
 
|-
 
|-
 
!Object name
 
!Object name
|CMETEO_GRID_WEATHER
 
 
|GRID_WEATHER
 
|GRID_WEATHER
 
|ECMWF_<MODEL>_DOWNSCALED_DATA
 
|ECMWF_<MODEL>_DOWNSCALED_DATA
 
|ECMWF_DOWNSCALED_DATA
 
|ECMWF_DOWNSCALED_DATA
 
|GRID_WEATHER_MODEL_10
 
|GRID_WEATHER_MODEL_10
 +
|CMETEO_GRID_WEATHER
 
|-
 
|-
!Attributes || grid_no          || grid_no              || grid_no          || ecmwf_grid_no    || grid_id
+
| || grid_no              || grid_no          || ecmwf_grid_no    || grid_id             || grid_no             
 
|-                       
 
|-                       
|           || day              || day                  || mdate            || mdate            || year / dekad_in_year 5)
+
| || day                  || mdate            || mdate            || year / dekad_in_year ||day             
 
|-                       
 
|-                       
|           || day_offset      || -                    || date_offset )    || -                || -
+
| || -                    || date_offset )    || -                || -                   || day_offset     
 
|-                         
 
|-                         
|           || member_no        || -                    || -                || -                || -           
+
| || -                    || -                || -                || -                   ||        member_no            
 
|-                       
 
|-                       
|           || max_temperature || maximum_temperature || temperature_max  || temperature_max || temperature_maximum
+
| || maximum_temperature || temperature_max || temperature_max  || temperature_maximum || max_temperature 
 
|-                       
 
|-                       
|           || min_temperature || minimum_temperature || temperature_min  || temperature_min || temperature_minimum
+
| || minimum_temperature || temperature_min || temperature_min  || temperature_minimum ||min_temperature 
 
|-                       
 
|-                       
|           || mean_temperature || -                    || temperature_mean || temperature_mean || temperature_mean
+
| || -                    || temperature_mean || temperature_mean || temperature_mean     || mean_temperature
 
|-                       
 
|-                       
|           || dew_temperature  || -                    || temperature_dew  || temperature_dew  || -
+
| || -                    || temperature_dew  || temperature_dew  || -                   || dew_temperature 
 
|-                       
 
|-                       
|           || vapour_pressure  || vapour_pressure      ||vapour_pressure  || vapour_pressure  || -
+
| || vapour_pressure      ||vapour_pressure  || vapour_pressure  || -                   || vapour_pressure 
 
|-                       
 
|-                       
|           || wind_speed      || windspeed            || wind_speed      || wind_speed      || -
+
| || windspeed            || wind_speed      || wind_speed      || -                   || wind_speed     
 
|-                       
 
|-                       
|           || precipitation    || rainfall            || precipitation    || precipitation    || precipitation
+
| || rainfall            || precipitation    || precipitation    || precipitation       || precipitation   
 
|-                       
 
|-                       
|           || e0              || e0                  || e0              || e0              || -
+
| || e0                  || e0              || e0              || -                   || e0             
 
|-                       
 
|-                       
|           || es0              || es0                  || es0              || es0              || -
+
| || es0                  || es0              || es0              || -                   || es0             
 
|-                     
 
|-                     
|           || et0             || et0                 || et0              || et0             || et0
+
| || et0                 || et0             || et0              || et0                 || et0            
 
|-                       
 
|-                       
|           || global_radiation || calculated_radiation || radiation_global || radiation_global || global_radiation
+
| || calculated_radiation || radiation_global || radiation_global || global_radiation    || global_radiation  
 
|-                       
 
|-                       
|           || snow_depth       || snow_depth           ||snow_depth       || snow_depth       ||snow_depth
+
| || snow_depth           ||snow_depth       || snow_depth       ||snow_depth           || snow_depth      
 
|}
 
|}
 
If an attribute for the offset of the day isn't available, the day-offset in CMETEO_GRID_WEATHER will be filled with a neutral value (0). This value doesn't influence the processing. For sets that doesn't contain an attribute for members_no a '1' will be supplied in CMETEO_GRID_WEATHER. If an attribute for the mean temperature doesn't exist, this value will be estimated as the mean value of minimum and maximum temperature of the day. A dummy value '0' for the dew temperature wil be supplied to CMETEO_GRID_WEATHER for sets lacking such an attribute. Cmeteo will process this value and produces results, but these will not be written to the output table (functionality for this is located in triggers).
 
If an attribute for the offset of the day isn't available, the day-offset in CMETEO_GRID_WEATHER will be filled with a neutral value (0). This value doesn't influence the processing. For sets that doesn't contain an attribute for members_no a '1' will be supplied in CMETEO_GRID_WEATHER. If an attribute for the mean temperature doesn't exist, this value will be estimated as the mean value of minimum and maximum temperature of the day. A dummy value '0' for the dew temperature wil be supplied to CMETEO_GRID_WEATHER for sets lacking such an attribute. Cmeteo will process this value and produces results, but these will not be written to the output table (functionality for this is located in triggers).
 
|}
 
|}
 +
  
 
====CMETEO_REGION_WEATHER====
 
====CMETEO_REGION_WEATHER====
{{Object|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).
+
{{Object|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 {{Object|CMETEO_REJECTED_WEATHER}}.
  
 
{|class="collapsing_table collapsible collapsed"
 
{|class="collapsing_table collapsible collapsed"
Line 188: Line 206:
 
====Object name conversion====
 
====Object name conversion====
 
{|class="wikitable"
 
{|class="wikitable"
!Environment !! Unified object         !! Intermediate object                       !! Trigger                              !! Target data source
+
!Environment !! Unified object           !! Intermediate object                       !! Trigger                              !! Target data source
 +
|-
 +
| CGFS || CMETEO_REGION_WEATHER (synonym) || {{Object|CMETEO_HIS_NUTS_WEATHER}} (view)  || {{Object|CMETEO_HIS_NUTS_WEATHER_IO}}  || {{Object|ECMWF_HIS_DOWNSCALED_NUTS}} (table)
 +
|-
 +
| CGFS || CMETEO_REGION_WEATHER (synonym) || {{Object|CMETEO_HIS_ZONAL_WEATHER}} (view) || {{Object|CMETEO_HIS_ZONAL_WEATHER_IO}} || {{Object|ECMWF_HIS_DOWNSCALED_ZONAL}} (table)
 
|-
 
|-
| CGFS || CMETEO_REGION_WEATHER (table) || {{Object|CMETEO_HIS_NUTS_WEATHER}} (view)   || {{Object|CMETEO_HIS_NUTS_WEATHER_IO}} || {{Object|ECMWF_HIS_DOWNSCALED_NUTS}} (table)
+
| CGFS || CMETEO_REGION_WEATHER (synonym) || {{Object|CMETEO_EPS_NUTS_WEATHER}} (view) || ?                                      || {{Object|ECMWF_EPS_DOWNSCALED_NUTS}} (table)
 
|-
 
|-
| CGFS || CMETEO_REGION_WEATHER (table) || {{Object|CMETEO_ZONAL_NUTS_WEATHER}} (view) || {{Object|CMETEO_HIS_ZONAL_WEATHER_IO}} || {{Object|ECMWF_HIS_DOWNSCALED_ZONAL}} (table)
+
| CGFS || CMETEO_REGION_WEATHER (synonym) || {{Object|CMETEO_EPS_ZONAL_WEATHER}} (view) || ?                                      || {{Object|ECMWF_EPS_DOWNSCALED_ZONAL}} (table)
|}
 
 
 
====Structure conversion====
 
{|class="wikitable"
 
!Environment
 
|CMETEO (unified object)
 
|CGMS
 
|CGFS
 
|ASIA
 
|GWSI
 
 
|-
 
|-
!Object name
+
| CGFS || CMETEO_REGION_WEATHER (synonym) || {{Object|CMETEO_OPE_NUTS_WEATHER}} (view)  || ?                                      || {{Object|ECMWF_OPE_DOWNSCALED_NUTS}} (table)
|CMETEO_GRID_WEATHER
 
|GRID_WEATHER
 
|ECMWF_<MODEL>_DOWNSCALED_DATA
 
|ECMWF_DOWNSCALED_DATA
 
|GRID_WEATHER_MODEL_10
 
 
|-
 
|-
!Attributes || grid_no          || grid_no              || grid_no          || ecmwf_grid_no    || grid_id
+
| CGFS || CMETEO_REGION_WEATHER (synonym) || {{Object|CMETEO_OPE_ZONAL_WEATHER}} (view) || ?                                      || {{Object|ECMWF_OPE_DOWNSCALED_ZONAL}} (table)
|-                     
 
|          || day              || day                  || mdate            || mdate            || year / dekad_in_year 5)
 
|-                     
 
|           || day_offset      || -                    || date_offset )   || -                || -
 
|-                       
 
|          || member_no        || -                    || -                || -                || -         
 
|-                     
 
|          || max_temperature  || maximum_temperature  || temperature_max  || temperature_max  || temperature_maximum
 
|-                     
 
|          || min_temperature  || minimum_temperature  || temperature_min  || temperature_min  || temperature_minimum
 
|-                     
 
|          || mean_temperature || -                    || temperature_mean || temperature_mean || temperature_mean
 
|-                     
 
|          || dew_temperature  || -                    || temperature_dew  || temperature_dew  || -
 
|-                     
 
|          || vapour_pressure  || vapour_pressure      ||vapour_pressure  || vapour_pressure  || -
 
|-                     
 
|          || wind_speed      || windspeed            || wind_speed      || wind_speed      || -
 
|-                     
 
|          || precipitation    || rainfall            || precipitation    || precipitation    || precipitation
 
|-                     
 
|          || e0              || e0                  || e0              || e0              || -
 
|-                     
 
|          || es0              || es0                  || es0              || es0              || -
 
|-                   
 
|          || et0              || et0                  || et0              || et0              || et0
 
|-                     
 
|          || global_radiation || calculated_radiation || radiation_global || radiation_global || global_radiation
 
|-                     
 
|          || snow_depth      || snow_depth          ||snow_depth        || snow_depth      ||snow_depth
 
|}
 
If an attribute for the offset of the day isn't available, the day-offset in CMETEO_GRID_WEATHER will be filled with a neutral value (0). This value doesn't influence the processing. For sets that doesn't contain an attribute for members_no a '1' will be supplied in CMETEO_GRID_WEATHER. If an attribute for the mean temperature doesn't exist, this value will be estimated as the mean value of minimum and maximum temperature of the day. A dummy value '0' for the dew temperature wil be supplied to CMETEO_GRID_WEATHER for sets lacking such an attribute. Cmeteo will process this value and produces results, but these will not be written to the output table (functionality for this is located in triggers).
 
|}
 
 
 
====cmeteo_aggregation_areas====
 
{|class="collapsing_table collapsible collapsed"
 
!Specifications of cmeteo_aggregation_areas
 
 
|-
 
|-
|
+
| ASIA || CMETEO_REGION_WEATHER (view)    ||                                            || {{Object|CMET_REGION_WTH}}            || {{Object|ECMWF_DOWNSCALED_REGION}} (table)
Cmeteo_aggregation_areas is a replacement for a some of datasets from which cmeteo need to gather input concerning sizes of surfaces.<br>
 
 
 
Below a summary of some sets in various schemas and the definition of cmeteo_aggregation_areas
 
 
 
{|class="wikitable"
 
! !! !! !! !! !!domain
 
 
|-
 
|-
!schema:
+
| CGMS || CMETEO_REGION_WEATHER (synonym) || {{Object|CMETEO_NUTS_WEATHER}} (view)      || {{Object|CMET_NUTS_WTH}}              || {{Object|NUTS_WEATHER}} (table)
|CGMS_EUR_08
 
|CGFS_EUR_09
 
|CGMS_ASIA_08
 
|
 
|
 
 
|-
 
|-
!dataset:
+
| CGMS || CMETEO_REGION_WEATHER (synonym) || {{Object|CMETEO_ZONAL_WEATHER}} (view)    || {{Object|CMET_ZONAL_WTH}}              || {{Object|ZONAL_WEATHER}} (table)
|aggregation_areas
 
| - 1)
 
|aggregation_areas
 
|cmeteo_aggregation_areas
 
|
 
 
|-
 
|-
!attributes:
+
| GWSI || CMETEO_REGION_WEATHER (view)   ||                                           || {{Object|CMET_REGION_WTH}}             || {{Object|REGION_WEATHER_MODEL_10}} (table)
  |crop_no              || ||crop_no        ||crop_no          ||NN number(10)
 
|-                                                             
 
| ||nuts_code            || ||nuts_code      ||reg_code        ||NN varchar2(10)
 
|-                                                             
 
| ||year                || ||year            ||year             ||NN number(4)
 
|-                                                             
 
| ||area_cultivated      || ||area_cultivated ||area_cultivated  ||number
 
|-                                                             
 
| ||source              || ||source          ||source          ||NN varchar2(40)
 
|-                                         
 
| ||day                  || ||day            ||                ||
 
|-                                         
 
| ||percentage          || ||percentage      ||                ||
 
 
|}
 
|}
 +
The intermediate objects in the CGFS and CGMS environments are views to route the data to the correct target data source. They are alternately used by the synonym CMETEO_REGION_WEATHER.
 +
 +
====Structure conversion====
 +
  
1) CGFS_EUR_09 uses the dataset of CGMS_EUR_08.<br>
 
 
|}
 
|}
  
====cmeteo_grid_landcover_areas====
 
{|class="collapsing_table collapsible collapsed"
 
!Specifications of cmeteo_grid_landcover_areas
 
|-
 
|
 
Cmeteo_grid_landcover_areas is a replacement for a some of datasets from which cmeteo need to gather input concerning sizes of surfaces.<br>
 
  
Below a summary of some sets in various schemas and the definition of cmeteo_grid_landcover_areas
+
====CMETEO_AGGREGATION_AREAS====
 +
 
 +
 
 +
====CMETEO_GRID_LANDCOVER_AREAS====
 +
*CMETEO_GRID_LANDCOVER_AREAS
 +
*CMETEO_GRID_NUTS_LCV_AREAS
 +
*CMETEO_GRID_ZONAL_LCV_AREAS
 +
 
 +
 
 +
====CMETEO_LANDCOVERS====
 +
 
  
{|class="wikitable"
+
====CMETEO_REGION_MAPPINGS====
! !! !! !! !! !!domain
 
|-
 
!schema:
 
|CGMS_EUR_08
 
|CGFS_EUR_09
 
|CGMS_ASIA_08
 
|
 
|
 
|-
 
!datasets:
 
|grid_plus_nuts_landcover
 
| - 1)
 
|grid_landcover_areas 2)
 
|cmeteo_grid_landcover_areas
 
|
 
|-
 
|
 
|grid_plus_ens_landcover
 
| - 1)
 
|
 
|
 
|
 
|-
 
!attributes:
 
  |grid_no                || || ||grid_no          ||NN number(10)
 
|-                                             
 
| ||nuts_code/ens_code      || || ||                ||
 
|-                                             
 
| ||landcover_id            || || ||landcover_id    ||NN number(3)
 
|-                                             
 
| ||area                    || || ||area            ||NN number(10)
 
|-                                             
 
| ||reg_code (only in gpel) || || ||                ||
 
|-                     
 
| ||reg_map_id              || || ||reg_map_id      ||NN number(10)
 
|}
 
  
1) CGFS_EUR_09 uses the dataset of CGMS_EUR_08.<br>
 
2) In CGMS_ASIA_08 a dataset has to be defined.<br>
 
|}
 
  
 
==Examples==
 
==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.
 +
<pre>
 +
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
 +
              );
 +
</pre>
  
 
[[Category:Software Tools]]
 
[[Category:Software Tools]]

Latest revision as of 17:04, 30 June 2011



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
               );