Changes between Version 5 and Version 6 of 2021WP/KNL-02_Jerome_RK3_stage1_tsplit
- Timestamp:
- 2021-03-04T09:35:11+01:00 (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
2021WP/KNL-02_Jerome_RK3_stage1_tsplit
v5 v6 21 21 22 22 === Description 23 1) Simplify/clean the actual split-explicit procedure 24 25 26 2) Refactorize dynspg_ts module: 27 (and anticipate possible exchange at barotropic time step with AGRIF) 28 ''...'' 29 30 === Implementation 23 31 1) 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). 25 33 - 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). 26 34 - Add time indexes (4 levels) to barotropic instantaneous arrays (AB3-AM4 time stepping) to match baroclinic mode syntax … … 28 36 29 37 2) 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. 31 39 - 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...) 32 41 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. 42 At 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 67 This 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. 34 68 35 69 Even if this task won't go up the AGRIF implementation itself, the idea is to have the following flowchart at the end: … … 52 86 END IF 53 87 | 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) 55 89 ! Swap external mode arrays: 56 90 Nbbb_e = Nbb_e … … 67 101 istp = istp + 1 68 102 END DO 69 }}}70 71 72 ''...''73 74 === Implementation75 76 {{{#!box width=35em help77 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.81 103 }}} 82 104