Changes between Version 13 and Version 14 of 2020WP/KERNEL-06_techene_better_e3_management

2020-08-21T12:23:57+02:00 (17 months ago)



  • 2020WP/KERNEL-06_techene_better_e3_management

    v13 v14  
    4747domvvl.F90 interpolation routine is called :  
    48 - at initialisation or restart  
    49 {{{ 
    50 nemogcm  
    51 --> nemoinit 
    52     --> dominit 
    53         --> domvvlread 
    54             --> dom_vvl_zgr 
    55                 --> read e3t 
    56                 or 
    57                 --> compute e3t from ssh  
    58 }}} 
    63 NEMO's version 12377 implements scale factor computation at T-point with a leap frog integration or a filter and then interpolate scale factors at U-V-W-UW-VW-F-points from T-point through domvvl.F90 module. 
    64 - at initialization or restart at all points 
    65 - at time N+1 after sea surface time splitting integration and before the momentum integration at  T-U-W-points 
    66 - at time N after the sea surface asselin filtering at  T-U-W-points 
    67 - at the end of the time step after index switch F- and W-UW-VW-points are updated accordingly 
    68 Because NEMO needs to take into account continuity issues, these modification are implemented under a cpp key key_qco for "quasi eulerian coordinate". When this key_qco is not activated NEMO should be exactly the same as the trunk.  
     48- at initialisation or restart at u-v-w-uw-vw-f-points 
     51--> nemo_init 
     52   --> dom_init 
     53      --> dom_vvl_init 
     54         --> dom_vvl_rst 
     55         --> dom_vvl_zgr 
     56            --> dom_vvl_interpol  
     58- at each time step for "after" scale factor at u-v-points each time ssh[Naa] is computed 
     61--> stp 
     62   --> dom_vvl_sf_nxt 
     63      --> e3t[Kaa] 
     64      --> dom_vvl_interpol 
     66- at each time step for "now" scale factor at u-v-points e3t is directly filtered 
     69--> stp 
     70   --> tra_atf 
     71      --> e3t[Kmm] 
     72   --> dyn_atf 
     73      --> e3t[Kmm] 
     74      --> dom_vvl_interpol 
     76- at each time step after time swapping for "now" at f-point and "before" scale factor both at w-uw-vw-points 
     79--> stp 
     80   --> dom_vvl_sf_update 
     81      --> dom_vvl_interpol 
     84In version 1 we implement changes progressively and validate step by step regarding GYRE_PISCES test case. For backward compatibility we introduce a cpp key key_qco in order to isolate new scale factor implementation from former vvl version. qco stand for for "quasi eulerian coordinate".  
     85- new variables added in dom_oce and domain  
     87r3. with . = [t,u,v,f] are 2d in space ssh/hP0 
     89- new module in DOM : dom_qco 
     91-- dom_qco_r3c ! compute ssh/ht0 at t-point and interpolate ssh/h.0 at u-v-f-points from ssh 
     92-- dom_qco_zgr ! set ssh/ht0 at t-u-v-f-points for Kmm and at t-u-v-points for Kbb 
     93   --> dom_qco_r3c[Kmm] at t-u-v-f-points 
     94   --> dom_qco_r3c[Kbb] at t-u-v  -points 
     96- new substitute in DOM : domzgr_substitute 
     97When key_qco is active e3. is no longer a variable but an expression.  
     98Each time e3. appears in a routine an include domzgr_substitute in the module enables to replace it by a (e3._0 ( 1 + r3. ) * mask.) like expression.  
     100#   define  e3t(i,j,k,t)   (e3t_0(i,j,k)*(1._wp+r3t(i,j,t)*tmask(i,j,k))) 
     101#   define  e3u(i,j,k,t)   (e3u_0(i,j,k)*(1._wp+r3u(i,j,t)*umask(i,j,k))) 
     102#   define  e3v(i,j,k,t)   (e3v_0(i,j,k)*(1._wp+r3v(i,j,t)*vmask(i,j,k))) 
     103#   define  e3f(i,j,k)     (e3f_0(i,j,k)*(1._wp+r3f(i,j)*fmask(i,j,k))) 
     104#   define  e3w(i,j,k,t)   (e3w_0(i,j,k)*(1._wp+r3t(i,j,t))) 
     105#   define  e3uw(i,j,k,t)  (e3uw_0(i,j,k)*(1._wp+r3u(i,j,t))) 
     106#   define  e3vw(i,j,k,t)  (e3vw_0(i,j,k)*(1._wp+r3v(i,j,t))) 
     108- finally we extended the e3. modification to h. r1_h. and gde.. 
     110#   define  ht(i,j)        (ht_0(i,j)+ssh(i,j,Kmm)) 
     111#   define  hu(i,j,t)      (hu_0(i,j)*(1._wp+r3u(i,j,t))) 
     112#   define  hv(i,j,t)      (hv_0(i,j)*(1._wp+r3v(i,j,t))) 
     113#   define  r1_hu(i,j,t)   (r1_hu_0(i,j)/(1._wp+r3u(i,j,t))) 
     114#   define  r1_hv(i,j,t)   (r1_hv_0(i,j)/(1._wp+r3v(i,j,t))) 
     115#   define  gdept(i,j,k,t) (gdept_0(i,j,k)*(1._wp+r3t(i,j,t))) 
     116#   define  gdepw(i,j,k,t) (gdepw_0(i,j,k)*(1._wp+r3t(i,j,t))) 
     117#   define  gde3w(i,j,k)   (gdept_0(i,j,k)*(1._wp+r3t(i,j,Kmm))-ssh(i,j,Kmm)) 
     120When this key_qco is not activated NEMO should be exactly the same as the trunk.  
     123Important points :  
     124- e3. expression involves tables of distinct dimension then e3.(:,:,:) call fails it may be necessary to introduce temporary variables (same for water height expression) 
     125- "e3. =" is no longer possible 
     126- e3t/u/v/f modifications did not introduce any difference in the results, e3w modification does because both approaches vvl and qco do not take into account of the bottom level in the same way 
     127- in GYRE e3w_0 are not the half sum of e3u_0 so the way it is implemented in the reference version is not convinient 
     128- e3. substitution makes lines longer than 136 character this may be a problem for compilers (most have been checked but not all) 
     129- ssh filtering has been displaced upper in order to provide filtered r3. in TOP asselin filtering  
     130- when key_qco is not active we pass SETTE and this version has been delivered for mid-merge party !  
     131-- Some silly allocating memory bugs found and a not that silly bug in the implicit mode for SPITZ12 configuration. 
    70134NEMO intermediate version 1 implements scales factors computed from sea surface interpolation (2d field) instead but the whole structure of the code remains. Note that to validate "NEMO intermediate version 1" we change the code line by line and compare results of GYRE configuration with TOP de-activated. Differences in the results appear when changing the W-point scale factor interpolation from T-point scale factor into the sea surface scaling since the bottom level is not considered in the same way. Indeed for GYRE configuration e3w_0 are not the half sum of e3u_0, so the way it is implemented in the reference version is not convinient...