Changes between Version 25 and Version 26 of EcomsUdg/RPackage/Functions
- Timestamp:
- May 20, 2013 2:15:25 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
EcomsUdg/RPackage/Functions
v25 v26 2 2 3 3 4 ''__Description__'' 4 5 === ''__Description'' 5 6 6 7 Generates a NcML file from a collection of netCDF files. 7 8 8 ''__Usage__'' 9 10 === ''__Usage'' 9 11 10 12 {{{ … … 12 14 }}} 13 15 14 ''__Arguments__'' 16 17 === ''__Arguments'' 15 18 16 19 * `source.dir`: character string indicating a valid path of the directory containing the files … … 19 22 The output is a NcML file named as `file.name` which will be stored in the `output.dir`. 20 23 21 ''__Details__'' 24 25 === ''__Details'' 22 26 23 27 * All files of the same dataset should be put together in the same directory, indicated by the `source.dir` argument. … … 25 29 * A number of useful recommendations regarding dataset naming are provided [http://www.unidata.ucar.edu/software/netcdf-java/reference/DatasetUrls.html#NcmlScan here] 26 30 27 ''__Value__'' 31 32 === ''__Value'' 28 33 29 34 Creates a NcML file at the specified location 30 35 31 ''__Notes__''36 === ''__Notes'' 32 37 33 38 A NcML file is a [http://en.wikipedia.org/wiki/XML XML] representation of netCDF metadata. This is approximately the same information one gets when dumping the header of a netCDF file (e.g. by typing on the terminal the command `ncdump -h`). By means of NcML it is possible to create virtual datasets by modifying and aggregating other datasets, thus providing maximum flexibility and ease of access to data stored in collections of files containing data from different variables/time slices. The function `makeNcmlDataset` is intended to deal with reanalysis, forecasts and other climate data products, often consisting of collections of netCDF files corresponding to different variables and partitioned by years/decades or other time slices. It operates by applying to types of [http://www.unidata.ucar.edu/software/netcdf/ncml/v2.2/Aggregation.html aggregation operations]: … … 37 42 38 43 39 44 === ''__Examples'' === 45 46 An example of this function is provided in the [wiki:SpecsEuporias/RPackage/Examples Examples section] 40 47 41 48 … … 45 52 = dataInventory = 46 53 47 ''__Description__''54 === ''__Description__'' 48 55 49 56 Provides summary information about the main characteristics of a NcML dataset. 50 57 51 ''__Usage__'' 58 59 === ''__Usage__'' 52 60 53 61 {{{ … … 56 64 57 65 58 ''__Arguments__'' 66 67 === ''__Arguments__'' 59 68 60 69 * `ncml.file`: a character string indicating the full path to the virtual dataset (the `NcML` file). This can be either a path containing the directory and name of the file, or an appropriate URL in case the dataset is remotely accessed (e.g., via the [https://www.meteo.unican.es/trac/meteo/wiki/SpecsEuporias/DataServer/THREDDS SPECS-EUPORIAS THREDDS]). 61 70 62 ''__Value__'' 71 72 === ''__Value__'' 63 73 64 74 The output of the function consists of a list of variable length, depending on the number of variables contained in the dataset, following this structure: … … 73 83 * `Values`: A vector containing all the dimension values. This might be a vector of `POSIXlt` class in case of a dimension of type ''time'', or numeric in other cases. 74 84 75 ''__Details__'' 85 86 === ''__Details__'' 76 87 77 88 A common need prior to data analysis is to get an overview of all data available and their structure (variables, dimensions, units, geographical extent, time span ...). Note that the function provides an overview of the raw data as they are stored in the original data files. The units may change after loading the function if conversions are applied via dictionary. 78 89 79 90 91 === ''__Examples__'' 92 93 An example of this function is provided in the [wiki:SpecsEuporias/RPackage/Examples Examples section] 94 95 96 80 97 81 98 … … 83 100 = loadObservations = 84 101 85 ''__Description'' 102 103 === ''__Description'' 86 104 87 105 Loads observational station data from standard station datasets stored in ''.csv'' files. 88 106 89 ''__Usage'' 107 108 === ''__Usage'' 90 109 91 110 {{{ … … 93 112 }}} 94 113 95 ''__Arguments'' 114 115 === ''__Arguments'' 96 116 97 117 * `source.dir`: Character string indicating the full path to the directory where the data are stored (see Details). … … 104 124 105 125 106 ''__Details'' 126 127 === ''__Details'' 107 128 108 129 This function works with standard ''.csv'' observational datasets. It allows loading data from one or several stations at a time. … … 113 134 114 135 115 ''__Value'' 136 137 === ''__Value'' 116 138 117 139 A list with the containing the following elements: … … 124 146 125 147 148 === ''__Examples__'' 149 150 An example of this function is provided in the [wiki:SpecsEuporias/RPackage/Examples Examples section] 151 152 153 126 154 127 155 = loadData = 128 156 129 ''__Description'' 157 158 === ''__Description'' 130 159 131 160 Loads selected dimensional slices of a NcML dataset. The function is intended to deal with gridded data (interpolated surfaces, reanalysis, RCMs/GCMs ...) 132 161 133 ''__Usage'' 162 163 === ''__Usage'' 134 164 135 165 {{{ … … 137 167 }}} 138 168 139 ''__Arguments'' 169 170 === ''__Arguments'' 140 171 141 172 * `var`: Character string indicating the variable to load. … … 149 180 150 181 151 ''__Details'' 182 183 === ''__Details'' 152 184 153 185 The function can select the whole spatial domain covered by the dataset, spatial windows defined by the minimum and maximum corner coordinates, and single grid-cell values. In the last two cases, the function operates by finding the closest grid-points to the coordinates introduced. … … 160 192 161 193 162 ''__Value'' 194 195 === ''__Value'' 163 196 164 197 A list with the following components: … … 171 204 172 205 206 === ''__Examples__'' 207 208 An example of this function is provided in the [wiki:SpecsEuporias/RPackage/Examples Examples section] 209 173 210 174 211 175 212 = loadSystem4 = 176 213 177 ''__Description__'' 214 215 === ''__Description__'' 178 216 179 217 Loads hindcast/forecast data from ECMWF's System4 model by remotely accessing the SPECS-EUPORIAS THREDDS Data Server. 180 218 181 ''__Usage__'' 219 220 === ''__Usage__'' 182 221 183 222 {{{ … … 185 224 }}} 186 225 187 ''__Arguments__'' 226 227 === ''__Arguments__'' 188 228 189 229 * `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. … … 196 236 * `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. 197 237 198 ''__Details__'' 238 239 === ''__Details__'' 199 240 200 241 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. … … 214 255 215 256 216 ''__Value'' 257 258 === ''__Value'' 217 259 218 260 The output returned by the function consists of a list with the following elements providing the necessary information for data representation and analysis: … … 228 270 * `End`: End time of the verification period of the variable 229 271 230 ''__Note__'' 272 273 === ''__Note__'' 231 274 232 275 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], 233 276 234 ''__Examples__'' 235 236 An example of this function is provided in the [wiki:SpecsEuporias/RPackage/Examples Examples section] 237 238 239 240 277 278 === ''__Examples__'' 279 280 An example of this function is provided in the [wiki:SpecsEuporias/RPackage/Examples Examples section] 281 282 283 284