Weakly Constrained Ensembles (WCE)

This package creates ensemble perturbations that have to satisfy an a priori linear constraint. It can also be used to create perturbations that are aware of the land-sea mask or that use space- (or time-) dependent correlation length.

Details of the procedure are explained in:

Barth, A., Alvera-Azcárate, A., Beckers, J.-M., Weisberg, R. H., Vandenbulcke, L., Lenartz, F., and Rixen, M.: Dynamically constrained ensemble perturbations – application to tides on the West Florida Shelf, Ocean Sci., 5, 259-270, 2009

Please cite this manuscript if you use this method in a publication.


This packages requires either GNU Octave or MATLAB. If you use Octave version 3.0.5 or earlier, you need also the Octave package arpack. GNU Octave is a free software mostly compatible with Matlab.


  • Extract the package at a location that suits you
  • Add the path to your MATLAB/Octave search path in the menu File > Set Path (in MATLAB) or by adding:


in your start-up file called startup.m in MATLAB or .octaverc in GNU Octave.


The scripts wce_demo will show you several examples:


When using your own scripts, consider using the Matlab function “rng” to control the random numbers. E.g., call rng(‘shuffle’) before calling wce_simple.


Source code

The source code is available at http://data-assimilation.net/upload/WCE/WCE-1.0.tar.gz

Questions or problems ?

Please send an email to me (a dot barth at ulg dot ac dot be).