- Timestamp:
- 2019-10-30T14:08:43+01:00 (5 years ago)
- 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 38 38 &namdyn_rhg ! Ice rheology 39 39 !------------------------------------------------------------------------------ 40 ln_aEVP = .false. ! adaptive rheology (Kimmritz et al. 2016 & 2017) 40 41 / 41 42 !------------------------------------------------------------------------------ -
NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/cfgs/AGRIF_DEMO/README.rst
r11777 r11836 13 13 ======== 14 14 15 AGRIF (Adaptive Grid Refinement In Fortran) is a library that allows the seamless space and time refinement over16 rectangular regions in NEMO.15 AGRIF (Adaptive Grid Refinement In Fortran) is a library that 16 allows the seamless space and time refinement over rectangular regions in NEMO. 17 17 Refinement 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. 18 Interaction between grid is "two-ways" in the sense that 19 the parent grid feeds the child grid open boundaries and 20 the child grid provides volume averages of prognostic variables once 21 a given number of time step is completed. 20 22 These 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.23 For a more technical description of the library itself, please refer to AGRIF_. 22 24 23 25 Compilation … … 28 30 .. code-block:: sh 29 31 30 ./makenemoadd_key 'key_agrif'32 ./makenemo [...] add_key 'key_agrif' 31 33 32 Although this is transparent to users, the way the code is processed during compilation is different from33 the standard case:34 a preprocessing stage (the so called "conv"program) translates the actual code so that34 Although this is transparent to users, 35 the way the code is processed during compilation is different from the standard case: 36 a preprocessing stage (the so called ``conv`` program) translates the actual code so that 35 37 saved arrays may be switched in memory space from one domain to an other. 36 38 … … 38 40 ================================ 39 41 40 An additional text file ``AGRIF_FixedGrids.in`` is required at run time.42 An additional text file :file:`AGRIF_FixedGrids.in` is required at run time. 41 43 This is where the grid hierarchy is defined. 42 An example of such a file, here taken from the ``ICEDYN`` test case, is given below ::44 An example of such a file, here taken from the ``ICEDYN`` test case, is given below 43 45 44 1 45 34 63 34 63 3 3 3 46 0 46 .. literalinclude:: ../../../tests/ICE_AGRIF/EXPREF/AGRIF_FixedGrids.in 47 47 48 48 The first line indicates the number of zooms (1). 49 49 The 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). 51 51 The last line is the number of child grid nested in the refined region (0). 52 52 A more complex example with telescoping grids can be found below and 53 in the ``AGRIF_DEMO`` reference configuration directory.53 in the :file:`AGRIF_DEMO` reference configuration directory. 54 54 55 [Add some plots here with grid staggering and positioning ?] 55 .. todo:: 56 56 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 59 When creating the nested domain, one must keep in mind that 60 the child domain is shifted toward north-east and 61 depends on the number of ghost cells as illustrated by 62 the *attempted* drawing below for ``nbghostcells=1`` and ``nbghostcells=3``. 63 The grid refinement is 3 and ``nxfin`` is the number of child grid points in i-direction. 61 64 62 65 .. image:: _static/agrif_grid_position.jpg … … 71 74 ============= 72 75 73 Knowing the refinement factors and area, a ``NESTING`` pre-processing tool may help to create needed input files 76 Knowing the refinement factors and area, 77 a ``NESTING`` pre-processing tool may help to create needed input files 74 78 (mesh file, restart, climatological and forcing files). 75 79 The 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.80 a step done by invoking the :file:`Agrif_create_bathy.exe` program. 81 You may use the namelists provided in the :file:`NESTING` directory as a guide. 78 82 These correspond to the namelists used to create ``AGRIF_DEMO`` inputs. 79 83 … … 82 86 83 87 Each 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 in85 the grid hierarchy).88 (these should be stored in the form :file:`1_namelist_cfg`, :file:`2_namelist_cfg`, etc... 89 according to their rank in the grid hierarchy). 86 90 Consistent time steps and number of steps with the chosen time refinement have to be provided. 87 91 Specific to AGRIF is the following block: 88 92 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 99 95 100 96 where sponge layer coefficients have to be chosen according to the child grid mesh size. 101 97 The 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)98 2 x refinement factor (from ``i=1+nbghostcells+1`` to ``i=1+nbghostcells+sponge_area``) 103 99 104 100 .. rubric:: References -
NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/cfgs/README.rst
r11777 r11836 29 29 =========================================================== 30 30 31 To compile the ORCA2_ICE_PISCES_ reference configuration using ``makenemo``,31 To compile the ORCA2_ICE_PISCES_ reference configuration using :file:`makenemo`, 32 32 one should use the following, by selecting among available architecture file or 33 33 providing 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 11 11 12 12 Output 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. 13 This is an efficient way of writing diagnostics because 14 the time averaging, file writing and even some simple arithmetic or regridding is carried out in 15 parallel to the NEMO model run. 14 16 This page gives a basic introduction to using XIOS with NEMO. 15 Much more information is available from the XIOS homepageabove and from the NEMO manual.17 Much more information is available from the :xios:`XIOS homepage<>` above and from the NEMO manual. 16 18 17 19 Use of XIOS for diagnostics is activated using the pre-compiler key ``key_iomput``. 18 20 19 21 Extracting and installing XIOS 20 ------------------------------ 22 ============================== 21 23 22 24 1. 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. 27 2. Download the version of XIOS that you wish to use. 28 The recommended version is now XIOS 2.5: 25 29 26 .. code-block:: console30 .. code-block:: console 27 31 28 $ svn co http://forge.ipsl.jussieu.fr/ioserver/svn/XIOS/branchs/xios-2.5xios-2.532 $ svn co http://forge.ipsl.jussieu.fr/ioserver/svn/XIOS/branchs/xios-2.5 29 33 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. 34 and follow the instructions in :xios:`XIOS documentation <wiki/documentation>` to compile it. 35 If you find problems at this stage, support can be found by subscribing to 36 the :xios:`XIOS mailing list <../mailman/listinfo.cgi/xios-users>` and sending a mail message to it. 32 37 33 38 XIOS Configuration files 34 39 ------------------------ 35 40 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. 41 XIOS is controlled using XML input files that should be copied to 42 your model run directory before running the model. 43 Examples of these files can be found in the reference configurations (:file:`./cfgs`). 44 The XIOS executable expects to find a file called :file:`iodef.xml` in the model run directory. 45 In 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 52 Most users will not need to modify :file:`domain_def.xml` or :file:`field_def_nemo-???.xml` unless 53 they want to add new diagnostics to the NEMO code. 54 The definition of the output files is organized into separate :file:`file_definition.xml` files which 55 are included in the :file:`iodef.xml` file. 41 56 42 57 Modes 43 ----- 58 ===== 44 59 45 60 Detached Mode … … 48 63 In detached mode the XIOS executable is executed on separate cores from the NEMO model. 49 64 This 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:65 To use this mode set ``using_server`` to ``true`` at the bottom of the :file:`iodef.xml` file: 51 66 52 67 .. code-block:: xml 53 68 54 69 <variable id="using_server" type="boolean">true</variable> 55 70 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. 71 Make sure there is a copy (or link to) your XIOS executable in the working directory and 72 in your job submission script allocate processors to XIOS. 57 73 58 74 Attached Mode … … 60 76 61 77 In 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 78 This method is less efficient than the detached mode but can be more convenient for testing or 79 with small configurations. 80 To activate this mode simply set ``using_server`` to false in the :file:`iodef.xml` file 64 81 65 82 .. code-block:: xml 66 83 67 84 <variable id="using_server" type="boolean">false</variable> 68 85 69 86 and 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. 71 93 72 94 Adding new diagnostics 73 ---------------------- 95 ====================== 74 96 75 97 If you want to add a NEMO diagnostic to the NEMO code you will need to do the following: 76 98 77 99 1. 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, 100 2. 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. 105 3. 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, 81 108 82 .. code-block:: fortran109 .. code-block:: fortran 83 110 84 85 86 87 88 89 111 IF iom_use('field_id') THEN 112 !Some expensive computation 113 !... 114 !... 115 iom_put('field_id', variable) 116 ENDIF 90 117 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.118 4. Add a variable definition to the :file:`field_def_nemo-???.xml` file. 119 5. 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 290 290 ! ! -> file cplmask.nc with the float variable called cplmask (jpi,jpj,nn_cplmodel) 291 291 nn_cats_cpl = 5 ! Number of sea ice categories over which coupling is to be carried out (if not 1) 292 293 292 !_____________!__________________________!____________!_____________!______________________!________! 294 293 ! ! description ! multiple ! vector ! vector ! vector ! … … 327 326 sn_rcv_wper = 'none' , 'no' , '' , '' , '' 328 327 sn_rcv_wnum = 'none' , 'no' , '' , '' , '' 329 sn_rcv_w strf= 'none' , 'no' , '' , '' , ''328 sn_rcv_wfreq = 'none' , 'no' , '' , '' , '' 330 329 sn_rcv_wdrag = 'none' , 'no' , '' , '' , '' 331 330 sn_rcv_ts_ice = 'none' , 'no' , '' , '' , ''
Note: See TracChangeset
for help on using the changeset viewer.