source: NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/CRS/README.rst @ 11048

Last change on this file since 11048 was 10279, checked in by nicolasmartin, 2 years ago

Various improvments for quick start guide

  • implementation of Rtd theme (Read the Docs) with custom layout and style file
  • add reviewed BibTeX entries for NEMO references with DOI (manuals, guide, development strategy)
  • enhancement of bibliography management and configuration file for guide building
  • standardisation of headings markup
  • numerous edits
File size: 6.8 KB
Line 
1**********************************
2On line biogeochemistry coarsening
3**********************************
4
5.. contents::
6   :local:
7
8Presentation
9============
10
11A capacity of coarsening physics to force a BGC model coupled to NEMO has been developed.
12This capacity allow to run 'online' a BGC model coupled to OCE-SI3 with a lower resolution,
13to reduce the CPU cost of the BGC model, while preserving the effective resolution of the dynamics.
14
15A presentation is available [attachment:crs_wiki_1.1.pdf​ here], where the methodology is presented.
16
17What is available and working for now in this version
18=====================================================
19
20[To be completed]
21
22Description of the successful validation tests
23==============================================
24
25[To be completed]
26
27What is not working yet with on line coarsening of biogeochemistry
28==================================================================
29
30[To be completed]
31
32''should include precise explanation on MPI decomposition problems too''
33
34How to set up and use on line biogeochemistry
35=============================================
36
37Extract the on line biogeochemistry branch
38------------------------------------------
39
40To get the appropriate source code with the on line coarsening of biogeochemistry feature:
41
42.. code-block:: console
43
44   $ svn co https://forge.ipsl.jussieu.fr/nemo/browser/NEMO/branches/2018/dev_r5003_MERCATOR6_CRS
45
46
47How to activate coarsening?
48---------------------------
49
50To activate the coarsening, ``key_crs`` should be added to list of CPP keys.
51This key will only activate the coarsening of dynamics.
52
53Some parameters are available in the namelist_cfg:
54
55.. code-block:: fortran
56
57                  !   passive tracer coarsened online simulations
58   !-----------------------------------------------------------------------
59      nn_factx    = 3         !  Reduction factor of x-direction
60      nn_facty    = 3         !  Reduction factor of y-direction
61      nn_msh_crs  = 0         !  create (=1) a mesh file or not (=0)
62      nn_crs_kz   = 3         ! 0, volume-weighted MEAN of KZ
63                              ! 1, MAX of KZ
64                              ! 2, MIN of KZ
65                              ! 3, 10^(MEAN(LOG(KZ))
66                              ! 4, MEDIANE of KZ
67      ln_crs_wn   = .false.   ! wn coarsened (T) or computed using horizontal divergence ( F )
68                              !                           !
69      ln_crs_top = .true.     !coarsening online for the bio
70   /
71
72- Only ``nn_factx = 3`` is available and the coarsening only works for grids with a T-pivot point for
73  the north-fold lateral boundary condition (ORCA025, ORCA12, ORCA36, ...).
74- ``nn_msh_crs = 1`` will activate the generation of the coarsened grid meshmask.
75- ``nn_crs_kz`` is the operator to coarsen the vertical mixing coefficient.
76- ``ln_crs_wn``
77
78  - when ``key_vvl`` is activated, this logical has no effect;
79    the coarsened vertical velocities are computed using horizontal divergence.
80  - when ``key_vvl`` is not activated,
81
82    - coarsened vertical velocities are computed using horizontal divergence (``ln_crs_wn = .false.``)
83    - or coarsened vertical velocities are computed with an average operator (``ln_crs_wn = .true.``)
84- ``ln_crs_top = .true.``: should be activated to run BCG model in coarsened space;
85  so only works when ``key_top`` is in the cpp list and eventually ``key_pisces`` or ``key_my_trc``.
86
87Choice of operator to coarsene KZ
88---------------------------------
89
90A sensiblity test has been done with an Age tracer to compare the different operators.
91The 3 and 4 options seems to provide the best results.
92
93Some results can be found [xxx here]
94
95Example of xml files to output coarsened variables with XIOS
96------------------------------------------------------------
97
98In the [attachment:iodef.xml iodef.xml]  file, a "nemo" context is defined and
99some variable defined in [attachment:file_def.xml file_def.xml] are writted on the ocean-dynamic grid. 
100To write variables on the coarsened grid, and in particular the passive tracers,
101a "nemo_crs" context should be defined in [attachment:iodef.xml iodef.xml] and
102the associated variable are listed in [attachment:file_crs_def.xml file_crs_def.xml ].
103
104Passive tracers tracers initial conditions
105------------------------------------------
106
107When initial conditions are provided in NetCDF files, the field might be:
108
109- on the coarsened grid
110- or they can be on another grid and
111  interpolated `on-the-fly <http://forge.ipsl.jussieu.fr/nemo/wiki/Users/SetupNewConfiguration/Weight-creator>`_.
112  Example of namelist for PISCES :
113 
114   .. code-block:: fortran
115
116      !-----------------------------------------------------------------------
117      &namtrc_dta      !    Initialisation from data input file
118      !-----------------------------------------------------------------------
119      !
120         sn_trcdta(1)  = 'DIC_REG1'        ,        -12        ,  'DIC'     ,    .false.   , .true. , 'yearly'  , 'reshape_REG1toeORCA075_bilin.nc'       , ''   , ''
121         sn_trcdta(2)  = 'ALK_REG1'        ,        -12        ,  'ALK'     ,    .false.   , .true. , 'yearly'  , 'reshape_REG1toeORCA075_bilin.nc'       , ''   , ''
122         sn_trcdta(3)  = 'O2_REG1'         ,        -1         ,  'O2'      ,    .true.    , .true. , 'yearly'  , 'reshape_REG1toeORCA075_bilin.nc'       , ''   , ''
123         sn_trcdta(5)  = 'PO4_REG1'        ,        -1         ,  'PO4'     ,    .true.    , .true. , 'yearly'  , 'reshape_REG1toeORCA075_bilin.nc'       , ''   , ''
124         sn_trcdta(7)  = 'Si_REG1'         ,        -1         ,  'Si'      ,    .true.    , .true. , 'yearly'  , 'reshape_REG1toeORCA075_bilin.nc'       , ''   , ''
125         sn_trcdta(10) = 'DOC_REG1'        ,        -12        ,  'DOC'     ,    .false.   , .true. , 'yearly'  , 'reshape_REG1toeORCA075_bilin.nc'       , ''   , ''
126         sn_trcdta(14) = 'Fe_REG1'         ,        -12        ,  'Fe'      ,    .false.   , .true. , 'yearly'  , 'reshape_REG1toeORCA075_bilin.nc'       , ''   , ''
127         sn_trcdta(23) = 'NO3_REG1'        ,        -1         ,  'NO3'     ,    .true.    , .true. , 'yearly'  , 'reshape_REG1toeORCA075_bilin.nc'       , ''   , ''
128         rn_trfac(1)   =   1.0e-06  !  multiplicative factor
129         rn_trfac(2)   =   1.0e-06  !  -      -      -     -
130         rn_trfac(3)   =  44.6e-06  !  -      -      -     -
131         rn_trfac(5)   = 122.0e-06  !  -      -      -     -
132         rn_trfac(7)   =   1.0e-06  !  -      -      -     -
133         rn_trfac(10)  =   1.0e-06  !  -      -      -     -
134         rn_trfac(14)  =   1.0e-06  !  -      -      -     -
135         rn_trfac(23)  =   7.6e-06  !  -      -      -     -
136     
137         cn_dir        =  './'      !  root directory for the location of the data files
138
139PISCES forcing files
140--------------------
141
142They might be on the coarsened grid.
143
144Perspectives
145============
146
147For the future, a few options are on the table to implement coarsening for biogeochemistry in 4.0 and
148future releases.
149Those will be discussed in Autumn 2018
Note: See TracBrowser for help on using the repository browser.