Changes between Version 25 and Version 26 of EcomsUdg/RPackage/Functions


Ignore:
Timestamp:
May 20, 2013 2:15:25 PM (8 years ago)
Author:
juaco
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • EcomsUdg/RPackage/Functions

    v25 v26  
    22
    33
    4 ''__Description__''
     4
     5=== ''__Description''
    56
    67Generates a NcML file from a collection of netCDF files.
    78
    8 ''__Usage__''
     9
     10=== ''__Usage''
    911
    1012{{{
     
    1214}}}
    1315
    14 ''__Arguments__''
     16
     17=== ''__Arguments''
    1518
    1619* `source.dir`: character string indicating a valid path of the directory containing the files
     
    1922The output is a NcML file named as `file.name` which will be stored in the `output.dir`.
    2023
    21 ''__Details__''
     24
     25=== ''__Details''
    2226
    2327* All files of the same dataset should be put together in the same directory, indicated by the `source.dir` argument.
     
    2529* A number of useful recommendations regarding dataset naming are provided [http://www.unidata.ucar.edu/software/netcdf-java/reference/DatasetUrls.html#NcmlScan here]
    2630
    27 ''__Value__''
     31
     32=== ''__Value''
    2833
    2934Creates a NcML file at the specified location
    3035
    31 ''__Notes__''
     36=== ''__Notes''
    3237
    3338A 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]:
     
    3742
    3843
    39 
     44=== ''__Examples'' ===
     45
     46An example of this function is provided in the [wiki:SpecsEuporias/RPackage/Examples Examples section]
    4047
    4148
     
    4552= dataInventory =
    4653
    47 ''__Description__''
     54=== ''__Description__''
    4855
    4956Provides summary information about the main characteristics of a NcML dataset.
    5057
    51 ''__Usage__''
     58
     59=== ''__Usage__''
    5260
    5361{{{
     
    5664
    5765
    58 ''__Arguments__''
     66
     67=== ''__Arguments__''
    5968
    6069* `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]).
    6170
    62 ''__Value__''
     71
     72=== ''__Value__''
    6373
    6474The output of the function consists of a list of variable length, depending on the number of variables contained in the dataset, following this structure:
     
    7383       * `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.
    7484
    75 ''__Details__''
     85
     86=== ''__Details__''
    7687
    7788A 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.
    7889
    7990
     91=== ''__Examples__''
     92
     93An example of this function is provided in the [wiki:SpecsEuporias/RPackage/Examples Examples section]
     94
     95
     96
    8097
    8198
     
    83100= loadObservations =
    84101
    85 ''__Description''
     102
     103=== ''__Description''
    86104
    87105Loads observational station data from standard station datasets stored in ''.csv'' files.
    88106
    89 ''__Usage''
     107
     108=== ''__Usage''
    90109
    91110{{{
     
    93112}}}
    94113
    95 ''__Arguments''
     114
     115=== ''__Arguments''
    96116
    97117* `source.dir`: Character string indicating the full path to the directory where the data are stored (see Details).
     
    104124
    105125
    106 ''__Details''
     126
     127=== ''__Details''
    107128
    108129This function works with standard ''.csv'' observational datasets. It allows loading data from one or several stations at a time.
     
    113134
    114135
    115 ''__Value''
     136
     137=== ''__Value''
    116138
    117139A list with the containing the following elements:
     
    124146
    125147
     148=== ''__Examples__''
     149
     150An example of this function is provided in the [wiki:SpecsEuporias/RPackage/Examples Examples section]
     151
     152
     153
    126154
    127155= loadData =
    128156
    129 ''__Description''
     157
     158=== ''__Description''
    130159
    131160Loads selected dimensional slices of a NcML dataset. The function is intended to deal with gridded data (interpolated surfaces, reanalysis, RCMs/GCMs ...)
    132161
    133 ''__Usage''
     162
     163=== ''__Usage''
    134164
    135165{{{
     
    137167}}}
    138168
    139 ''__Arguments''
     169
     170=== ''__Arguments''
    140171
    141172* `var`: Character string indicating the variable to load.
     
    149180
    150181
    151 ''__Details''
     182
     183=== ''__Details''
    152184
    153185The 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.
     
    160192
    161193
    162 ''__Value''
     194
     195=== ''__Value''
    163196
    164197A list with the following components:
     
    171204
    172205
     206=== ''__Examples__''
     207
     208An example of this function is provided in the [wiki:SpecsEuporias/RPackage/Examples Examples section]
     209
    173210
    174211
    175212= loadSystem4 =
    176213
    177 ''__Description__''
     214
     215=== ''__Description__''
    178216
    179217Loads hindcast/forecast data from ECMWF's System4 model by remotely accessing the SPECS-EUPORIAS THREDDS Data Server.
    180218
    181 ''__Usage__'' 
     219
     220=== ''__Usage__'' 
    182221
    183222{{{
     
    185224}}}
    186225
    187 ''__Arguments__''
     226
     227=== ''__Arguments__''
    188228
    189229* `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.
     
    196236* `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.
    197237
    198 ''__Details__''
     238
     239=== ''__Details__''
    199240
    200241Currently, 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.
     
    214255
    215256
    216 ''__Value''
     257
     258=== ''__Value''
    217259
    218260The output returned by the function consists of a list with the following elements providing the necessary information for data representation and analysis:
     
    228270    * `End`: End time of the verification period of the variable
    229271
    230 ''__Note__''
     272
     273=== ''__Note__''
    231274
    232275A 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],
    233276
    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
     280An example of this function is provided in the [wiki:SpecsEuporias/RPackage/Examples Examples section]
     281
     282
     283
     284