Changeset f61e1df in flex_extract.git for Documentation/html/_sources/Installation/local.rst.txt
- Timestamp:
- Jul 9, 2020, 8:13:25 AM (4 years ago)
- Branches:
- master, ctbto, dev
- Children:
- 82564d8
- Parents:
- 3e13e02 (diff), 6931f61 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Documentation/html/_sources/Installation/local.rst.txt
rb1674ed r6931f61 11 11 12 12 13 .. _Python 3: https://docs.python.org/3/ 14 .. _Python3: https://www.python.org/downloads/ 15 .. _Anaconda Python3: https://www.anaconda.com/distribution/#download-section 16 13 .. _Python3: https://www.python.org/ 14 .. _Anaconda Python3: https://www.anaconda.com/distribution/ 17 15 .. _numpy: http://www.numpy.org/ 18 16 .. _ecmwf-api-client: https://confluence.ecmwf.int/display/WEBAPI/ECMWF+Web+API+Home 19 17 .. _cdsapi: https://cds.climate.copernicus.eu/api-how-to 20 18 .. _genshi: https://genshi.edgewall.org/ 21 .. _eccodes for python: https://p ackages.debian.org/sid/python3-eccodes22 .. _eccodes for conda: https://anaconda.org/conda-forge/ eccodes19 .. _eccodes for python: https://pypi.org/project/eccodes/ 20 .. _eccodes for conda: https://anaconda.org/conda-forge/python-eccodes 23 21 .. _gfortran: https://gcc.gnu.org/wiki/GFortran 24 22 .. _fftw3: http://www.fftw.org … … 30 28 .. _ECMWF ectrans site: https://confluence.ecmwf.int/display/ECAC/Unattended+file+transfer+-+ectrans 31 29 .. _ECaccess Presentation: https://confluence.ecmwf.int/download/attachments/45759146/ECaccess.pdf 32 .. _ECMWF 's instructions on gateway server: https://confluence.ecmwf.int/display/ECAC/ECaccess+Home30 .. _ECMWF instructions on gateway servers: https://confluence.ecmwf.int/display/ECAC/ECaccess+Home 33 31 .. _Computing Representative: https://www.ecmwf.int/en/about/contact-us/computing-representatives 34 32 .. _MARS access: https://confluence.ecmwf.int//display/WEBAPI/Access+MARS 35 36 33 .. _download section: https://www.flexpart.eu/downloads 37 34 38 39 40 41 35 42 36 .. _ref-local-mode: 43 44 45 37 46 38 .. _ref-req-local: … … 51 43 The installation is the same for the access modes **member** and **public**. 52 44 53 The environment on your local system has to provide the sesoftware packages45 The environment on your local system has to provide the following software packages 54 46 and libraries, since the preparation of the extraction and the post-processing is done on the local machine: 55 47 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 +------------------------------------------------+---------------- -+48 +------------------------------------------------+----------------+ 49 | Python code | Fortran code | 50 +------------------------------------------------+----------------+ 51 | * `Python3`_ | * `gfortran`_ | 52 | * `numpy`_ | * `fftw3`_ | 53 | * `genshi`_ | * `eccodes`_ | 54 | * `eccodes for python`_ | * `emoslib`_ | 55 | * `ecmwf-api-client`_ (everything except ERA5) | | 56 | * `cdsapi`_ (just for ERA5 and member user) | | 57 +------------------------------------------------+----------------+ 66 58 67 59 68 60 .. _ref-prep-local: 69 61 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 62 Preparing the local environment 63 =============================== 64 65 The easiest way to install all required packages is to use the package management system of your Linux distribution which requires admin rights. 74 66 The installation was tested on a *Debian GNU/Linux buster* and an *Ubuntu 18.04 Bionic Beaver* system. 75 67 76 68 .. code-block:: sh 77 69 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): 70 # On a Debian or Debian-derived (e. g. Ubuntu) system, 71 # you may use the following commands (or equivalent commands of your preferred package manager): 72 # (if respective packages are not already available): 80 73 apt-get install python3 (usually already available on GNU/Linux systems) 81 74 apt-get install python3-eccodes … … 86 79 apt-get install libeccodes-dev 87 80 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: 81 # Some of these packages will pull in further packages as dependencies. 82 # This is fine, and some are even needed by ``flex_extract''. 83 84 # As currently the CDS and ECMWF API packages are not available as Debian packages, 85 # they need to be installed outside of the Debian (Ubuntu etc.) package management system. 86 # The recommended way is: 92 87 apt-get install pip 93 88 pip install cdsapi … … 96 91 .. note:: 97 92 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:93 If you are using Anaconda Python, we recommend to follow the installation instructions of 94 `Anaconda Python Installation for Linux <https://docs.anaconda.com/anaconda/install/linux/>`_ 95 and then install the ``eccodes`` package from ``conda`` with: 101 96 102 97 .. code-block:: bash … … 104 99 conda install conda-forge::python-eccodes 105 100 106 The CDS API ( cdsapi) is required for ERA5 data and the ECMWF Web API (ecmwf-api-client) for all other public datasets.101 The CDS API (``cdsapi``) is required for ERA5 data and the ECMWF Web API (ecmwf-api-client) for all other public datasets. 107 102 108 103 .. note:: 109 104 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:105 Since **public users** currently don't have access to the full *ERA5* dataset, they can skip the installation of the CDS API. 106 107 Both user groups have to provide keys with their credentials for the Web APIs in their home directory, following these instructions: 113 108 114 109 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).110 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 111 117 112 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.113 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 114 120 115 121 116 .. _ref-test-local: 122 117 123 Test local environment124 ====================== 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.118 Testing the local environment 119 ============================= 120 121 Check the availability of the python packages by typing ``python3`` in a terminal window and run the ``import`` commands in the python shell: 127 122 128 123 .. code-block:: python … … 135 130 import ecmwfapi 136 131 137 138 139 Test the Web API's 140 ------------------ 132 If there are no error messages, you succeeded in setting up the environment. 133 134 135 Testing the Web APIs 136 -------------------- 141 137 142 138 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 144 149 145 +----------------------------------------------------------+----------------------------------------------------------+ 150 |Please use this piece of Python code for **Member user**: |Please use this piece of Python code for**Public user**: |146 |Please use this Python code snippet as a **Member user**: |Please use this Python code snippet as a **Public user**: | 151 147 +----------------------------------------------------------+----------------------------------------------------------+ 152 148 |.. code-block:: python |.. code-block:: python | … … 178 174 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 175 180 Please use th is piece of Python code to retrieve a small sample of *ERA5* pressure levels:176 Please use the following Python code snippet to retrieve a small sample of *ERA5* pressure level data: 181 177 182 178 .. code-block:: python … … 204 200 .. **Member-state user** 205 201 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!202 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 203 208 204 .. code-block:: python … … 262 258 263 259 264 265 260 .. _ref-install-local: 266 261 … … 268 263 ================== 269 264 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. 265 266 The Fortran program called ``calc_etadot`` will be compiled during the 267 installation process. A suitable makefile (``makefile_local_gfortran``) for the compilation is set by default. 268 This may be overwritten by the ``MAKEFILE`` parameter in ``setup.sh``. 269 270 However, you may have to adapt the makefile for your environment (the current default makefile works on Debian stretch and similar GNU/Linux distributions). If you use a new name for it, you will have to insert it into ``setup.sh`` 271 For details on the makefile and how to adapt them, see :ref:`Fortran Makefile <ref-convert>`. 272 272 273 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.274 275 .. caution::276 It is necessary to adapt **ECCODES_INCLUDE_DIR** and **ECCODES_LIB** in these277 ``makefiles`` if other than standard paths are used.278 279 So starting from the root directory of ``flex_extract``,280 go to the ``Fortran`` source directory and open the ``makefile`` of your281 choice to modify with an editor of your choice. We use the ``nedit`` in this case.282 283 .. code-block:: bash284 285 cd flex_extract_vX.X/Source/Fortran286 nedit makefile_fast287 288 Edit the paths to the ``eccodes`` library on your local machine.289 290 291 .. caution::292 This can vary from system to system.293 It is suggested to use a command like294 295 .. code-block:: bash296 297 # for the ECCODES_INCLUDE_DIR path do:298 $ dpkg -L libeccodes-dev | grep eccodes.mod299 # for the ECCODES_LIB path do:300 $ dpkg -L libeccodes-dev | grep libeccodes.so301 302 to find out the path to the ``eccodes`` library.303 304 Substitute these paths in the ``makefile`` for parameters **ECCODES_INCLUDE_DIR**305 and **ECCODES_LIB** and save it.306 307 .. code-block:: bash308 309 # these are the paths on a current Debian 10 Testing system (May 2019)310 ECCODES_INCLUDE_DIR=/usr/lib/x86_64-linux-gnu/fortran/gfortran-mod-15/311 ECCODES_LIB= -L/usr/lib -leccodes_f90 -leccodes -lm312 313 314 The Fortran program called ``calc_etadot`` will be compiled during the315 installation process.Therefore the name of the ``makefile`` to be used needs to be given in ``setup.sh``.316 317 274 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.275 with an editor and adapt the installation parameters in the section labelled with 276 "AVAILABLE COMMANDLINE ARGUMENTS TO SET" as shown below: 320 277 321 278 … … 331 288 # 332 289 TARGET='local' 333 MAKEFILE= 'makefile_fast'290 MAKEFILE=<name_of_your_makefile> 334 291 ECUID=None 335 292 ECGID=None … … 337 294 DESTINATION=None 338 295 INSTALLDIR=None 339 JOB_TEMPLATE=' job.template'296 JOB_TEMPLATE='' 340 297 CONTROLFILE='CONTROL_EA5' 341 298 ... … … 358 315 Install flex_extract_v7.1 software at local in directory <path-to-flex_extract>/flex_extract_v7.1 359 316 360 Using makefile: makefile_ fast317 Using makefile: makefile_local_gfortran 361 318 gfortran -O3 -march=native -Bstatic -leccodes_f90 -leccodes -Bdynamic -lm -ljasper -lemosR64 -I. -I/usr/local/include -fdefault-real-8 -fopenmp -fconvert=big-endian -c ./rwgrib2.f90 362 319 gfortran -O3 -march=native -Bstatic -leccodes_f90 -leccodes -Bdynamic -lm -ljasper -lemosR64 -I. -I/usr/local/include -fdefault-real-8 -fopenmp -fconvert=big-endian -c ./phgrreal.f90
Note: See TracChangeset
for help on using the changeset viewer.