Ignore:
Timestamp:
2018-11-16T16:16:27+01:00 (3 years ago)
Author:
davestorkey
Message:

UKMO/dev_r9950_old_tidal_mixing: Update to be relative to rev 10321 of NEMO4_beta_mirror branch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/UKMO/dev_r9950_old_tidal_mixing/INSTALL.rst

    r9596 r10324  
    1 Install the modelling framework (NEMO and XIOS) 
     1********************* 
     2Install the framework 
     3********************* 
    24 
    3 Last edition: 2018-02-14 21:32 CET by nicolasmartin 
     5.. contents:: 
     6   :local: 
     7       
     8Dependencies 
     9============ 
    410 
    5     Extract the NEMO code 
    6         Description of NEMOGCM directory tree 
    7     Extract and install XIOS 
    8     Setup your architecture configuration file 
    9     Compile and create NEMO executable 
    10         More options 
    11         Default behaviour 
    12         Tools used during the process 
    13         Examples 
    14     Running the model 
    15     Viewing and changing list of active CPP keys 
     11| The NEMO source code is written in Fortran 95 and part of its dependencies are already included (``./ext``): 
     12  AGRIF preprocessing program "conv", FCM build system and IOIPSL library for outputs. 
     13| And some Perl 5, Fortran compiler (ifort, gfortran, pgfortran, ...), MPI library (Open MPI or MPICH) 
    1614 
    17 Extract the NEMO code 
     15But The following dependencies should be from the official repositories of your Linux distribution but 
     16you will probably have to compile them from source for enabling parallel I/O support. 
    1817 
    19 Using your account registered here ('my_login' with password) 
     18- `HDF5`_   (C library) 
     19- `NetCDF`_ (C and Fortran libraries) 
     20 
     21Extract the source code 
     22======================= 
     23 
     24Download the source code 
     25------------------------ 
    2026 
    2127.. code:: console 
    22 svn --username 'mylogin' co http://forge.ipsl.jussieu.fr/nemo/svn/branches/2015/nemo_v3_6_STABLE/NEMOGCM 
    2328 
    24 Description of NEMOGCM directory tree 
     29   $ svn co http://forge.ipsl.jussieu.fr/nemo/svn/NEMO/releases/release-4.0 
    2530 
    26 The image below shows the directory tree: 
     31Description of directory tree 
     32----------------------------- 
    2733 
    28 simple table: 
    29     ARCH    Compilation option files, with format arch_compiler.fcm, the compiler name has to be provided with –m option 
    30     CONFIG  All configurations and a cpp.fcm file containing the list of CPP keys to each configuration 
    31     EXTERNAL    Package to implement an embedded model (AGRIF) 
    32     NEMO    FORTRAN source codes in several sub-directories 
    33     SETTE    Package to make tests to ensure the reproducibility and restartability of the code after changes 
    34     TOOLS    Useful softwares to different utilities 
     34+-----------+------------------------------------------------------------+ 
     35| Folder    | Purpose                                                    | 
     36+===========+============================================================+ 
     37| ``arch``  | Settings (per architecture-compiler pair)                  | 
     38+-----------+------------------------------------------------------------+ 
     39| ``cfgs``  | :doc:`Reference configurations <configurations>`           | 
     40+-----------+------------------------------------------------------------+ 
     41| ``doc``   | - ``latex``: reference manuals for |OPA|, |SI3| & |TOP|    | 
     42|           | - ``namelists``: k start guide                             | 
     43|           | - ``rst``:   quick start guide                             | 
     44+-----------+------------------------------------------------------------+ 
     45| ``ext``   | Dependencies included (AGRIF, FCM & IOIPSL)                | 
     46+-----------+------------------------------------------------------------+ 
     47| ``mk``    | Building  routines                                         | 
     48+-----------+------------------------------------------------------------+ 
     49| ``src``   | Modelling routines                                         | 
     50|           |                                                            | 
     51|           | - ``ICE``: |SI3| for sea ice                               | 
     52|           | - ``NST``: AGRIF for embedded zooms                        | 
     53|           | - ``OCE``: |OPA| for ocean dynamics                        | 
     54|           | - ``MBG``: |TOP| for tracers                               | 
     55+-----------+------------------------------------------------------------+ 
     56| ``tests`` | :doc:`Test cases <test_cases>` (unsupported)               | 
     57+-----------+------------------------------------------------------------+ 
     58| ``tools`` | :doc:`Utilities <tools>` to [pre|post]process data         | 
     59+-----------+------------------------------------------------------------+ 
    3560 
    3661Extract and install XIOS 
     62======================== 
    3763 
    3864Diagnostic outputs from NEMO are handled by the third party XIOS library. 
     
    4268 
    4369When you compile NEMO you will need to specify the following CPP keys: 
    44  
     70   
    4571    key_iomput 
    4672    key_mpp_mpi (if you want to run with multiple processes and/or use "detached mode" for the IOs system XIOS) 
     
    4874 
    4975Setup your architecture configuration file 
     76========================================== 
    5077 
    5178All compiler options in NEMO are controlled using files in NEMOGCM/ARCH/arch-'my_arch'.fcm where 'my_arch' is the name of the computing architecture. 
     
    5885 
    5986Compile and create NEMO executable 
     87================================== 
    6088 
    6189The main script to compile and create executable is called makenemo and located in the CONFIG directory, it is used to identify the routines you need from the source code, to build the makefile and run it. 
    6290As an example, compile GYRE with 'my_arch' to create a 'MY_GYRE' configuration: 
    6391 
    64    cd NEMOGCM/CONFIG; ./makenemo –m 'my_arch' –r GYRE -n 'MY_GYRE' 
     92.. code-block:: sh 
     93 
     94   ./makenemo –m 'my_arch' –r GYRE -n 'MY_GYRE' 
    6595 
    6696The image below shows the structure and some content of "MY_CONFIG" directory from the launching of the configuration creation (directories and fundamental files created by makenemo). 
    6797 
    68     
     98+------------+----------------------------------------------------+ 
     99| Folder     | Purpose                                            | 
     100+============+====================================================+ 
     101| ``BLD``    |                                                    | 
     102+------------+----------------------------------------------------+ 
     103| ``EXP00``  |                                                    | 
     104+------------+----------------------------------------------------+ 
     105| ``EXPREF`` |                                                    | 
     106+------------+----------------------------------------------------+ 
     107| ``MY_SRC`` |                                                    | 
     108+------------+----------------------------------------------------+ 
     109| ``WORK``   |                                                    | 
     110+------------+----------------------------------------------------+ 
    69111 
    70     WORK 
    71  
    72     
    73  
    74     Folder with the symbolic links to all unpreprocessed routines considered in the configuration 
    75  
    76     BLD 
    77  
    78     
    79  
    80     Compilation folder (executables, headers files, libraries, preprocessed routines, flags, …) 
    81  
    82     EXP00 
    83  
    84     
    85  
    86     Computation folder for running the model (namelists, xml, executables and inputs-outputs) 
    87  
    88     MY_SRC 
    89  
    90     
    91  
    92     Folder intended to contain your customized routines (modified from initial ones or new entire routines) 
     112Folder with the symbolic links to all unpreprocessed routines considered in the configuration 
     113Compilation folder (executables, headers files, libraries, preprocessed routines, flags, …) 
     114Computation folder for running the model (namelists, xml, executables and inputs-outputs) 
     115Folder intended to contain your customised routines (modified from initial ones or new entire routines) 
    93116 
    94117After successful execution of makenemo command, the executable called opa is created in the EXP00 directory (in the example above, the executable is created in CONFIG/MY_GYRE/EXP00). 
    95118More options 
    96119 
    97         echo "Usage      : "${b_n} \ 
    98             " [-h] [-n name] [-m arch] [-d "dir1 dir2"] [-r conf] [-u conf] [-s Path] [-e Path] [-j No] [-v No] [-k 0/1]"; 
    99         echo " -h               : help"; 
    100         echo " -h institute : specific help for consortium members"; 
    101         echo " -n name      : config name, [-n help] to list existing configurations"; 
    102         echo " -m arch      : choose compiler, [-m help] to list existing compilers"; 
    103         echo " -d dir       : choose NEMO sub-directories"; 
    104         echo " -r conf      : choose reference configuration"; 
    105         echo " -u conf      : choose an unsupported (external) configuration"; 
    106         echo " -s Path      : choose alternative location for NEMO main directory"; 
    107         echo " -e Path      : choose alternative location for MY_SRC directory"; 
    108         echo " -j No        : number of processes used to compile (0=nocompilation)"; 
    109         echo " -v No        : set verbosity level for compilation [0-3]"; 
    110         echo " -k 0/1       : used cpp keys check (default = 1 -> check activated)"; 
    111         echo " -t dir       : temporary directory for compilation" 
    112         echo ""; 
     120.. 
     121   .. literalinclude:: 
    113122 
    114123Default behaviour 
     124----------------- 
    115125 
    116126    At the first use, you need the -m option to specify the architecture configuration file (compiler and its options, routines and libraries to include), then for next compilation, it is assumed you will be using the same compiler. 
     
    118128 
    119129Tools used during the process 
     130----------------------------- 
    120131 
    121132    functions.sh : bash functions used by makenemo, for instance to create the WORK directory 
     
    124135 
    125136Examples 
     137-------- 
    126138 
    127139        echo "Example to install a new configuration MY_CONFIG"; 
     
    149161 
    150162Running the model 
     163================= 
    151164 
    152 Once makenemo has run successfully, the opa executable is available in CONFIG/"MY_CONFIG"/EXP00 
    153 For the reference configurations, the EXP00 folder also contains the initial input files (namelists, *xml files for the IOs…). If the configuration also needs NetCDF input files, this should be downloaded here from the corresponding tar file, see Users/Reference Configurations 
     165Once makenemo has run successfully, the opa executable is available in ``CONFIG/MY_CONFIG/EXP00`` 
     166For the reference configurations, the EXP00 folder also contains the initial input files (namelists, \*xml files for the IOs…). If the configuration also needs NetCDF input files, this should be downloaded here from the corresponding tar file, see Users/Reference Configurations 
    154167 
    155168   cd 'MY_CONFIG'/EXP00 
     
    157170 
    158171Viewing and changing list of active CPP keys 
     172============================================ 
    159173 
    160 For a given configuration (here called MY_CONFIG), the list of active CPP keys can be found in 
     174For a given configuration (here called MY_CONFIG), the list of active CPP keys can be found in:: 
    161175 
    162    NEMOGCM/CONFIG/'MYCONFIG'/cpp_'MY_CONFIG'.fcm 
     176   NEMOGCM/CONFIG/'MYCONFIG'/cpp_'MY_CONFIG'.fcm 
    163177 
    164178This text file can be edited to change the list of active CPP keys. Once changed, one needs to recompile opa executable using makenemo command in order for this change to be taken in account. 
     179 
     180.. _HDF5:   http://www.hdfgroup.org/downloads/hdf5 
     181.. _NetCDF: http://www.unidata.ucar.edu/downloads/netcdf 
Note: See TracChangeset for help on using the changeset viewer.