You are here

SELFE - Documentation


  1. Parallel SELFE with MPI protocol (recommended)

  2. SELFE serial version

    • Serial User manual
    • Main changes from previous version (1.5k2):

      • fixed bugs in GOTM and P&P closures;
      • added ifltype=-4 option for velocity boundary condition.
    • ELCIRC serial version

Getting Started

Users with Prior Experience
Be aware of the following potential pitfalls:

  • If you have only used structured grid models, you need to first learn how to generate an unstructured grid. Available grid generation packages include freeware ( Shewchuk's Triangle; GMSH etc) and commercial packages (SMS, ARGUS etc). The generated triangular grids from these packages need to be converted to the .gr3 format required by SELFE; e.g., the Utility Library has perl scripts to convert between .2dm file of SMS and .gr3. SELFE is generally very robust with respect to grid quality but you should note that grid quality pays in terms of accuracy.
  • If you have only used models with explicit time stepping, you need to know that SELFE is an implicit model. This means that large time step is not only allowed but also encouraged! In fact the numerical diffusion in SELFE will increase when the CFL number is significantly below 1, which may lead to undesirable results. So estimate the CFL number in your application and start from a large time step (e.g., a 5 min step or barotropic applications; for baroclinic applications, the time step is constrained by the internal Courant number and so may need to be smaller). This also implies that if you are doing a convergence study you need to keep the CFL number fixed while reducing the time step (which means you have to reduce the grid spacing). Remember: a large time step is a double winner as you get both efficiency and accuracy!

Recommend steps to follow are outlined below:

  1. Download and compile the source code (for serial or parallel version) packages. We recommend you use the parallel version of SELFE.
  2. Run one or more of the tests included in the software bundle (parallel version). Additionally there are some benchmark cases for which input files are available for the serial version. Run info messages are found in mirror.out where you can monitor the progress of the run.
  3. Postprocessing: to extract time series at specified locations you can use read_output7b.f90 included in the serial package. The matlab scripts under "Downloading software" can be used to visualize the global outputs (elevation, salinity, velocity etc). Note that you may need to program the matlab code to get what you want exactly. We are still working to build a more user-friendly visualization package.
  4. Set up your own application. You may want to familiarize the theory behind SELFE first. If you feel you belong to the lucky and brave few, skip the paper and start following the user manual to prepare input files. Refer back to the input files for the tests you did as you read through the manual.
  5. Some useful sites to help you:

Known Bugs & Fixes

1) specir.F90 in EcoSim package has bugs in it; please replace it with this package.

2) elfe_main.F90, near line 3805
(If you downloaded V3.1dc prior to January 2011, please edit your code with the following fix):


else if(l==2) then



if(iadvf==0) then


Should be replaced with:

else if(l==2) then

sdbt(3,j,isd0)=swild3(1) !ttint

sdbt(4,j,isd0)=swild3(2) !ssint

if(iadvf==0) then


Getting Help

The entire SELFE users community can be contacted through the mailing list Please note that we as core development and support team have only limited resources to support users, and we cannot commit to addressing all questions or requests.