# Changes between Version 13 and Version 14 of EcomsUdg/RPackage/Functions

Ignore:
Timestamp:
May 17, 2013 1:13:48 PM (9 years ago)
Comment:

--

### Legend:

Unmodified
 v13 ''__Arguments__'' * dataset: A character string indicating the full URL path to the OPeNDAP dataset. Currently, the accepted values correspond to the available [https://www.meteo.unican.es/trac/meteo/wiki/SpecsEuporias/DataServer/Datasets Datasets System4 datasets] /System4_Seasonal_15Members.ncml, but using the System4_Seasonal_15Members.ncml, System4_Seasonal_51Members.ncml or System4_Annual_15Members.ncml ending strings depending on the dataset of choice. * var: Variable code. Argument values currently accepted are tas, tasmin, tasmax, pr or mslp, as internally defined in the vocabulary for System4 following the nomenclature displayed in the table below. However, note that new variables and datasets will be progressively included. Note that depending on the time step of the variable the units might be referred to different time aggregations. For instance, currently mslp is 6-hourly, and thus the 6-hourly mean value is returned for each time step. Similarly, 24-h accumulated values are returned for pr, and so on. Note that the ''instantaneous'' and ''aggregated'' fields in table below refer to the potential time step values that the variables may take, which does not mean that the resolution provided by the System4 model is necessarily that. ||='''Short Name'''=||='''Long name'''=||='''Units'''=||='''Instantaneous'''=||='''Aggregated'''=|| ||tasmax ||Maximum temperature at 2 metres ||degC||No||Yes|| ||tasmin ||Minimum temperature at 2 metres ||degC||No||Yes|| ||tas ||Mean temperature at 2 metres ||degC||Yes||Yes|| ||pr ||Total precipitation accumulated||mm||No||Yes|| ||mslp ||Mean sea level pressure ||Pa||Yes||Yes|| * members: Optional. Default to all members. In the above case, a single member (the first) of the System4 ensemble is loaded, but additional members could be also specified  (e.g. members=NULL for all members, or members=1:5 for the first five members). * dataset: A character string indicating the full URL path to the OPeNDAP dataset. Currently, the accepted values correspond to the System4 [https://www.meteo.unican.es/trac/meteo/wiki/SpecsEuporias/DataServer/Datasets  available datasets] at the SPECS-EUPORIAS THREDDS Data Server. * 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. * season: A vector of integers specifying the desired season (in months, January=1, etc.) of analysis. Options include a single month (as in the above example) or a standard season (e.g. period = c(12,1,2) for standard Boreal winter, DJF). * years: Optional. Default to all available years. Vector of years to select. Note that in cases with year-crossing seasons (e.g. winter DJF, season = c(12,1,2), for a particular year period years = 1981:2000), by convention the first season would be DJF 1980/81, if available (otherwise a warning message is given). * leadMonth: Lead month forecast time corresponding to the first month of the specified season. Note that leadMonth = 1 for season = 1 (January) corresponds to the December initialization forecasts. In this way the effect of the lead time forecast in the analysis of a particular season can be analyzed by just changing this parameter. * 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 a whole year forecast from January to December. 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. * 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). * leadMonth: Lead month forecast time corresponding to the first month of the specified season. Note that leadMonth = 1 for season = 1 (January) corresponds to the December initialization forecasts. The effect of the lead time in the forecast for a particular season can be analyzed by just changing this parameter. ''__Details__'' 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=|| The ''SPECS-EUPORIAS Data Portal'' can be remotely accessed from R via the [mtl:browser:MLToolbox/trunk/MLToolbox_experiments/antonio/system4/r/loadSystem4.R loadSystem4.R] function. Note that this function is part of a more comprehensive R package currently under development. 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. A worked example describing a multi-model selection of a dataset is presented in the tutorial, which can be downloaded [https://www.meteo.unican.es/trac/meteo/attachment/wiki/SpecsEuporias/DataPortal_Tutorial.pdf here], or in the section [wiki:SpecsEuporias/RPackage/Examples Examples]. {{{#!comment 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. }}} ''__Value'' The output returned by the function consists of a list with the following elements providing the necessary information for data representation and analysis: * End`: End time of the verification period of the variable ''__Note__'' A worked example describing a multi-model selection of a dataset is presented in the tutorial, which can be downloaded [https://www.meteo.unican.es/trac/meteo/attachment/wiki/SpecsEuporias/DataPortal_Tutorial.pdf here], or in the section [wiki:SpecsEuporias/RPackage/Examples Examples].