WikiPrint - from Polar Technologies

makeNcmlDataset

Description

Generates a NcML file from a collection of netCDF files.

Usage

makeNcmlDataset(source.dir, ncml.file) 

Arguments

The output is a NcML file named as file.name which will be stored in the output.dir.

Details

Value

Creates a NcML file at the specified location

Notes

A NcML file is a ?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 ?aggregation operations:

  1. Union: Performs the union of all the dimensions, attributes, and variables in multiple NetCDF files
  2. JoinExisting: Variables of the same name (in different files) are connected along their existing, outer dimension, called the aggregation dimension. In this case the aggregation dimension is time.

Examples

An example of this function is provided in the Examples section?

dataInventory

Description

Provides summary information about the main characteristics of a NcML dataset.

Usage

dataInventory(ncml.file)

Arguments

Value

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:

Details

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.

Examples

An example of this function is provided in the Examples section?

loadObservations

Description

Loads observational station data from standard station datasets stored in .csv files.

Usage

loadObservations(source.dir, var, standard.vars=TRUE, stationID, startDate=NULL, endDate=NULL, season=NULL)

Arguments

Details

This function works with standard .csv observational datasets. It allows loading data from one or several stations at a time. The dictionary is the table that translates the variable as stored in the dataset to the standard variables defined in the vocabulary. More details ?here

In the case of boreal winter selection (season=c(12,1,2)) the function will tie strictly to the time interval defined by the startDateand endDate arguments, and therefore will not retrieve data from the previous December, nor from the next January and February before/after the start/end years defined (note that this has a different behavior than loadSeasonalForecast and loadGCM)

Value

A list with the containing the following elements:

Examples

An example of this function is provided in the Examples section?

loadGCM

Description

Loads selected dimensional slices of a NcML dataset. The function is intended to deal with gridded data (interpolated surfaces, reanalysis, RCMs/GCMs ...)

Usage

loadGCM(dataset, var, standard.vars=TRUE, dictionary=NULL, lonLim=NULL, latLim=NULL, level=NULL, season=NULL, years=NULL)

Arguments

Details

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.

For variables with different vertical levels, only defined level values will be allowed, otherwise getting an error. The function does not look for the closest level to the value introduced, in order to avoid confusions. The function dataInventory is useful for finding the valid level values defined for a particular variable.

The behavior of the function for year-crossing seasons (e.g. DJF) is similar to loadSeasonalForecast.

Value

A list with the following components:

Examples

An example of this function is provided in the Examples section?

loadSeasonalForecast

Description

Loads seasonal hindcast/forecast data from the SPECS-EUPORIAS THREDDS Data Server.

Usage

loadSeasonalForecast(dataset, var, standard.vars = TRUE, dictionary = NULL, members, lonLim, latLim, season, years, leadMonth)

Arguments

Details

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).

Value

The output returned by the function consists of a list with the following elements providing the necessary information for data representation and analysis:

Examples

An example of this function is provided in the Examples section?