New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 11836 for NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/cfgs – NEMO

Ignore:
Timestamp:
2019-10-30T14:08:43+01:00 (4 years ago)
Author:
acc
Message:

Branch 2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps. Merge remaining trunk changes from 11742 to 11830

Location:
NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/cfgs
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/cfgs

    • Property svn:mergeinfo deleted
  • NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/cfgs/AGRIF_DEMO/EXPREF/namelist_ice_cfg

    r10535 r11836  
    3838&namdyn_rhg     !   Ice rheology 
    3939!------------------------------------------------------------------------------ 
     40      ln_aEVP       = .false.          !     adaptive rheology (Kimmritz et al. 2016 & 2017) 
    4041/ 
    4142!------------------------------------------------------------------------------ 
  • NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/cfgs/AGRIF_DEMO/README.rst

    r11777 r11836  
    1313======== 
    1414 
    15 AGRIF (Adaptive Grid Refinement In Fortran) is a library that allows the seamless space and time refinement over 
    16 rectangular regions in NEMO. 
     15AGRIF (Adaptive Grid Refinement In Fortran) is a library that 
     16allows the seamless space and time refinement over rectangular regions in NEMO. 
    1717Refinement factors can be odd or even (usually lower than 5 to maintain stability). 
    18 Interaction between grid is "two-ways" in the sense that the parent grid feeds the child grid open boundaries and 
    19 the child grid provides volume averages of prognostic variables once a given number of time step is completed. 
     18Interaction between grid is "two-ways" in the sense that 
     19the parent grid feeds the child grid open boundaries and 
     20the child grid provides volume averages of prognostic variables once 
     21a given number of time step is completed. 
    2022These pages provide guidelines how to use AGRIF in NEMO. 
    21 For a more technical description of the library itself, please refer to http://agrif.imag.fr. 
     23For a more technical description of the library itself, please refer to AGRIF_. 
    2224 
    2325Compilation 
     
    2830.. code-block:: sh 
    2931 
    30    ./makenemo add_key 'key_agrif' 
     32   ./makenemo [...] add_key 'key_agrif' 
    3133 
    32 Although this is transparent to users, the way the code is processed during compilation is different from 
    33 the standard case: 
    34 a preprocessing stage (the so called "conv" program) translates the actual code so that 
     34Although this is transparent to users, 
     35the way the code is processed during compilation is different from the standard case: 
     36a preprocessing stage (the so called ``conv`` program) translates the actual code so that 
    3537saved arrays may be switched in memory space from one domain to an other. 
    3638 
     
    3840================================ 
    3941 
    40 An additional text file ``AGRIF_FixedGrids.in`` is required at run time. 
     42An additional text file :file:`AGRIF_FixedGrids.in` is required at run time. 
    4143This is where the grid hierarchy is defined. 
    42 An example of such a file, here taken from the ``ICEDYN`` test case, is given below:: 
     44An example of such a file, here taken from the ``ICEDYN`` test case, is given below 
    4345 
    44    1 
    45    34 63 34 63 3 3 3 
    46    0 
     46.. literalinclude:: ../../../tests/ICE_AGRIF/EXPREF/AGRIF_FixedGrids.in 
    4747 
    4848The first line indicates the number of zooms (1). 
    4949The second line contains the starting and ending indices in both directions on the root grid 
    50 (imin=34 imax=63 jmin=34 jmax=63) followed by the space and time refinement factors (3 3 3). 
     50(``imin=34 imax=63 jmin=34 jmax=63``) followed by the space and time refinement factors (3 3 3). 
    5151The last line is the number of child grid nested in the refined region (0). 
    5252A more complex example with telescoping grids can be found below and 
    53 in the ``AGRIF_DEMO`` reference configuration directory. 
     53in the :file:`AGRIF_DEMO` reference configuration directory. 
    5454 
    55 [Add some plots here with grid staggering and positioning ?] 
     55.. todo:: 
    5656 
    57 When creating the nested domain, one must keep in mind that the child domain is shifted toward north-east and 
    58 depends on the number of ghost cells as illustrated by the (attempted) drawing below for nbghostcells=1 and 
    59 nbghostcells=3. 
    60 The grid refinement is 3 and nxfin is the number of child grid points in i-direction. 
     57   Add some plots here with grid staggering and positioning? 
     58 
     59When creating the nested domain, one must keep in mind that 
     60the child domain is shifted toward north-east and 
     61depends on the number of ghost cells as illustrated by 
     62the *attempted* drawing below for ``nbghostcells=1`` and ``nbghostcells=3``. 
     63The grid refinement is 3 and ``nxfin`` is the number of child grid points in i-direction. 
    6164 
    6265.. image:: _static/agrif_grid_position.jpg 
     
    7174============= 
    7275 
    73 Knowing the refinement factors and area, a ``NESTING`` pre-processing tool may help to create needed input files 
     76Knowing the refinement factors and area, 
     77a ``NESTING`` pre-processing tool may help to create needed input files 
    7478(mesh file, restart, climatological and forcing files). 
    7579The key is to ensure volume matching near the child grid interface, 
    76 a step done by invoking the ``Agrif_create_bathy.exe`` program. 
    77 You may use the namelists provided in the ``NESTING`` directory as a guide. 
     80a step done by invoking the :file:`Agrif_create_bathy.exe` program. 
     81You may use the namelists provided in the :file:`NESTING` directory as a guide. 
    7882These correspond to the namelists used to create ``AGRIF_DEMO`` inputs. 
    7983 
     
    8286 
    8387Each child grid expects to read its own namelist so that different numerical choices can be made 
    84 (these should be stored in the form ``1_namelist_cfg``, ``2_namelist_cfg``, etc... according to their rank in 
    85 the grid hierarchy). 
     88(these should be stored in the form :file:`1_namelist_cfg`, :file:`2_namelist_cfg`, etc... 
     89according to their rank in the grid hierarchy). 
    8690Consistent time steps and number of steps with the chosen time refinement have to be provided. 
    8791Specific to AGRIF is the following block: 
    8892 
    89 .. code-block:: fortran 
    90  
    91    !----------------------------------------------------------------------- 
    92    &namagrif      !  AGRIF zoom                                            ("key_agrif") 
    93    !----------------------------------------------------------------------- 
    94       ln_spc_dyn    = .true.  !  use 0 as special value for dynamics 
    95       rn_sponge_tra = 2880.   !  coefficient for tracer   sponge layer [m2/s] 
    96       rn_sponge_dyn = 2880.   !  coefficient for dynamics sponge layer [m2/s] 
    97       ln_chk_bathy  = .false. !  =T  check the parent bathymetry 
    98    / 
     93.. literalinclude:: ../../namelists/namagrif 
     94   :language: fortran 
    9995 
    10096where sponge layer coefficients have to be chosen according to the child grid mesh size. 
    10197The sponge area is hard coded in NEMO and applies on the following grid points: 
    102 2 x refinement factor (from i=1+nbghostcells+1 to i=1+nbghostcells+sponge_area) 
     982 x refinement factor (from ``i=1+nbghostcells+1`` to ``i=1+nbghostcells+sponge_area``) 
    10399 
    104100.. rubric:: References 
  • NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/cfgs/README.rst

    r11777 r11836  
    2929=========================================================== 
    3030 
    31 To compile the ORCA2_ICE_PISCES_ reference configuration using ``makenemo``, 
     31To compile the ORCA2_ICE_PISCES_ reference configuration using :file:`makenemo`, 
    3232one should use the following, by selecting among available architecture file or 
    3333providing a user defined one: 
  • NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/cfgs/SHARED

    • Property svn:mergeinfo deleted
  • NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/cfgs/SHARED/README.rst

    r11777 r11836  
    1111 
    1212Output of diagnostics in NEMO is usually done using XIOS. 
    13 This is an efficient way of writing diagnostics because the time averaging, file writing and even some simple arithmetic or regridding is carried out in parallel to the NEMO model run. 
     13This is an efficient way of writing diagnostics because 
     14the time averaging, file writing and even some simple arithmetic or regridding is carried out in 
     15parallel to the NEMO model run. 
    1416This page gives a basic introduction to using XIOS with NEMO. 
    15 Much more information is available from the XIOS homepage above and from the NEMO manual. 
     17Much more information is available from the :xios:`XIOS homepage<>` above and from the NEMO manual. 
    1618 
    1719Use of XIOS for diagnostics is activated using the pre-compiler key ``key_iomput``. 
    1820 
    1921Extracting and installing XIOS 
    20 ------------------------------ 
     22============================== 
    2123 
    22241. Install the NetCDF4 library. 
    23    If you want to use single file output you will need to compile the HDF & NetCDF libraries to allow parallel IO. 
    24 2. Download the version of XIOS that you wish to use. The recommended version is now XIOS 2.5: 
     25   If you want to use single file output you will need to compile the HDF & NetCDF libraries to 
     26   allow parallel IO. 
     272. Download the version of XIOS that you wish to use. 
     28   The recommended version is now XIOS 2.5: 
    2529 
    26 .. code-block:: console 
     30   .. code-block:: console 
    2731 
    28    $ svn co http://forge.ipsl.jussieu.fr/ioserver/svn/XIOS/branchs/xios-2.5 xios-2.5 
     32      $ svn co http://forge.ipsl.jussieu.fr/ioserver/svn/XIOS/branchs/xios-2.5 
    2933 
    30 and follow the instructions in `XIOS documentation <http://forge.ipsl.jussieu.fr/ioserver/wiki/documentation>`_ to compile it. 
    31    If you find problems at this stage, support can be found by subscribing to the `XIOS mailing list <http://forge.ipsl.jussieu.fr/mailman/listinfo.cgi/xios-users>`_ and sending a mail message to it. 
     34and follow the instructions in :xios:`XIOS documentation <wiki/documentation>` to compile it. 
     35If you find problems at this stage, support can be found by subscribing to 
     36the :xios:`XIOS mailing list <../mailman/listinfo.cgi/xios-users>` and sending a mail message to it. 
    3237 
    3338XIOS Configuration files 
    3439------------------------ 
    3540 
    36 XIOS is controlled using xml input files that should be copied to your model run directory before running the model. 
    37 Examples of these files can be found in the reference configurations (``cfgs``). The XIOS executable expects to find a file called ``iodef.xml`` in the model run directory. 
    38 In NEMO we have made the decision to use include statements in the ``iodef.xml`` file to include ``field_def_nemo-oce.xml`` (for physics), ``field_def_nemo-ice.xml`` (for ice), ``field_def_nemo-pisces.xml`` (for biogeochemistry) and ``domain_def.xml`` from the /cfgs/SHARED directory. 
    39 Most users will not need to modify ``domain_def.xml`` or ``field_def_nemo-???.xml`` unless they want to add new diagnostics to the NEMO code. 
    40 The definition of the output files is organized into separate ``file_definition.xml`` files which are included in the ``iodef.xml`` file. 
     41XIOS is controlled using XML input files that should be copied to 
     42your model run directory before running the model. 
     43Examples of these files can be found in the reference configurations (:file:`./cfgs`). 
     44The XIOS executable expects to find a file called :file:`iodef.xml` in the model run directory. 
     45In NEMO we have made the decision to use include statements in the :file:`iodef.xml` file to include: 
     46 
     47- :file:`field_def_nemo-oce.xml` (for physics), 
     48- :file:`field_def_nemo-ice.xml` (for ice), 
     49- :file:`field_def_nemo-pisces.xml` (for biogeochemistry) and 
     50- :file:`domain_def.xml` from the :file:`./cfgs/SHARED` directory. 
     51 
     52Most users will not need to modify :file:`domain_def.xml` or :file:`field_def_nemo-???.xml` unless 
     53they want to add new diagnostics to the NEMO code. 
     54The definition of the output files is organized into separate :file:`file_definition.xml` files which 
     55are included in the :file:`iodef.xml` file. 
    4156 
    4257Modes 
    43 ----- 
     58===== 
    4459 
    4560Detached Mode 
     
    4863In detached mode the XIOS executable is executed on separate cores from the NEMO model. 
    4964This is the recommended method for using XIOS for realistic model runs. 
    50 To use this mode set ``using_server`` to ``true`` at the bottom of the ``iodef.xml`` file: 
     65To use this mode set ``using_server`` to ``true`` at the bottom of the :file:`iodef.xml` file: 
    5166 
    5267.. code-block:: xml 
    5368 
    54    <variable id="using_server" type="boolean">true</variable> 
     69   <variable id="using_server" type="boolean">true</variable> 
    5570 
    56 Make sure there is a copy (or link to) your XIOS executable in the working directory and in your job submission script allocate processors to XIOS. 
     71Make sure there is a copy (or link to) your XIOS executable in the working directory and 
     72in your job submission script allocate processors to XIOS. 
    5773 
    5874Attached Mode 
     
    6076 
    6177In attached mode XIOS runs on each of the cores used by NEMO. 
    62 This method is less efficient than the detached mode but can be more convenient for testing or with small configurations. 
    63 To activate this mode simply set ``using_server`` to false in the ``iodef.xml`` file 
     78This method is less efficient than the detached mode but can be more convenient for testing or 
     79with small configurations. 
     80To activate this mode simply set ``using_server`` to false in the :file:`iodef.xml` file 
    6481 
    6582.. code-block:: xml 
    6683 
    67    <variable id="using_server" type="boolean">false</variable> 
     84   <variable id="using_server" type="boolean">false</variable> 
    6885 
    6986and don't allocate any cores to XIOS. 
    70 Note that due to the different domain decompositions between XIOS and NEMO if the total number of cores is larger than the number of grid points in the j direction then the model run will fail. 
     87 
     88.. note:: 
     89 
     90   Due to the different domain decompositions between XIOS and NEMO, 
     91   if the total number of cores is larger than the number of grid points in the ``j`` direction then 
     92   the model run will fail. 
    7193 
    7294Adding new diagnostics 
    73 ---------------------- 
     95====================== 
    7496 
    7597If you want to add a NEMO diagnostic to the NEMO code you will need to do the following: 
    7698 
    77991. Add any necessary code to calculate you new diagnostic in NEMO 
    78 2. Send the field to XIOS using ``CALL iom_put( 'field_id', variable )`` where ``field_id`` is a unique id for your new diagnostics and variable is the fortran variable containing the data. 
    79    This should be called at every model timestep regardless of how often you want to output the field. No time averaging should be done in the model code. 
    80 3. If it is computationally expensive to calculate your new diagnostic you should also use "iom_use" to determine if it is requested in the current model run. For example, 
     1002. Send the field to XIOS using ``CALL iom_put( 'field_id', variable )`` where 
     101   ``field_id`` is a unique id for your new diagnostics and 
     102   variable is the fortran variable containing the data. 
     103   This should be called at every model timestep regardless of how often you want to output the field. 
     104   No time averaging should be done in the model code. 
     1053. If it is computationally expensive to calculate your new diagnostic 
     106   you should also use "iom_use" to determine if it is requested in the current model run. 
     107   For example, 
    81108 
    82 .. code-block:: fortran 
     109   .. code-block:: fortran 
    83110 
    84       IF iom_use('field_id') THEN 
    85          !Some expensive computation 
    86          !... 
    87          !... 
    88          iom_put('field_id', variable) 
    89       ENDIF 
     111      IF iom_use('field_id') THEN 
     112         !Some expensive computation 
     113         !... 
     114         !... 
     115    iom_put('field_id', variable) 
     116      ENDIF 
    90117 
    91 4. Add a variable definition to the ``field_def_nemo-???.xml`` file. 
    92 5. Add the variable to the ``iodef.xml`` or ``file_definition.xml`` file. 
     1184. Add a variable definition to the :file:`field_def_nemo-???.xml` file. 
     1195. Add the variable to the :file:`iodef.xml` or :file:`file_definition.xml` file. 
  • NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/cfgs/SHARED/namelist_ref

    r11777 r11836  
    290290   !                       !   -> file cplmask.nc with the float variable called cplmask (jpi,jpj,nn_cplmodel) 
    291291   nn_cats_cpl   =     5   !  Number of sea ice categories over which coupling is to be carried out (if not 1) 
    292  
    293292   !_____________!__________________________!____________!_____________!______________________!________! 
    294293   !             !        description       !  multiple  !    vector   !       vector         ! vector ! 
     
    327326   sn_rcv_wper   =   'none'                 ,    'no'    ,     ''      ,         ''           ,   '' 
    328327   sn_rcv_wnum   =   'none'                 ,    'no'    ,     ''      ,         ''           ,   '' 
    329    sn_rcv_wstrf  =   'none'                 ,    'no'    ,     ''      ,         ''           ,   '' 
     328   sn_rcv_wfreq  =   'none'                 ,    'no'    ,     ''      ,         ''           ,   '' 
    330329   sn_rcv_wdrag  =   'none'                 ,    'no'    ,     ''      ,         ''           ,   '' 
    331330   sn_rcv_ts_ice =   'none'                 ,    'no'    ,     ''      ,         ''           ,   '' 
Note: See TracChangeset for help on using the changeset viewer.