New URL for NEMO forge!

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.
2019WP/ENHANCE-05_SimonM-Harmonic_Analysis (diff) – NEMO

Changes between Version 9 and Version 10 of 2019WP/ENHANCE-05_SimonM-Harmonic_Analysis

2019-08-27T16:28:55+02:00 (4 years ago)



  • 2019WP/ENHANCE-05_SimonM-Harmonic_Analysis

    v9 v10  
    4141* output files of partial scalar products for partial model runs can readily be generated by XIOS and re-combined later (through addition) in order to prepare sets of scalar products for various analysis intervals, including analysis intervals that span across model restarts. 
     43=== Configuration interface, internal XIOS configuration, and model time 
     45The user configuration of the multiple linear regression diagnostics (definition of regressors, selection of fields for analysis, and output frequency) is proposed to be made feasible entirely in the form of additional XIOS configuration. 
     47A field definition for each regressor would define the arithmetic expression as a function of the model time (`diamlr_time`) and, if required, use placeholders for parameters of tidal constituents. As an example, a configuration section similar to 
     50<field id="diamlr_time" grid_ref="diamlr_grid" /> 
     52<field id="diamlr_r001" field_ref="diamlr_time" expr="diamlr_time^0.0"                                                                 enabled=".TRUE." /> 
     53<field id="diamlr_r002" field_ref="diamlr_time" expr="diamlr_time^1.0"                                                                 enabled=".TRUE." /> 
     54<field id="diamlr_r003" field_ref="diamlr_time" expr="diamlr_time^2.0"                                                                 enabled=".TRUE." /> 
     55<field id="diamlr_r004" field_ref="diamlr_time" expr="sin( 1.992384990861e-7 * diamlr_time )"                                          enabled=".TRUE." /> 
     56<field id="diamlr_r005" field_ref="diamlr_time" expr="cos( 1.992384990861e-7 * diamlr_time )"                                          enabled=".TRUE." /> 
     57<field id="diamlr_r006" field_ref="diamlr_time" expr="__TDE_M2_amplitude__ * sin( __TDE_M2_omega__ * diamlr_time + __TDE_M2_phase__ )" enabled=".TRUE." /> 
     58<field id="diamlr_r007" field_ref="diamlr_time" expr="__TDE_M2_amplitude__ * cos( __TDE_M2_omega__ * diamlr_time + __TDE_M2_phase__ )" enabled=".TRUE." /> 
     61would define seven regressors: three regressors required to fit a polynomial of degree 2; two orthogonal, sinusoidal regressors required to fit the seasonal cycle; and two orthogonal, sinusoidal regressors of the M2 tidal-constituent frequency with parameters provided by the tidal-forcing implementation in NEMO through substitution of placeholders during model initialisation. 
     63The fields selected for the analysis could be listed as dedicated fields that make reference to fields available for model output. As an example, a configuration similar to 
     66<field id="diamlr_f001" field_ref="ssh"  enabled=".TRUE." /> 
     67<field id="diamlr_f002" field_ref="toce" enabled=".TRUE." /> 
     70would select the sea-surface height and potential temperature fields for regression analysis. 
     72Overall, the frequency of intermediate data output would be set using a configuration line similar to 
     75<file_group id="diamlr_files" output_freq="1y" enabled=".TRUE." />, 
     78which would result in the output of annual scalar products. 
     80In order to process and output the full set of scalar products required for the least-squares linear regression analysis, however, a more complex XIOS configuration 
     81is required. This complex configuration of XIOS can be derived from the simple user configuration outlined above. Therefore, during the initialisation of the relevant XIOS context in NEMO, the regression-specific user configuration can be read out and in turn the full configuration can be generated using the XIOS API (currently, XIOS contexts are defined and **closed** in subroutine `iom_init` of module `iom`, source:/NEMO/trunk/src/OCE/IOM/iom.F90@10817; the new implementation would modify module `iom` so that closing the XIOS context can optionally be deferred in order to enable other subroutines to add or modify the XIOS configuration). 
     83The substitution of tidal-constituent parameters in regressor expressions would make use of recent developments of the tidal forcing mechanism (see ticket #2194), and therefore the development branch at source:/NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/ would be merged into the development branch for the new linear regression analysis diagnostics. 
     85In order to enable seamless analysis across restart boundaries, regressor expressions would require to be formulated as a function of a continuous model time that extends across model restarts. Therefore, the new implementation would send the time from the start of the simulation (available as variable `adatrj`) to XIOS as field `diamlr_time`. 
    4487== Tests