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.

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.

loadSystem4

Description

Loads hindcast/forecast data from ECMWF's System4 model by remotely accessing the SPECS-EUPORIAS THREDDS Data Server.

Usage

loadSystem4(dataset, var, members, lonLim, latLim, season, years, leadMonth)

Arguments

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

Short NameLong nameUnitsInstantaneousAggregated
tasmax Maximum temperature at 2 metres degCNoYes
tasmin Minimum temperature at 2 metres degCNoYes
tas Mean temperature at 2 metres degCYesYes
pr Total precipitation accumulatedmmNoYes
mslp Mean sea level pressure PaYesYes

The SPECS-EUPORIAS Data Portal can be remotely accessed from R via the ?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 ?here, or in the section Examples?. The output returned by the function consists of a list with the following elements providing the necessary information for data representation and analysis: