[41c9dbc] | 1 | ********************************** |
---|
| 2 | The Fortran Program - ``CONVERT2`` |
---|
| 3 | ********************************** |
---|
| 4 | |
---|
| 5 | .. _ref-convert: |
---|
| 6 | |
---|
| 7 | One of ``flex_extract``'s components is a Fortran program called ``CONVERT2``. |
---|
| 8 | This will be compiled during the installation process to get an executable. ``flex_extract`` |
---|
| 9 | has 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 | |
---|
| 30 | They 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 | |
---|
| 33 | So starting from the root directory of ``flex_extract``, |
---|
| 34 | go to the ``Fortran`` source directory and open the ``Makefile`` of your |
---|
| 35 | choice to modify with an editor of your choice. We use the ``nedit`` in this case. |
---|
| 36 | So 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 | |
---|
| 44 | Edit 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 | |
---|
| 59 | Substitute these paths in the ``Makefile`` for parameters **ECCODES_INCLUDE_DIR** |
---|
| 60 | and **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 |
---|