# Changes between Version 7 and Version 8 of EcomsUdg/RPackage/Functions

Ignore:
Timestamp:
Apr 29, 2013 4:49:25 PM (9 years ago)
Comment:

--

### Legend:

Unmodified
 v7 '''__1. dataInventory.R__''' '''__1. ncmlAggreg.R__''' 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 [http://www.unidata.ucar.edu/software/netcdf/ncml/v2.2/Aggregation.html 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, as far as all data are queried from a single NcML representation of the dataset. NcML files are the basis on which the different R functions here described are based on. The ncmlAggreg.R function generates a NcML file from a collection of netCDF or GRIB files stored in a common directory. The function is called as follows: {{{ > ncmlAggreg(source.dir, output.dir = getwd(), file.name) }}} The arguments are next described: * source.dir: character string indicating a valid path of the directory containing the files * output.dir: character string indicating a valid path of the directory where the ncml file is to be created. Default to working directory (see details) * file.name: character string indicating the name of the output file, including the extension ".ncml" The output is a NcML file named as file.name which will be stored in the output.dir. '''__2. dataInventory.R__''' Prior to data analysis, a common need is to have an overview of all data available and their structure (variables, dimensions, units, geographical extent, time span ...). The function dataInventory.R is intended to perform this task, returning a list of meta-data components summarizing the main characteristics of the selected dataset. Note that his function provides an overview of the data as they are stored in the original data files. The characteristics of the loaded data after using any of the functions for data access (e.g., loadSystem4.R) may change (for instance, after data transformation temperature may be provided in ºC instead of the originally stored K, and so on). '''__2. loadSystem4.R__''' '''__3. loadSystem4.R__''' 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.