[5920b7f] | 1 | **************************************** |
---|
[f20342a] | 2 | The Fortran makefile for ``calc_etadot`` |
---|
[5920b7f] | 3 | **************************************** |
---|
[41c9dbc] | 4 | |
---|
| 5 | .. _ref-convert: |
---|
| 6 | |
---|
[f20342a] | 7 | The Fortran program ``calc_etadot`` will be compiled during |
---|
| 8 | the installation process to produce the executable called ``calc_etadot``. |
---|
[0b00607] | 9 | |
---|
[f20342a] | 10 | ``Flex_extract`` includes several ``makefiles`` which can be found in the directory |
---|
| 11 | ``flex_extract_vX.X/Source/Fortran``, where ``vX.X`` should be substituted by the current flex_extract version number. |
---|
| 12 | A list of these ``makefiles`` is shown below: |
---|
[41c9dbc] | 13 | |
---|
| 14 | |
---|
| 15 | | **Remote/Gateway mode**: |
---|
| 16 | | Files to be used as they are! |
---|
| 17 | |
---|
[a9d33f6] | 18 | | **makefile_ecgate**: For use on the ECMWF server **ecgate**. |
---|
| 19 | | **makefile_cray**: For use on the ECMWF servers **cca/ccb**. |
---|
[41c9dbc] | 20 | |
---|
| 21 | | **Local mode** |
---|
[f20342a] | 22 | | It is necessary to adapt **ECCODES_INCLUDE_DIR** and **ECCODES_LIB** if they don't correspond to the standard paths pre-set in the makefiles. |
---|
[41c9dbc] | 23 | |
---|
[f20342a] | 24 | | **makefile_fast**: For use with the gfortran compiler and optimisation mode. |
---|
| 25 | | **makefile_debug**: For use with the gfortran compiler and debugging mode. Primarily for developers. |
---|
[a9d33f6] | 26 | | **makefile_local_gfortran**: Linked to makefile_fast. Default value. |
---|
| 27 | |
---|
| 28 | They can be found at ``flex_extract_vX.X/Source/Fortran/``, where ``vX.X`` should be substituted by the current flex_extract version number. |
---|
| 29 | |
---|
| 30 | .. caution:: |
---|
| 31 | It is necessary to adapt **ECCODES_INCLUDE_DIR** and **ECCODES_LIB** in these |
---|
| 32 | ``makefiles`` if other than standard paths are used. |
---|
| 33 | |
---|
| 34 | Thus, go to the ``Fortran`` source directory and open the ``makefile`` of your |
---|
| 35 | choice, and check / modify with an editor of your choice: |
---|
| 36 | |
---|
| 37 | .. code-block:: bash |
---|
| 38 | |
---|
| 39 | cd flex_extract_vX.X/Source/Fortran |
---|
| 40 | nedit makefile_fast |
---|
| 41 | |
---|
| 42 | Set the paths to the ``eccodes`` library on your local machine, if necessary. |
---|
| 43 | |
---|
| 44 | .. caution:: |
---|
| 45 | This can vary from system to system. |
---|
| 46 | It is suggested to use a command like |
---|
| 47 | |
---|
| 48 | .. code-block:: bash |
---|
| 49 | |
---|
| 50 | # for the ECCODES_INCLUDE_DIR path do: |
---|
| 51 | $ dpkg -L libeccodes-dev | grep eccodes.mod |
---|
| 52 | # for the ECCODES_LIB path do: |
---|
| 53 | $ dpkg -L libeccodes-dev | grep libeccodes.so |
---|
| 54 | |
---|
| 55 | to find out the path to the ``eccodes`` library. |
---|
| 56 | |
---|
| 57 | Assign these paths to the parameters **ECCODES_INCLUDE_DIR** |
---|
| 58 | and **ECCODES_LIB** in the makefile, and save it. |
---|
| 59 | |
---|
| 60 | .. code-block:: bash |
---|
| 61 | |
---|
| 62 | # these are the paths on Debian Buster: |
---|
| 63 | ECCODES_INCLUDE_DIR=/usr/lib/x86_64-linux-gnu/fortran/gfortran-mod-15/ |
---|
| 64 | ECCODES_LIB= -L/usr/lib -leccodes_f90 -leccodes -lm |
---|
| 65 | |
---|
[41c9dbc] | 66 | |
---|
[f20342a] | 67 | If you want to use another compiler than gfortran locally, you can still take ``makefile_fast``, |
---|
| 68 | and adapt everything that is compiler-specific in this file. |
---|
[41c9dbc] | 69 | |
---|
| 70 | |
---|
| 71 | .. toctree:: |
---|
| 72 | :hidden: |
---|
| 73 | :maxdepth: 2 |
---|