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.
WorkingGroups/TAM/ReferenceManual/testing/tangent (diff) – NEMO

Changes between Version 2 and Version 3 of WorkingGroups/TAM/ReferenceManual/testing/tangent


Ignore:
Timestamp:
2010-02-22T10:48:58+01:00 (14 years ago)
Author:
vigilant
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WorkingGroups/TAM/ReferenceManual/testing/tangent

    v2 v3  
    5252||d     ||Norm((Ep - Lp/(p.Lp),.) || constant  || 
    5353 
     54Note that the second order test is not relevant if '''M''' is linear. '''L''' must be exact and this test will only give information on the actual machine error. 
     55 
    5456== Implementation == 
    5557 
    56 ... work in progress ... 
     58We need to compute Np, Lp, Ep and Rp for different value of p. It means that we need to run several time the model '''M'''. As we wish not to modify the model, multiple run of the model currently means launched several times the executable. A dedicate driver is developp to be able to run in the same executable the model '''M''' and its tangent '''L'''. This driver is used as soon as the the logicals '''ln_tst_tan''' (tangent test switch) and '''ln_tst''' (general test switch) are set to .true. in the '''namtst''' namelist. (we also have to choose between testing the main routine '''step''' or individual options, as for adjoint test, with '''ln_tst_tan_cpd''' (swith for testing individual options) set to .false. or .true.) 
     59 
     60=== Process === 
     61The test is built as follows: 
     62 
     63{{{  
     64Loop on p: 
     65 * IF p=0: 
     66  * Write to file M(X0) 
     67 * ELSE: 
     68  * compute p.dX 
     69  * compute M(X0+p.dX), L(pdX) 
     70  * read M(X0) 
     71  * write to file Np, Lp, Ep and Rp 
     72End Loop 
     73Concatenate outputs files 
     74}}} 
     75 
     76 
     77=== How to Run the test === 
     78'''runnemo_tgt.ksh''' (only ORCA2_Z31 cfg) is a dedicated script to run tangent test of TAM. 
     79Basics options are: 
     80 * t: defined working directory target 
     81 * A: compiler setting base 
     82 * j: direct trajectory file directory (default value is corresponding outer loop directory) 
     83 * v: experiment target (= nemotam) 
     84 * k: non-perturbated outputs directory 
     85 * f: diagnostic files directory 
     86 * '''note''': for 'k' and 'f' options, you must indicate the relative path with respect to 't' option 
     87 
     88Example: 
     89runnemo_tgt.ksh -t $mypath -A mycomp - j $traj -v nemotam -k $nopert -f $diag 
     90 
     91 * non perturbated outputs is be saved into $mypath/$nopert directory 
     92 * final diagnostic outputs is saved into $mypath/$diag directory 
     93 
     94== Requierements == 
     95To run the some adjoint test we need the following features: 
     96 * a direct trajectory (computed with NEMO) 
     97 * additionnal namelist to rule loop number and actual '''p''' 
     98  * namtst_tlm (tangent test parameter: see example in setup_tam_orca2) 
     99 * runnemo_tgt.ksh script uses two short python codes (filesmove.py and diagmerge.py) to save intermediate outputs and build-up the final outputs. 
     100 
     101 
     102== Outputs == 
     103The outputs, located in $mypath/$diag/ directory, is called '''tan_diag.global_0000'''. 
     104  
     105== Global Test == 
     106The ''global test'' involves time evolution by reading foward the trajectory (for the tangent) and then backward (for the adjoint). It concerns mainly the ''step_tam'' routine. It is more conmplex as it stressed out: 
     107 * initializations 
     108 * interactions between routines 
     109 * handling of direct trajectory 
     110 
     111 
     112== Test Pass Criteria == 
     113With the above notations, we focus on Ep and Rp. 
     114 
     115== Results == 
     116All subroutines tested both criteria except for: 
     117* '''dynspg_flt''': fails on Rp criteria, root cause under inverstigation 
     118* '''traadv_cen2''': fails on the Rp criteria due to tangent approximation (not considering the volume finite part of the scheme).