Changeset d720895 in flex_extract.git for Documentation/html/_sources/Installation/local.rst.txt
- Timestamp:
- Dec 19, 2019, 8:12:11 PM (4 years ago)
- Branches:
- master, ctbto, dev
- Children:
- e70c85f
- Parents:
- 76c37a9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Documentation/html/_sources/Installation/local.rst.txt
r30f7911 rd720895 46 46 .. _ref-req-local: 47 47 48 Local environment requirements 49 ============================== 50 51 For the local access modes **member** and **public** there is no difference in 52 the installation process. 48 Local mode - dependencies 49 ========================= 50 51 The installation is the same for the access modes **member** and **public**. 53 52 54 53 The 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:54 and libraries, since the preparation of the extraction and the post-processing is done on the local machine: 56 55 57 56 +------------------------------------------------+-----------------+ … … 72 71 ========================= 73 72 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 withadmin rights.75 The installation was tested on a *Debian GNU/Linux buster /sid* and an *Ubuntu 18.04 Bionic Beaver* system.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 The installation was tested on a *Debian GNU/Linux buster* and an *Ubuntu 18.04 Bionic Beaver* system. 76 75 77 76 .. code-block:: sh 78 77 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 83 84 apt-get install gfortran 84 85 apt-get install fftw3-dev 85 86 apt-get install libeccodes-dev 86 87 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 90 93 pip install cdsapi 91 94 pip install ecmwf-api-client 92 95 93 96 .. note:: 94 97 … … 99 102 .. code-block:: bash 100 103 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 106 The 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 112 Both user groups have to provide keys with their credentials for the Web API's in their home directory. Therefore, follow these instructions: 105 113 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 112 114 ECMWF 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 point1 (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). 114 116 115 117 CDS API: 116 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. 117 118 119 120 119 121 .. _ref-test-local: 120 122 … … 122 124 ====================== 123 125 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. 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. 134 127 135 128 .. code-block:: python … … 147 140 ------------------ 148 141 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. 142 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. 143 150 144 151 145 ECMWF Web API … … 154 148 155 149 +----------------------------------------------------------+----------------------------------------------------------+ 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**: | 157 151 +----------------------------------------------------------+----------------------------------------------------------+ 158 152 |.. code-block:: python |.. code-block:: python | … … 182 176 ^^^^^^^ 183 177 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:178 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 180 Please use this piece of Python code to retrieve a small sample of *ERA5* pressure levels: 187 181 188 182 .. code-block:: python … … 205 199 "download_cdsapi.grib") 206 200 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 202 If you know that your CDS API works, you can try to extract some data from MARS. 203 204 .. **Member-state user** 205 206 Please 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! 214 207 215 208 .. code-block:: python … … 241 234 242 235 **Public user** 243 Please use this piece of python code:236 Please use this piece of Python code: 244 237 245 238 .. code-block:: python … … 277 270 ================== 278 271 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 272 First 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 274 the ``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 279 They can be found at ``flex_extract_vX.X/Source/Fortran``, where 289 280 ``vX.X`` should be substituted with the current version number. 290 281 291 282 .. caution:: 292 283 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. 295 285 296 286 So starting from the root directory of ``flex_extract``, 297 go to the ``Fortran`` source directory and open the `` Makefile`` of your287 go to the ``Fortran`` source directory and open the ``makefile`` of your 298 288 choice to modify with an editor of your choice. We use the ``nedit`` in this case. 299 289 300 290 .. code-block:: bash 301 291 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 295 Edit the paths to the ``eccodes`` library on your local machine. 296 306 297 307 298 .. caution:: … … 318 309 to find out the path to the ``eccodes`` library. 319 310 320 Substitute these paths in the `` Makefile`` for parameters **ECCODES_INCLUDE_DIR**311 Substitute these paths in the ``makefile`` for parameters **ECCODES_INCLUDE_DIR** 321 312 and **ECCODES_LIB** and save it. 322 313 … … 329 320 330 321 The 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. 322 installation process.Therefore the name of the ``makefile`` to be used needs to be given in ``setup.sh``. 333 323 334 324 In the root directory of ``flex_extract``, open the ``setup.sh`` script … … 348 338 # 349 339 TARGET='local' 350 MAKEFILE=' Makefile.local.gfortran'340 MAKEFILE='makefile.local.gfortran' 351 341 ECUID=None 352 342 ECGID=None … … 365 355 $ ./setup.sh 366 356 367 to start the installation. You should see the following output at the command line.357 to start the installation. You should see the following standard output. 368 358 369 359
Note: See TracChangeset
for help on using the changeset viewer.