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.
2021WP/KNL-02_Jerome_RK3_stage1_tsplit (diff) – NEMO

Changes between Version 5 and Version 6 of 2021WP/KNL-02_Jerome_RK3_stage1_tsplit


Ignore:
Timestamp:
2021-03-04T09:35:11+01:00 (3 years ago)
Author:
jchanut
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • 2021WP/KNL-02_Jerome_RK3_stage1_tsplit

    v5 v6  
    2121 
    2222=== Description 
     231) Simplify/clean the actual split-explicit procedure  
     24 
     25 
     262) Refactorize dynspg_ts module: 
     27(and anticipate possible exchange at barotropic time step with AGRIF) 
     28''...'' 
     29 
     30=== Implementation 
    23311) Simplify/clean the actual split-explicit procedure:  
    24 - Remove " centred integration" of barotropic mode (ln_bt_fw=F), which is only relevant with LF-RA and not compatible with AGRIF.  
     32- Remove " centred integration" of barotropic mode (ln_bt_fw=F), which is only relevant with LF-RA and not compatible with AGRIF. This nevertheless precludes from implementing a coherent treatment in baroclinic and barotropic modes of implicit bottom stress (Leapfrog only). 
    2533- Set initialization of filtering weights at initialization step (maybe not relevant to do so if any adaptive time stepping procedure is ever implemented - one would like to change the number of barotropic iterations  online). 
    2634- Add time indexes (4 levels) to barotropic instantaneous arrays (AB3-AM4 time stepping) to match baroclinic mode syntax 
     
    2836 
    29372) Refactorize dynspg_ts module: 
    30 - Extract a single external step into a stp_2D routine 
     38- Extract a single external step into a stp_2D routine. Such a routine could be the basis of an "autonomous" barotropic model within NEMO. 
    3139- Same for barotropic to baroclinic forcing term: prep_stp_2D 
     40- I would have tend to think that a kind of post-processing of stp_2D, i.e. a kind of finalize_stp_2D would have been nice so that stp_2D does not have to do specific operations at the end of the cycle (write restart, compute advective velocities, etc...) 
    3241 
    33 The second part should ease a possible transition to the coupling at each barotropic time step. The philosophy behind this is to be able to insert the external loop within the main time stepping routine and possibly cycle the stp routine over nstep x icycle steps, i.e. the total number of sub-steps. The integration of agrif should then be trivial, swapping grids at each parent sub cycle. 
     42At the end, call to dynspg_ts should be replaced in the main stp routine by: 
     43 
     44{{{ 
     45   ! Set barotropic forcing (incl. 3d to 2d forcing and drag): Ue_rhs, Ve_rhs, sshe_rhs, CdU_u , CdU_v 
     46   !  and initialize instantaneous barotropic arrays: uu_e, vv_e, hu_e, hv_e, ssh_e 
     47   CALL prep_stp_2D( kstp, Nbb, Nbb, Naa, Nrhs ) 
     48   ! 
     49   DO kit = 1, icycle 
     50      ! iterate external mode: update uu_e, vv_e, hu_e, hv_e, ssh_e 
     51      ! increment and provide time averaged and final barotropic arrays at kit=icycle, e.g. N+1:  
     52      !           ssh (:,:,Naa), uu_b(:,:,Naa), vv_b(:,:,Naa) => barotropic arrays at N+1 baroclinic step (eventually filtered) 
     53      !           un_adv(:,:), vn_adv(:,:) => advective fluxes over N->N+1 (RK3) or N-1 -> N+1 (LF) 
     54      !           ub2_b(:,:), vb2_b(:,:), un_bf(:,:), vn_bf(:,:) => Leapfrog backward fluxes over N-1 -> N 
     55      !           ub2_i_b(:,:), ub2_i_b(:,:) => AGRIF time integrated fluxes over N child grid baroclinic steps 
     56      ! 
     57      CALL stp_2D(kstp, kit, ll_init, Nbbb_e, Nbb_e, Nnn_e, uu_e, vv_e, hu_e, hv_e, ssh_e, Naa_e) 
     58      ! 
     59      ! Swap external mode arrays: 
     60      Nbbb_e =  Nbb_e 
     61      Nbb_e  =  Nnn_e 
     62      Nnn_e  =  Naa_e 
     63   END DO 
     64}}} 
     65  
     66 
     67This part should ease a possible transition to the coupling at each barotropic time step. The philosophy behind this is to be able to insert the external loop within the main time stepping routine and possibly cycle the stp routine over nstep x icycle steps, i.e. the total number of sub-steps. The integration of agrif should then be trivial, swapping grids at each parent sub cycle. 
    3468 
    3569Even if this task won't go up the AGRIF implementation itself, the idea is to have the following flowchart at the end: 
     
    5286           END IF 
    5387           | 
    54            CALL stp_2D(kstp, kit, ll_init, Nbbb_e, Nbb_e, Nnn_e, uu_e, vv_e, ssh_e, Naa_e) 
     88           CALL stp_2D(kstp, kit, ll_init, Nbbb_e, Nbb_e, Nnn_e, uu_e, vv_e, hu_e, hv_e, ssh_e, Naa_e) 
    5589           ! Swap external mode arrays: 
    5690           Nbbb_e =  Nbb_e 
     
    67101   istp = istp + 1 
    68102END DO 
    69 }}} 
    70  
    71  
    72 ''...'' 
    73  
    74 === Implementation 
    75  
    76 {{{#!box width=35em help 
    77 Describe flow chart of the changes in the code. \\ 
    78 List the Fortran modules and subroutines to be created/edited/deleted. \\ 
    79 Detailed list of new variables to be defined (including namelists), \\ 
    80 give for each the chosen name and description wrt coding rules. 
    81103}}} 
    82104