- About Parallel Analog Ensemble
- Requirement and Dependencies
- Known Issues
About Parallel Analog Ensemble
Parallel Analog Ensemble (PAnEn) is a parallel implementation for Analog Ensemble (AnEn) which generates uncertainty information for a deterministic predictive model. Analogs are generated by using the predictive model and the corresponding historical observations. An introduction to Analog Ensemble technique can be found in this post. It has been successfully applied to forecasts of several weather variables, for example, short-term temperature and wind speed predictions. Publications can be found in the references.
PAnEn is developed by Geoinformatics and Earth Observation Laboratory at Penn State University. This website contains information for installing and using the
PAnEn programs and packages. R and C++ documentation can be found on the right. Posts for various topics can also be found there, and are organized by tags. If you have any questions, please open an issue here.
This package contains several libraries and applications:
- AnEn: The main C++ library. It provides main functionality of the AnEn method;
- AnEnIO: The library for file I/O. Currently, it supports reading and writing standard NetCDF.
- RAnEn: An R wrapper of the C++ library.
- Apps: Multiple executables in the apps folder designed for analog computation and data management.
Requirement and Dependencies
A list of requirement and dependency is provided below. Note that you don’t necessarily have to install them all because some of them can be automatically installed or you simply are not installing some components of the program. For example, you won’t need R if you only need the C++ program; and you won’t need Boost C++ and NetCDF-C if you are only installing the R package
|CMake||Required for the C++ program.|
|GCC/Clang||Required for the C++ program.|
|NetCDF-C||Optional for the C++ program. If it is not found, the project will try to build it.|
|Boost C++||Optional for the C++ program. It is recommended to let the project build it for the C++ program.|
|CppUnit||Required for the C++ program when building tests.|
|R||Required for the R library.|
|OpenMP||Optional for both R and C++.|
First, make sure you have already installed the dependencies. Typically GNU compilers with a version later than
CMake is required. If you are using MacOS, you probably need to install GNU compilers in order to have
OpenMP multithreading available.
Then, please clone or download the repository here and create a
build/ folder under the repository directory.
git clone https://github.com/Weiming-Hu/AnalogsEnsemble.git cd AnalogsEnsemble mkdir build cd build cmake .. # If you would like to change the default compiler, specify the compilers like this # # CC=[full path to CC] CXX=[full path to CXX] cmake .. # You can scoll down to explore more parameters for cmake # # cmake -DCMAKE_INSTALL_PREFIX=/some/folder/ -DBOOST_TYPE=SYSTEM [other parameters] ..
Read the output messages and make sure there are no errors. If you would like to change parameters for
cmake, please delete all files in
build/ folder and rerun the
Then, please compile the programs and the libraries.
make # Or if you are using UNIX system, use the flag -j[number of cores] to parallelize the make process make -j4 # Build document if needed. The /html and the /man folders will be in your build directory # # make document # If you want to install the program to your machine # # make install
After the compilation, the programs and libraries should be in the folder
cd into the binary folder
[Where your repository folder is]/AnalogsEnsemble/output/bin/ and run the following command to see help messages.
./analogGenerator # Analog Ensemble program --- Analog Generator # Available options: # -h [ --help ] Print help information for options. # -c [ --config ] arg Set the configuration file path. Command line # options overwrite options in configuration file. # ... [subsequent texts ignored]
If you want to clean up the folder, please do the following.
The command is the same for
RAnEn installation and update.
Generally, R version should be later than or equal to
3.3.0. And the following R packages are needed:
If your operating system is
Windows, please also install Rtools.
The following R command installs the latest version of
# Read more if OpenMP is not supported # install.packages("https://github.com/Weiming-Hu/AnalogsEnsemble/raw/master/RAnalogs/releases/RAnEn_latest.tar.gz", repos = NULL)
Solution for a Specific Version
If you want to install a specific version of
RAnEn, you can go to the release folder, copy the full name of the tarball file, replace the following part
[tarball name] (including the square bracket) with it, and run the command in R.
# Read more if OpenMP is not supported # install.packages("https://github.com/Weiming-Hu/AnalogsEnsemble/raw/master/RAnalogs/releases/[tarball name]", repos = NULL)
Openmp multithreading is not supported, or if you simply want to use a different compiler, please create a
Makevars file under
~/.R, with the following content.
CXX1X=[C++11 compiler] # required on Mac OS CXX11=[C++11 compiler]
CMake Tunable Parameters Look-up
|CC||The C compiler to use.||[System dependent]|
|CXX||The C++ compiler to use.||[System dependent]|
|INSTALL_RAnEn||Build and install the
|CMAKE_PREFIX_PATH||Which folder(s) should cmake search for packages besides the default. Paths are surrounded by double quotes and separated with semicolons.||[Empty]|
|CMAKE_INSTALL_PREFIX||The installation directory.||[System dependent]|
|USE_NCCONFIG||Use the nc_config program if found. This might cause problems sometimes if not properly setup.||ON|
|VERBOSE||Print detailed messages during the compiling process.||OFF|
|CODE_PROFILING||Print time profiling information.||OFF|
|ENABLE_MPI||Build the MPI version of the CAnEnIO library for parallel I/O. But this is still underdevelopment.||OFF|
|BUILD_GRIBCONVERTER||Build the GRIB Converter utility. Eccodes library required.||OFF|
- Delle Monache, Luca, et al. “Probabilistic weather prediction with an analog ensemble.” Monthly Weather Review 141.10 (2013): 3498-3516.
- Cervone, Guido, et al. “Short-term photovoltaic power forecasting using Artificial Neural Networks and an Analog Ensemble.” Renewable energy 108 (2017): 274-286.
- Junk, Constantin, et al. “Predictor-weighting strategies for probabilistic wind power forecasting with an analog ensemble.” Meteorol. Z 24.4 (2015): 361-379.
- Balasubramanian, Vivek, et al. “Harnessing the power of many: Extensible toolkit for scalable ensemble applications.” 2018 IEEE International Parallel and Distributed Processing Symposium (IPDPS). IEEE, 2018.
Please see known issues in this post. If you could not find solutions to your issue, please submit an issue. Thank you.
# "`-''-/").___..--''"`-._ # (`6_ 6 ) `-. ( ).`-.__.`) WE ARE ... # (_Y_.)' ._ ) `._ `. ``-..-' PENN STATE! # _ ..`--'_..-_/ /--'_.' ,' # (il),-'' (li),' ((!.-' # # Authors: # Weiming Hu <firstname.lastname@example.org> # Guido Cervone <email@example.com> # # Contributors: # Laura Clemente-Harding <firstname.lastname@example.org> # Martina Calovi <email@example.com> # Luca Delle Monache # # Geoinformatics and Earth Observation Laboratory (http://geolab.psu.edu) # Department of Geography and Institute for CyberScience # The Pennsylvania State University