Ignore:
Timestamp:
Dec 19, 2019, 8:12:11 PM (4 years ago)
Author:
Anne Philipp <anne.philipp@…>
Branches:
master, ctbto, dev
Children:
e70c85f
Parents:
76c37a9
Message:

updated online docu

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Documentation/html/_sources/Installation/local.rst.txt

    r30f7911 rd720895  
    4646.. _ref-req-local:
    4747 
    48 Local environment requirements
    49 ==============================
    50 
    51 For the local access modes **member** and **public** there is no difference in
    52 the installation process.
     48Local mode - dependencies
     49=========================
     50
     51The installation is the same for the access modes **member** and **public**.
    5352
    5453The environment on your local system has to provide these software packages
    55 and libraries, since all extraction and preparation is done at the local system:
     54and libraries, since the preparation of the extraction and the post-processing is done on the local machine:
    5655
    5756+------------------------------------------------+-----------------+
     
    7271=========================
    7372
    74 The easiest way to install all required packages is to use the package management system of your Linux distribution. To do so, it is necessary to use a user with admin rights.
    75 The installation was tested on a *Debian GNU/Linux buster/sid* and an *Ubuntu 18.04 Bionic Beaver* system.
     73The easiest way to install all required packages is to use the package management system of your Linux distribution  which requires admin rights.
     74The installation was tested on a *Debian GNU/Linux buster* and an *Ubuntu 18.04 Bionic Beaver* system.
    7675
    7776.. code-block:: sh
    7877
    79    # On a Linux Debian or Ubuntu system do
    80    # (if not already available):
    81    apt-get install python3 (usually available on normal Linux systems)
    82    apt-get install pip
     78  # On a Debian or Debian-derived sytem (e. g. Ubuntu) system you may use the following commands (or equivalent commands of your preferred package manager):
     79  # (if not already available):
     80   apt-get install python3 (usually already available on GNU/Linux systems)
     81   apt-get install python3-eccodes
     82   apt-get install python3-genshi
     83   apt-get install python3-numpy
    8384   apt-get install gfortran
    8485   apt-get install fftw3-dev
    8586   apt-get install libeccodes-dev
    8687   apt-get install libemos-dev
    87    apt-get install python3-eccodes
    88    apt-get install genshi
    89    apt-get install numpy
     88  # Some of these packages will pull in further packages as dependencies. This is fine, and some are even needed by ``flex_extract''.
     89 
     90
     91  # As currently the CDS and ECMWF API packages are not available as Debian packages, they need to be installed outside of the Debian (Ubuntu etc.) package management system. The recommended way is:
     92   apt-get install pip
    9093   pip install cdsapi
    9194   pip install ecmwf-api-client
    92 
     95   
    9396.. note::
    9497
     
    99102    .. code-block:: bash
    100103
    101        conda install conda-forge::python-eccodes
    102 
    103 
    104 The CDS API (cdsapi) and the ECMWF Web API (ecmwf-api-client) have both to be installed since ERA5 can only be retrieved with the ``CDS API`` and all other datasets with the ``ECMWF Web API``.     
     104       conda install conda-forge::python-eccodes   
     105   
     106The CDS API (cdsapi) is required for ERA5 data and the ECMWF Web API (ecmwf-api-client) for all other public datasets.   
     107   
     108.. note::
     109
     110    Since **public users** currently don't have access to the full *ERA5* dataset they can skip the installation of the ``CDS API``.
     111
     112Both user groups have to provide keys with their credentials for the Web API's in their home directory. Therefore, follow these instructions:
    105113       
    106 .. note::
    107 
    108     Since **public users** currently don't have access to the full *ERA5* dataset they can skip the installation of the ``CDS API``.
    109    
    110 Both user groups have to provide key's with their credentials for the Web API's in their home directory. Therefore, follow these instructions:
    111    
    112114ECMWF Web API:
    113    Go to `MARS access`_ website and log in with your credentials. Afterwards, on this site in section "Install ECMWF KEY" the key for the ECMWF Web API should be listed. Please follow the instructions in this section under point 1 (save the key in a file `.ecmwfapirc` in your home directory).
     115   Go to `MARS access`_ website and log in with your credentials. Afterwards, on this site in section "Install ECMWF KEY" the key for the ECMWF Web API should be listed. Please follow the instructions in this section under 1 (save the key in a file `.ecmwfapirc` in your home directory).
    114116     
    115117CDS API:
    116118   Go to 'CDS API registration'_ and register there too. Log in at the `cdsapi`_ website and follow the instructions at section "Install the CDS API key" to save your credentials in a `.cdsapirc` file.
    117      
    118 
     119
     120   
    119121.. _ref-test-local:
    120122   
     
    122124======================
    123125
    124 Check the availability of the system packages with ``dpkg -s <package-name> |  grep Status`` or ``rpm -q <package_name>``, depending on your system. For example:
    125 
    126 .. code-block:: sh
    127 
    128    $ dpkg -s libeccodes-dev |  grep Status
    129    # or
    130    $ rpm -q libeccodes-dev
    131  
    132 Afterwards, check the availability of the python packages by typing ``python3`` in
    133 a terminal window and run the ``import`` commands in the python shell. If there are no error messages, you succeeded in setting up the environment.
     126Check the availability of the python packages by typing ``python3`` in a terminal window and run the ``import`` commands in the python shell. If there are no error messages, you succeeded in setting up the environment.
    134127
    135128.. code-block:: python
     
    147140------------------
    148141
    149 You can start very simple test retrievals for both Web API's to be sure that everything works. This is recommended to minimize the range of possible errors using ``flex_extract`` later on.
     142You can start very simple test retrievals for both Web APIs to be sure that everything works. This is recommended to minimise the range of possible errors using ``flex_extract`` later on.
     143
    150144
    151145ECMWF Web API
     
    154148
    155149+----------------------------------------------------------+----------------------------------------------------------+
    156 |Please use this piece of python code for **Member user**: |Please use this piece of python code for **Public user**: |
     150|Please use this piece of Python code for **Member user**: |Please use this piece of Python code for **Public user**: |
    157151+----------------------------------------------------------+----------------------------------------------------------+
    158152|.. code-block:: python                                    |.. code-block:: python                                    |
     
    182176^^^^^^^
    183177
    184 Since ERA5 extraction with CDS API might take some time due to the very high number of requests, you can start by retrieving some online stored pressure levels (not from MARS). This is usually much faster and gives a quick result to find out if the web API works:
    185 
    186 Please use this piece of python code to retrieve a small sample of *ERA5* pressure levels:
     178Extraction of ERA5 data via CDS API might take time as currently there is a high demand for ERA5 data. Therefore, as a simple test for the API just retrieve pressure-level data (even if that is NOT what we need for FLEXPART), as they are stored on disk and don't need to be retrieved from MARS (which is the time-consuming action):
     179
     180Please use this piece of Python code to retrieve a small sample of *ERA5* pressure levels:
    187181
    188182.. code-block:: python
     
    205199    "download_cdsapi.grib")
    206200
    207 
    208 Afterwards, when you know that the CDS API generally works, you can try to extract some
    209 data from the MARS archive. From the latest experience we know that this can take a while.   
    210 
    211 .. **Member user**
    212 
    213 Please use this piece of python code to retrieve a small *ERA5* data sample as a **member user**! The **public user** doesn't have access to the full *ERA5* dataset!
     201   
     202If you know that your CDS API works, you can try to extract some data from MARS.
     203
     204.. **Member-state user**
     205
     206Please use this piece of Python code to retrieve a small *ERA5* data sample as a **member-state user**! The **Public user** do not have access to the full *ERA5* dataset!
    214207
    215208.. code-block:: python
     
    241234   
    242235    **Public user**
    243     Please use this piece of python code:
     236    Please use this piece of Python code:
    244237
    245238    .. code-block:: python
     
    277270==================
    278271
    279 First prepare the Fortran ``Makefile`` for your environment and set it
    280 in the ``setup.sh`` script. (See section :ref:`ref-convert` for information on
    281 the Fortran program.)
    282 ``flex_extract`` has already two ``Makefiles`` prepared for te ``gfortran`` and
    283 the ``ifort`` compiler:
    284 
    285  * Makefile.local.gfortran
    286  * Makefile.local.ifort
    287 
    288 They can be found in the path ``flex_extract_vX.X/source/fortran``, where
     272First prepare the Fortran ``makefile`` for your environment and set it in the ``setup.sh`` script. (See section :ref:`ref-convert` for information on the Fortran program.)
     273``flex_extract`` comes with two ``makefiles`` prepared for the ``gfortran`` and
     274the ``ifort`` compiler. The ``gfortran`` version assumes that ``eccodes`` and ``emoslib`` are installed as distribution packages.
     275
     276 * makefile.local.gfortran
     277 * makefile.local.ifort
     278 
     279They can be found at ``flex_extract_vX.X/Source/Fortran``, where
    289280``vX.X`` should be substituted with the current version number.
    290281
    291282.. caution::   
    292283   It is necessary to adapt **ECCODES_INCLUDE_DIR** and **ECCODES_LIB** in these
    293    ``Makefiles``.
    294 
     284   ``makefiles`` if other than standard paths are used.
    295285
    296286So starting from the root directory of ``flex_extract``,
    297 go to the ``Fortran`` source directory and open the ``Makefile`` of your
     287go to the ``Fortran`` source directory and open the ``makefile`` of your
    298288choice to modify with an editor of your choice. We use the ``nedit`` in this case.
    299289
    300290.. code-block:: bash
    301291
    302    cd flex_extract_vX.X/source/fortran
    303    nedit Makefile.local.gfortran
    304 
    305 Edit the pathes to the ``eccodes`` library on your local machine.
     292   cd flex_extract_vX.X/Source/Fortran
     293   nedit makefile.local.gfortran
     294 
     295Edit the paths to the ``eccodes`` library on your local machine.
     296
    306297
    307298.. caution::
     
    318309   to find out the path to the ``eccodes`` library.
    319310   
    320 Substitute these paths in the ``Makefile`` for parameters **ECCODES_INCLUDE_DIR**
     311Substitute these paths in the ``makefile`` for parameters **ECCODES_INCLUDE_DIR**
    321312and **ECCODES_LIB** and save it.
    322313
     
    329320   
    330321The Fortran program called ``CONVERT2`` will be compiled during the
    331 installation process to get an executable. Therefore the ``Makefile``
    332 has to be set in the ``setup.sh`` script.
     322installation process.Therefore the name of the ``makefile`` to be used needs to be given in  ``setup.sh``.
    333323
    334324In the root directory of ``flex_extract``, open the ``setup.sh`` script
     
    348338   #
    349339   TARGET='local'
    350    MAKEFILE='Makefile.local.gfortran'
     340   MAKEFILE='makefile.local.gfortran'
    351341   ECUID=None
    352342   ECGID=None
     
    365355   $ ./setup.sh
    366356   
    367 to start the installation. You should see the following output at the command line.
     357to start the installation. You should see the following standard output.
    368358   
    369359   
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG