Changes between Version 2 and Version 3 of udg/ecoms/RPackage

May 14, 2013 11:48:35 AM (9 years ago)



  • udg/ecoms/RPackage

    v2 v3  
    11Since the [ R language] has been adopted for some key tasks in the EUPORIAS and SPECS projects (including the development of comprehensive validation and statistical-downscaling packages) a R package is currently under development. In the current status of this task, a first function has been created and the first trial version is already available, in order to explore and access the data portal in a user-friendly way, allowing the retrieval of dimensional slices of selected simulation members from the ECMWF's SYSTEM4 model. A full R package with added capabilities (including specific plot methods) and access to new datasets will be soon released for the SPECS/EUPORIAS community, as soon as new simulation datasets are incorporated into the project's THREDDS Data Server and new user's needs and requirements are identified and discussed.
     4'''Vocabulary definition'''
     6In order to set a common framework of work allowing a precise definition of the variables, the R package is based on the use of a vocabulary, containing the standard names of a number of variables commonly used in impact studies and downscaling applications. The naming conventions and the units are based on the standard name table provided by the [ NetCDF Climate and Forecast Metadata Convention]. The vocabulary consists of a table with
     8* Identifier: this is the standard name that the loading functions require as argument when we set the `standard.vars' argument to TRUE.
     9* Standard_name: standar name of the variable as defined by the CF convention.
     10* Units: units in which the standard variable is returned
     14"ta","temperature","degrees Celsius"
     15"tas","2-meter temperature","degrees Celsius"
     16"tasmax","maximum 2-m temperature","degrees Celsius"
     17"tasmin","minimum 2-m temperature","degrees Celsius"
     18"pr","Precipitation amount","mm"
     23"hus","specific_humidity","kg kg-1"
     25"ua","eastward_wind","m s-1"
     26"va","northward_wind","m s-1"
     32The dictionary is a table that defines the conversion between the variables of the model and the standard variables defined in the Vocabulary. The dictionary is a comma-sepparated text file (csv), that is identified with the same name than the dataset, and the extension .dic. In addition, it should be stored in the same directory that the dataset. The creation of the dictionary must be made by the user 'by hand', because it requires knowledge about the characteristics of the data stored in the dataset. The columns of the dictionary are next described:
     34 * identifier: this is the name of the standard variable, as defined in the vocabulary
     35 * short_name: this is the name with which the original variable has been coded in the dataset
     36 * time_step: the time interval between consecutive times in the time dimension axis (in hours)
     37 * lower_time_bound: lower time bound of the variable
     38 * upper_time_bound: upper time bound of the variable. For instance, if a variable has identical lower and upper time bounds, it means that it is instantaneous.
     39 * aggr_fun: time aggregation function. Type of aggregation function applied to the variable between the lower and upper time bound.
     40 * offset: constant summed to the original variable for units conversion (e.g.: offset = -273.15 for conversion from Kelvin to Celsius)
     41 * scale: scale factor applied to the original variable for units conversion (e.g.: scale = 0.001 for conversion from m to mm)
     44  identifier short_name time_step lower_time_bound upper_time_bound aggr_fun  offset scale
     451         ta        air        6h                0                0     none -273.15  1.00
     462         zg        hgt        6h                0                0     none    0.00  1.00
     473        hur       rhum        6h                0                0     none    0.00  0.01
     484        hus       shum        6h                0                0     none    0.00  1.00
     495        psl        slp        6h                0                0     none    0.00  1.00
     506         ua       uwnd        6h                0                0     none    0.00  1.00
     517         va       vwnd        6h                0                0     none    0.00  1.00
     55Note that the names of the columns are important (not so their relative order), because the `loadData.R' function will perform the conversion of the variable to the standard format by finding the corresponding values by the name of the columns.