# Changes between Version 37 and Version 38 of EcomsUdg/RPackage/Functions

Ignore:
Timestamp:
May 29, 2013 10:00:12 AM (8 years ago)
Comment:

--

### Legend:

Unmodified
 v37 * var: Variable code (see Details). * 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. * lonLim: Vector of length = 2, with minimum and maximum longitude coordinates, in decimal degrees, of the bounding box selected. * latLim: Vector of length = 2, with minimum and maximum latitude coordinates, in decimal degrees, of the bounding box selected. * lonLim: Vector of length = 2, with minimum and maximum longitude coordinates, in decimal degrees, of the bounding box selected. For single-point queries, a numeric value with the longitude coordinate. See details. * latLim: Vector of length = 2, with minimum and maximum latitude coordinates, in decimal degrees, of the bounding box selected. For single-point queries, a numeric value with the latitude coordinate. See details. * 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. * years: Optional vector of years to select. Default to all available years. Note that in the case of a year-crossing 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. === ''__Details__'' 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 grid-cell 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) grid-points to the coordinates introduced. 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 one-month 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 year-crossing 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). {{{#!comment 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. ||='''Short Name'''=||='''Long name'''=||='''Units'''=||='''Instantaneous'''=|| ||=tasmax=||=Maximum temperature at 2 metres||=degC=||=No=|| ||=tasmin=||=Minimum temperature at 2 metres||=degC=||=No=|| ||=tas=||=Mean temperature at 2 metres||=degC=||=Yes=|| ||=pr=||=Total precipitation accumulated||=mm=||=No=|| ||=mslp=||=Mean sea level pressure||=Pa=||=Yes=|| This function automatically cares about the proper location of the right indices for data sub-setting 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. }}} === ''__Examples__'' An example of this function is provided in the [wiki:SpecsEuporias/RPackage/Examples Examples section] An example of this function is provided in the [wiki:SpecsEuporias/RPackage/Examples#loadSeasonalForecast Examples section] = makeNcmlDataset =