Changes between Version 37 and Version 38 of EcomsUdg/RPackage/Functions
 Timestamp:
 May 29, 2013 10:00:12 AM (9 years ago)
Legend:
 Unmodified
 Added
 Removed
 Modified

EcomsUdg/RPackage/Functions
v37 v38 188 188 * `var`: Variable code (see Details). 189 189 * `members`: Optional. A vector of integers indicating the members to be loaded. Default to `NULL`, which loads all members available. For instance, `members=1:5` will retrieve the first five members. 190 * `lonLim`: Vector of length = 2, with minimum and maximum longitude coordinates, in decimal degrees, of the bounding box selected. 191 * `latLim`: Vector of length = 2, with minimum and maximum latitude coordinates, in decimal degrees, of the bounding box selected. 190 * `lonLim`: Vector of length = 2, with minimum and maximum longitude coordinates, in decimal degrees, of the bounding box selected. For singlepoint queries, a numeric value with the longitude coordinate. See details. 191 * `latLim`: Vector of length = 2, with minimum and maximum latitude coordinates, in decimal degrees, of the bounding box selected. For singlepoint queries, a numeric value with the latitude coordinate. See details. 192 192 * `season`: A vector of integers specifying the desired season (in months, January=1 ...). Options include one to several months. If `NULL` (the default), the function will return all possible months given the `leadMonth`. For instance, `period = c(12,1,2)` will retrieve the forecast for the standard boreal winter (DJF), `period = 6:8` for summer (JJA) and so on. See details. 193 193 * `years`: Optional vector of years to select. Default to all available years. Note that in the case of a yearcrossing season for a particular year period (e.g. winter DJF, `season = c(12,1,2)` and `years = 1981:2000`), by convention the first season returned will be DJF 1980/81, if available (otherwise a warning message is given). See details. … … 197 197 === ''__Details__'' 198 198 199 Regarding the spatial component of the returned data, the function can select the whole spatial domain covered by the dataset (in this case `lonLim = NULL` and `latLim = NULL`), spatial windows defined by the minimum and maximum corner coordinates (for instance `lonLim = c(10,10)` and `latLim = c(35,45)` indicates a rectangular window), and single gridcell values (for instance `lonLim = 3.21` and `latLim = 41.087` for retrieving the data in the closest grid point to the point coordinate 3.21E , 41.087N). In the last two cases, the function operates by finding the closest (euclidean distance) gridpoints to the coordinates introduced. 200 199 201 The function has been implemented to access seasonal slices (as determined by the `season` argument. Seasons can be defined in several ways: A single month (e.g. `season = 1` for January), a standard season (e.g. `season=c(1,2,3)` for JFM, or `season=c(12,1,2)` for DJF), or any period of consecutive months (e.g. `season=c(1,2,3,4,5,6)`, for the first half of the year). Seasons are returned for a given year period (defined by the `years` argument, e.g. `years = 1981:2000`) with a homogeneous forecast lead time (as given by the `leadMonth` argument; e.g. `leadMonth = 1` for onemonth lead time) with respect to the first month of the selected season. For example, `season=c(1,2,3)` for `years = 1995:2000` and `leadMonth = 1` will return the following series: JFM 1995 (from the December 1994 runtime forecast), ..., JFM 2000 (from the December 1999 runtime forecast). Note that it is also possible to work with yearcrossing seasons, such as DJF. In this case, `season=c(12,1,2)` for `years = 1995:2000` and `leadMonth = 1` will return the following series: DJF 1994/1995 (from the November 1994 runtime forecast), ..., DJF 1999/2000 (from the November 1999 runtime forecast). 200 201 {{{#!comment202 Currently, accepted values for the argument `var` are `tas`, `tasmin`, `tasmax`, `pr` or `mslp`, as internally defined in the vocabulary of System4 following the nomenclature displayed in the table below. However, note that new variables and datasets will be progressively included. Further details regarding the nature and temporal aggregation of these variables can be obtained through the `dataInventory` function.203 204 205 ='''Short Name'''=='''Long name'''=='''Units'''=='''Instantaneous'''=206 =tasmax==Maximum temperature at 2 metres=degC==No=207 =tasmin==Minimum temperature at 2 metres=degC==No=208 =tas==Mean temperature at 2 metres=degC==Yes=209 =pr==Total precipitation accumulated=mm==No=210 =mslp==Mean sea level pressure=Pa==Yes=211 212 This function automatically cares about the proper location of the right indices for data subsetting across the different variable dimensions, given a few simple arguments for subset definition. In addition, instead of retrieving a NetCDF file that needs to be opened and read, the requested data is directly loaded into the current R working session, according to a particular structure described below, prior to data analysis and/or representation.213 }}}214 215 202 216 203 … … 232 219 === ''__Examples__'' 233 220 234 An example of this function is provided in the [wiki:SpecsEuporias/RPackage/Examples Examples section]221 An example of this function is provided in the [wiki:SpecsEuporias/RPackage/Examples#loadSeasonalForecast Examples section] 235 222 236 223 = makeNcmlDataset =