13.07.2015 Views

Advanced Ocean Modelling: Using Open-Source Software

Advanced Ocean Modelling: Using Open-Source Software

Advanced Ocean Modelling: Using Open-Source Software

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

6 1 Introduction1.3.2 Modular <strong>Source</strong> CodesFORTRAN source codes of this book consist of several text files, a main programplus separate so-called modules. Most exercises of this book use two separate modulefiles. One module contains hereby global declarations, the other one all subroutinesand functions. Figure 1.2 displays these components and how they are linkedwith each other.Fig. 1.2 Code structure and associated file namesThe compiling of a multiple file FORTRAN code consists of two steps. Themodules are first compiled with:g95 -c file2.f95 file3.f95Then, the module files can be linked with the main code via:g95 -o run.exe file1.f95 file2.o file3.owhere the “-o” allows for specification of a name of the executable program, called“run.exe” in this example. The code can then be executed by entering “run.exe” inthe Command Prompt window. The above example is for Microsoft Windows operationsystems. Executable files carry a different file extension for other operationsystems.1.4 Visualisation with SciLab1.4.1 Writing SciLab ScriptsThe open-source SciLab software suite is used for visualisation of results. SciLab isavailable from:

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!