Changeset f20342a in flex_extract.git for For_developers/Sphinx/source/Installation/local.rst
- Timestamp:
- May 27, 2020, 8:01:54 PM (4 years ago)
- Branches:
- master, ctbto, dev
- Children:
- 550435b
- Parents:
- a14839a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
For_developers/Sphinx/source/Installation/local.rst
rb1674ed rf20342a 51 51 The installation is the same for the access modes **member** and **public**. 52 52 53 The environment on your local system has to provide the sesoftware packages53 The environment on your local system has to provide the following software packages 54 54 and libraries, since the preparation of the extraction and the post-processing is done on the local machine: 55 55 56 +------------------------------------------------ +-----------------+57 | Python part | Fortran part |58 +------------------------------------------------ +-----------------+59 | * `Python3`_ | * `gfortran`_|60 | * `numpy`_ | * `fftw3`_|61 | * `genshi`_ | * `eccodes`_|62 | * `eccodes for python`_ | * `emoslib`_|63 | *`ecmwf-api-client`_ (everything except ERA5) | |64 | *`cdsapi`_ (just for ERA5 and member user) | |65 +------------------------------------------------ +-----------------+56 +-------------------------------------------------+-----------------+ 57 | Python part | Fortran part | 58 +-------------------------------------------------+-----------------+ 59 | 1. `Python3`_ | 1. `gfortran`_ | 60 | 2. `numpy`_ | 2. `fftw3`_ | 61 | 3. `genshi`_ | 3. `eccodes`_ | 62 | 4. `eccodes for python`_ | 4. `emoslib`_ | 63 | 5. `ecmwf-api-client`_ (everything except ERA5) | | 64 | 6. `cdsapi`_ (just for ERA5 and member user) | | 65 +-------------------------------------------------+-----------------+ 66 66 67 67 68 68 .. _ref-prep-local: 69 69 70 Prepar e local environment71 ========================= 72 73 The easiest way to install all required packages is to use the package management system of your Linux distribution 70 Preparing the local environment 71 =============================== 72 73 The easiest way to install all required packages is to use the package management system of your Linux distribution which requires admin rights. 74 74 The installation was tested on a *Debian GNU/Linux buster* and an *Ubuntu 18.04 Bionic Beaver* system. 75 75 76 76 .. code-block:: sh 77 77 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): 78 # On a Debian or Debian-derived (e. g. Ubuntu) system, 79 # you may use the following commands (or equivalent commands of your preferred package manager): 80 # (if respective packages are not already available): 80 81 apt-get install python3 (usually already available on GNU/Linux systems) 81 82 apt-get install python3-eccodes … … 86 87 apt-get install libeccodes-dev 87 88 apt-get install libemos-dev 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: 89 # Some of these packages will pull in further packages as dependencies. 90 # This is fine, and some are even needed by ``flex_extract''. 91 92 # As currently the CDS and ECMWF API packages are not available as Debian packages, 93 # they need to be installed outside of the Debian (Ubuntu etc.) package management system. 94 # The recommended way is: 92 95 apt-get install pip 93 96 pip install cdsapi … … 96 99 .. note:: 97 100 98 I n case you would like to use Anaconda Python we recommend youfollow the installation instructions of99 `Anaconda Python Installation for Linux <https://docs.anaconda.com/anaconda/install/linux/>`_ and then install the100 ``eccodes`` package from ``conda`` with:101 If you are using Anaconda Python, we recommend to follow the installation instructions of 102 `Anaconda Python Installation for Linux <https://docs.anaconda.com/anaconda/install/linux/>`_ 103 and then install the ``eccodes`` package from ``conda`` with: 101 104 102 105 .. code-block:: bash … … 104 107 conda install conda-forge::python-eccodes 105 108 106 The CDS API ( cdsapi) is required for ERA5 data and the ECMWF Web API (ecmwf-api-client) for all other public datasets.109 The CDS API (``cdsapi``) is required for ERA5 data and the ECMWF Web API (ecmwf-api-client) for all other public datasets. 107 110 108 111 .. note:: 109 112 110 Since **public users** currently don't have access to the full *ERA5* dataset they can skip the installation of the ``CDS API``.111 112 Both user groups have to provide keys with their credentials for the Web API 's in their home directory. Therefore, followthese instructions:113 Since **public users** currently don't have access to the full *ERA5* dataset, they can skip the installation of the CDS API. 114 115 Both user groups have to provide keys with their credentials for the Web APIs in their home directory, following these instructions: 113 116 114 117 ECMWF Web API: 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).118 Go to the `MARS access`_ website and log in with your credentials. Afterwards, go to the section "Install ECMWF KEY", where 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). 116 119 117 120 CDS API: 118 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.121 Go to `CDS API registration`_ and register there, too. Log in on the `cdsapi`_ website and follow the instructions in the section "Install the CDS API key" to save your credentials in file ``.cdsapirc``. 119 122 120 123 121 124 .. _ref-test-local: 122 125 123 Test local environment 124 ====================== 125 126 Check 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. 127 126 Testing the local environment 127 ============================= 128 129 Check the availability of the python packages by typing ``python3`` in a terminal window and run the ``import`` commands in the python shell: 128 130 .. code-block:: python 129 131 … … 135 137 import ecmwfapi 136 138 137 138 139 Test the Web API's 140 ------------------ 139 If there are no error messages, you succeeded in setting up the environment. 140 141 142 Testing the Web APIs 143 -------------------- 141 144 142 145 You 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. … … 148 151 149 152 +----------------------------------------------------------+----------------------------------------------------------+ 150 |Please use this piece of Python code for **Member user**: |Please use this piece of Python code for**Public user**: |153 |Please use this Python code snippet as a **Member user**: |Please use this Python code snippet as a **Public user**: | 151 154 +----------------------------------------------------------+----------------------------------------------------------+ 152 155 |.. code-block:: python |.. code-block:: python | … … 178 181 Extraction 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 182 180 Please use th is piece of Python code to retrieve a small sample of *ERA5* pressure levels:183 Please use the following Python code snippet to retrieve a small sample of *ERA5* pressure level data: 181 184 182 185 .. code-block:: python … … 204 207 .. **Member-state user** 205 208 206 Please use th is piece of Python codeto retrieve a small *ERA5* data sample as a **member-state user**! The **Public user** do not have access to the full *ERA5* dataset!209 Please use the following Python code snippet to retrieve a small *ERA5* data sample as a **member-state user**! The **Public user** do not have access to the full *ERA5* dataset! 207 210 208 211 .. code-block:: python … … 268 271 ================== 269 272 270 First prepare the Fortran ``makefile`` for your environment and set it in the ``setup.sh`` script. (See section :ref:`Fortran Makefile <ref-convert>` for more information.) 271 ``flex_extract`` comes with two ``makefiles`` prepared for the ``gfortran`` compiler. One for the normal use ``makefile_fast`` and one for debugging ``makefile_debug`` which is usually only resonable for developers. 272 273 They assume that ``eccodes`` and ``emoslib`` are installed as distribution packages and can be found at ``flex_extract_vX.X/Source/Fortran``, where ``vX.X`` should be substituted with the current version number. 273 First, adapt the Fortran ``makefile`` for your environment (if necessary) and insert it into ``setup.sh`` script (see :ref:`Fortran Makefile <ref-convert>` for more information). 274 They can be found at ``flex_extract_vX.X/Source/Fortran/``, where ``vX.X`` should be substituted by the current flex_extract version number. 274 275 275 276 .. caution:: … … 277 278 ``makefiles`` if other than standard paths are used. 278 279 279 So starting from the root directory of ``flex_extract``, 280 go to the ``Fortran`` source directory and open the ``makefile`` of your 281 choice to modify with an editor of your choice. We use the ``nedit`` in this case. 280 Thus, go to the ``Fortran`` source directory and open the ``makefile`` of your 281 choice, and check / modify with an editor of your choice: 282 282 283 283 .. code-block:: bash … … 286 286 nedit makefile_fast 287 287 288 Edit the paths to the ``eccodes`` library on your local machine. 289 288 Set the paths to the ``eccodes`` library on your local machine, if necessary. 290 289 291 290 .. caution:: … … 302 301 to find out the path to the ``eccodes`` library. 303 302 304 Substitute these paths in the ``makefile`` forparameters **ECCODES_INCLUDE_DIR**305 and **ECCODES_LIB** and save it.303 Assign these paths to the parameters **ECCODES_INCLUDE_DIR** 304 and **ECCODES_LIB** in the makefile, and save it. 306 305 307 306 .. code-block:: bash 308 307 309 # these are the paths on a current Debian 10 Testing system (May 2019)308 # these are the paths on Debian Buster: 310 309 ECCODES_INCLUDE_DIR=/usr/lib/x86_64-linux-gnu/fortran/gfortran-mod-15/ 311 310 ECCODES_LIB= -L/usr/lib -leccodes_f90 -leccodes -lm … … 313 312 314 313 The Fortran program called ``calc_etadot`` will be compiled during the 315 installation process. Thereforethe name of the ``makefile`` to be used needs to be given in ``setup.sh``.314 installation process. Therefore, the name of the ``makefile`` to be used needs to be given in ``setup.sh``. 316 315 317 316 In the root directory of ``flex_extract``, open the ``setup.sh`` script 318 and adapt the installation parameters in the section labelled with319 "AVAILABLE COMMANDLINE ARGUMENTS TO SET" like shown below.317 with an editor and adapt the installation parameters in the section labelled with 318 "AVAILABLE COMMANDLINE ARGUMENTS TO SET" as shown below: 320 319 321 320
Note: See TracChangeset
for help on using the changeset viewer.