Water quality degradation in harbour domains can have an important negative impact from an economic,
touristic and environmental point of view. In that sense, water quality management is becoming a main
concern for harbour managers. In this paper, we present the research behind the initiative started in Spanish
harbours to control water quality degradation due to accidental pollution. This management system is already
operationally running in the Barcelona harbour (NW Mediterranean Sea). The system is based on a recent
published risk assessment, which takes into account not only the different activities in the harbour and their
inherent risk of accident but also the physical behaviour of harbour waters. In this methodology, a key
element is to get hydrodynamic forecasts. Thus, the system is composed of a hierarchy of nested
hydrodynamic models covering from the basin scale to the harbour scale and a module that computes the
different parameters needed for risk assessment. Special emphasis is made on describing the steps followed
for system implementation because such implementation is far from a mere technical problem. The first step
is to identify the main forcing factors for the harbour hydrodynamics from both field data and numerical
experiments, which has never been done before for the Barcelona harbour. Wind and shelf currents are
suggested as the main forcing factors for the harbour circulation. The second step is to identify the
requirements that a numerical model must fulfil in order to properly solve the Barcelona harbour's
hydrodynamics. A high resolution (b50 m) three dimensional model able to prognostically calculate
temperature and salinity evolution; full air–sea coupling is needed as well. The third step is to investigate the
best operational strategy. We have found that small errors in the initial density profiles are acceptable for
surface current forecasts but not for deep circulation. A cold start must be avoided and a 72 h spin-up is
recommended. The minimum wind forcing resolution has been determined to be 1 h. A scaling factor should
be included to account for the energy contribution of the higher frequency processes. Finally, an example of its
application to a real case is presented and the comparison to other harbour environmental management
systems is discussed.