Index: NEMO/branches/2019/dev_r11879_ENHANCE-05_SimonM-Harmonic_Analysis/cfgs/SHARED/field_def_nemo-oce.xml
===================================================================
--- NEMO/branches/2019/dev_r11879_ENHANCE-05_SimonM-Harmonic_Analysis/cfgs/SHARED/field_def_nemo-oce.xml	(revision 11922)
+++ NEMO/branches/2019/dev_r11879_ENHANCE-05_SimonM-Harmonic_Analysis/cfgs/SHARED/field_def_nemo-oce.xml	(revision 11956)
@@ -1,4 +1,80 @@
 <?xml version="1.0"?> 
     <!-- $id$ -->
+
+    <field_definition level="1" prec="4" operation="average" enabled=".TRUE." default_value="1.e20" > <!-- time step automaticaly defined -->
+
+    <!--
+       =====================================================================================================
+       =                                   Configurable diagnostics                                        =
+       =====================================================================================================
+      -->
+
+    <field_group id="diamlr_fields">
+
+    <!--
+       =====================================================================================================
+                         Configuration of multiple-linear-regression analysis (diamlr)
+       =====================================================================================================
+       
+       This field group contains an example configuration for tidal harmonic
+       analysis: in addition to an enabled regressor for fitting the mean value,
+       it includes the regressors for the analysis of the tidal constituents
+       that are available in the tidal-forcing implementation (see
+       ./src/OCE/SBC/tide.h90) and enables the harmonic analysis of the tidal
+       constituents activated in the AMM12 reference configuration.
+
+      -->
+
+      <!-- Time -->
+      <field id="diamlr_time" grid_ref="diamlr_grid_2D" prec="8" />
+
+      <!-- Regressors for tidal harmonic analysis -->
+      <field id="diamlr_r001"  field_ref="diamlr_time" expr="sin( __TDE_M2_omega__   * diamlr_time )" enabled=".TRUE."  />
+      <field id="diamlr_r002"  field_ref="diamlr_time" expr="cos( __TDE_M2_omega__   * diamlr_time )" enabled=".TRUE."  />
+      <field id="diamlr_r003"  field_ref="diamlr_time" expr="sin( __TDE_N2_omega__   * diamlr_time )" enabled=".TRUE."  />
+      <field id="diamlr_r004"  field_ref="diamlr_time" expr="cos( __TDE_N2_omega__   * diamlr_time )" enabled=".TRUE."  />
+      <field id="diamlr_r005"  field_ref="diamlr_time" expr="sin( __TDE_2N2_omega__  * diamlr_time )" enabled=".TRUE."  />
+      <field id="diamlr_r006"  field_ref="diamlr_time" expr="cos( __TDE_2N2_omega__  * diamlr_time )" enabled=".TRUE."  />
+      <field id="diamlr_r007"  field_ref="diamlr_time" expr="sin( __TDE_S2_omega__   * diamlr_time )" enabled=".TRUE."  />
+      <field id="diamlr_r008"  field_ref="diamlr_time" expr="cos( __TDE_S2_omega__   * diamlr_time )" enabled=".TRUE."  />
+      <field id="diamlr_r009"  field_ref="diamlr_time" expr="sin( __TDE_K2_omega__   * diamlr_time )" enabled=".TRUE."  />
+      <field id="diamlr_r010"  field_ref="diamlr_time" expr="cos( __TDE_K2_omega__   * diamlr_time )" enabled=".TRUE."  />
+      <field id="diamlr_r011"  field_ref="diamlr_time" expr="sin( __TDE_K1_omega__   * diamlr_time )" enabled=".TRUE."  />
+      <field id="diamlr_r012"  field_ref="diamlr_time" expr="cos( __TDE_K1_omega__   * diamlr_time )" enabled=".TRUE."  />
+      <field id="diamlr_r013"  field_ref="diamlr_time" expr="sin( __TDE_O1_omega__   * diamlr_time )" enabled=".TRUE."  />
+      <field id="diamlr_r014"  field_ref="diamlr_time" expr="cos( __TDE_O1_omega__   * diamlr_time )" enabled=".TRUE."  />
+      <field id="diamlr_r015"  field_ref="diamlr_time" expr="sin( __TDE_Q1_omega__   * diamlr_time )" enabled=".TRUE."  />
+      <field id="diamlr_r016"  field_ref="diamlr_time" expr="cos( __TDE_Q1_omega__   * diamlr_time )" enabled=".TRUE."  />
+      <field id="diamlr_r017"  field_ref="diamlr_time" expr="sin( __TDE_P1_omega__   * diamlr_time )" enabled=".TRUE."  />
+      <field id="diamlr_r018"  field_ref="diamlr_time" expr="cos( __TDE_P1_omega__   * diamlr_time )" enabled=".TRUE."  />
+      <field id="diamlr_r019"  field_ref="diamlr_time" expr="sin( __TDE_M4_omega__   * diamlr_time )" enabled=".TRUE."  />
+      <field id="diamlr_r020"  field_ref="diamlr_time" expr="cos( __TDE_M4_omega__   * diamlr_time )" enabled=".TRUE."  />
+      <field id="diamlr_r021"  field_ref="diamlr_time" expr="sin( __TDE_Mf_omega__   * diamlr_time )" enabled=".FALSE." />
+      <field id="diamlr_r022"  field_ref="diamlr_time" expr="cos( __TDE_Mf_omega__   * diamlr_time )" enabled=".FALSE." />
+      <field id="diamlr_r023"  field_ref="diamlr_time" expr="sin( __TDE_Mm_omega__   * diamlr_time )" enabled=".FALSE." />
+      <field id="diamlr_r024"  field_ref="diamlr_time" expr="cos( __TDE_Mm_omega__   * diamlr_time )" enabled=".FALSE." />
+      <field id="diamlr_r025"  field_ref="diamlr_time" expr="sin( __TDE_Msqm_omega__ * diamlr_time )" enabled=".FALSE." />
+      <field id="diamlr_r026"  field_ref="diamlr_time" expr="cos( __TDE_Msqm_omega__ * diamlr_time )" enabled=".FALSE." />
+      <field id="diamlr_r027"  field_ref="diamlr_time" expr="sin( __TDE_Mtm_omega__  * diamlr_time )" enabled=".FALSE." />
+      <field id="diamlr_r028"  field_ref="diamlr_time" expr="cos( __TDE_Mtm_omega__  * diamlr_time )" enabled=".FALSE." />
+      <field id="diamlr_r029"  field_ref="diamlr_time" expr="sin( __TDE_S1_omega__   * diamlr_time )" enabled=".TRUE."  />
+      <field id="diamlr_r030"  field_ref="diamlr_time" expr="cos( __TDE_S1_omega__   * diamlr_time )" enabled=".TRUE."  />
+      <field id="diamlr_r031"  field_ref="diamlr_time" expr="sin( __TDE_MU2_omega__  * diamlr_time )" enabled=".TRUE."  />
+      <field id="diamlr_r032"  field_ref="diamlr_time" expr="cos( __TDE_MU2_omega__  * diamlr_time )" enabled=".TRUE."  />
+      <field id="diamlr_r033"  field_ref="diamlr_time" expr="sin( __TDE_NU2_omega__  * diamlr_time )" enabled=".TRUE."  />
+      <field id="diamlr_r034"  field_ref="diamlr_time" expr="cos( __TDE_NU2_omega__  * diamlr_time )" enabled=".TRUE."  />
+      <field id="diamlr_r035"  field_ref="diamlr_time" expr="sin( __TDE_L2_omega__   * diamlr_time )" enabled=".TRUE."  />
+      <field id="diamlr_r036"  field_ref="diamlr_time" expr="cos( __TDE_L2_omega__   * diamlr_time )" enabled=".TRUE."  />
+      <field id="diamlr_r037"  field_ref="diamlr_time" expr="sin( __TDE_T2_omega__   * diamlr_time )" enabled=".TRUE."  />
+      <field id="diamlr_r038"  field_ref="diamlr_time" expr="cos( __TDE_T2_omega__   * diamlr_time )" enabled=".TRUE."  />
+      <field id="diamlr_r101"  field_ref="diamlr_time" expr="diamlr_time^0.0"                         enabled=".TRUE."  />
+
+      <!-- Fields selected for regression analysis -->
+      <field id="diamlr_f001" field_ref="ssh"  grid_ref="grid_T_2D" enabled=".TRUE." />
+      <field id="diamlr_f002" field_ref="uoce" grid_ref="grid_U_3D" enabled=".TRUE." />
+      <field id="diamlr_f003" field_ref="voce" grid_ref="grid_V_3D" enabled=".TRUE." />
+      <field id="diamlr_f004" field_ref="toce" grid_ref="grid_T_3D" enabled=".TRUE." />
+
+    </field_group>
     
     <!-- 
@@ -8,5 +84,4 @@
 ============================================================================================================
     -->
-    <field_definition level="1" prec="4" operation="average" enabled=".TRUE." default_value="1.e20" > <!-- time step automaticaly defined -->
 
     <!-- 
@@ -1006,8 +1081,3 @@
     </field_group>    
 
-    <!-- configuration of multiple-linear-regression analysis (diamlr) -->
-    <field_group id="diamlr_fields">
-      <field id="diamlr_time" grid_ref="diamlr_grid_2D" prec="8" />
-    </field_group>
-
    </field_definition>
