source: flex_extract.git/for_developers/Sphinx/source/Documentation/Input/fortran_makefile.rst @ 41c9dbc

ctbtodev
Last change on this file since 41c9dbc was 41c9dbc, checked in by Anne Philipp <anne.philipp@…>, 5 years ago

Large update of Sphinx doc; moved Sphinx source to dev dir; Cleaned control files

  • Property mode set to 100644
File size: 2.1 KB
RevLine 
[41c9dbc]1**********************************
2The Fortran Program - ``CONVERT2``
3**********************************
4
5.. _ref-convert:
6
7One of ``flex_extract``'s components is a Fortran program called ``CONVERT2``.
8This will be compiled during the installation process to get an executable. ``flex_extract`` 
9has a couple of makefiles prepared which are listed in the following.
10
11
12| **Remote/Gateway mode**:
13| Files to be used as they are!
14   
15    | **Makefile.gfortran**
16    | For the use on ECMWF's server **ecgate**.
17
18    | **Makefile.CRAY**
19    | For the use on ECMWF's server **cca/ccb**.
20   
21| **Local mode**
22| It is necessary to adapt **ECCODES_INCLUDE_DIR** and **ECCODES_LIB**
23 
24    | **Makefile.local.gfortran**
25    | For the use with gfortran compiler.
26
27    | **Makefile.local.ifort**
28    | For the use with ifort compiler.
29
30They can be found in the path ``flex_extract_vX.X/source/fortran``, where
31``vX.X`` should be substituted with the current version number.
32
33So starting from the root directory of ``flex_extract``,
34go to the ``Fortran`` source directory and open the ``Makefile`` of your
35choice to modify with an editor of your choice. We use the ``nedit`` in this case.
36So far, we tested ``flex_extract`` with a ``gfortran`` and an ``ifort`` compiler. 
37
38.. code-block:: bash
39
40   $ cd flex_extract_vX.X/source/fortran
41   $ nedit Makefile.local.gfortran
42
43
44Edit the pathes to the ``eccodes`` library on your local machine.
45
46.. caution::
47   This can vary from system to system.
48   It is suggested to use a command like
49
50   .. code-block:: bash
51
52      # for the ECCODES_INCLUDE_DIR path do:
53      $ dpkg -L libeccodes-dev | grep eccodes.mod
54      # for the ECCODES_LIB path do:
55      $ dpkg -L libeccodes-dev | grep libeccodes.so
56     
57   to find out the path to the ``eccodes`` library.
58   
59Substitute these paths in the ``Makefile`` for parameters **ECCODES_INCLUDE_DIR**
60and **ECCODES_LIB** and save it.
61
62.. code-block:: bash
63
64   # these are the paths on a current Debian Testing system (May 2019)
65   ECCODES_INCLUDE_DIR=/usr/lib/x86_64-linux-gnu/fortran/gfortran-mod-15/
66   ECCODES_LIB= -L/usr/lib -leccodes_f90 -leccodes -lm 
67   
68   
69.. toctree::
70    :hidden:
71    :maxdepth: 2
Note: See TracBrowser for help on using the repository browser.
hosted by ZAMG