In order to promote creation, access and sharing of scientific data, the NetCDF format has been created as a machine-independent format. NetCDF (network Common Data Form) is therefore an interface for array-oriented data access and a library that provides an implementation of the interface. The NetCDF software was developed at the Unidata Program Center in Boulder, Colorado. In order to graphicaly explore the content and structure of NetCDF files, you can use the ncBrowse java software or ncview. It is also possible to run ncdump on a given file in order to have a look at its structure (such as ncdump {my_netcdf_file} | more) and specially the parameters names (this is useful if remapping is needed, see below for in the keywords section).
The NetCDF format does not impose a specific set of metadata and therefore in order to easily exchange data within a given field, it is a good idea to standardize the metadata. Several such metadata schema can be used by this plugin:
In order to compile this plugin, you need libnetcdf (for C). For Linux, please select both the libraries and their development files in your package manager.
This plugin uses the following keywords:
When providing multiple files in one directory, in case of overlapping files, the file containing the newest data has priority. This is convenient when using forecats data to automatically use the most short-term forecast.
Using this plugin to build downscaled time series at virtual stations, with the ECMWF Era Interim data set (see section below):
Another example, to extract precipitation from the MeteoSwiss daily precipitation reanalysis, RhiresD
MeteoSwiss provides reanalysis of precipitation and other meteo fields from 1961 to present over Switzerland for different time scales: daily, monthly, yearly, as well as hourly (CPC dataset). The DEM are also provided, either in lat/lon, Swiss coordinates, rotated lat/lon, ... These data sets must be requested from MeteoSwiss and are available with a specific license for research.
Unfortunatelly, the naming of the parameters and dimensions within the files is not standard nor consistent. In order to handle the parameters names, simply run ncdump {my_netcdf_file} | more and use the name mapping facility of this plugin to map the non-standard parameters to our internal names (see the plugin keywords). When the dimensions are not standard (for example the time axis being called "TS_REFERENCE"), use first the ncrename tool that is part of the NCO utilities to rename both the dimension (-d) and the variable (-v):
The Era Interim data can be downloaded on the ECMWF dataserver after creating an account and login in.
It is recommended to extract data at 00:00, and 12:00 for all steps 3, 6, 9, 12. The select the following fields: 10 metre U wind component, 10 metre V wind component, 2 metre dewpoint temperature, 2 metre temperature, Forecast albedo, Mean sea level pressure, Skin temperature, Snow density, Snow depth, Soil temperature level 1, Surface pressure, Surface solar radiation downwards, Surface thermal radiation downwards, Total precipitation
Here we have included the forecast albedo so the RSWR can be computed from ISWR and the mean sea level pressure and surface pressure as proxies to compute the elevation. If you have the altitude in a separate file, it can be declared as DEM and there would be no need for the sea level pressure (this would also be much more precise).
You should therefore have the following request:
With the ECMWF Python Library, the request would be for example: