Changes between Version 3 and Version 4 of 2021WP/KNL-02_Jerome_RK3_stage1_tsplit
- Timestamp:
- 2021-03-04T08:33:50+01:00 (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
2021WP/KNL-02_Jerome_RK3_stage1_tsplit
v3 v4 23 23 1) Simplify/clean the actual split-explicit procedure: 24 24 - Remove " centred integration" of barotropic mode (ln_bt_fw=F), which is only relevant with LF-RA and not compatible with AGRIF. 25 - Set initialization of filtering weights at initialization step (maybe not relevant to do so if any adaptive time stepping procedure is ever implemented). 26 - Add time indexes (4 levels) to barotropic instantaneous arrays (AB3-AM4 time stepping) 25 - 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 - Add time indexes (4 levels) to barotropic instantaneous arrays (AB3-AM4 time stepping) to match baroclinic mode syntax 27 - We agreed (with Gurvan) to keep the barotropic filtering option (ln_bt_ave=T) even if it complicates a bit the integration. It will be useful for comparison with Demange's diffusive time stepping approach. 27 28 28 29 2) Refactorize dynspg_ts module: … … 30 31 - Same for barotropic to baroclinic forcing term: prep_stp_2D 31 32 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. 32 34 35 Even if this task won't go up the AGRIF implementation itself, the idea is to have the following flowchart at the end: 33 36 {{{ 34 ! Set barotropic forcing (incl. 3d to 2d forcing) 35 ! Initialize instantaneous barotropic arrays 36 CALL prep_stp_2D( kstp, Nbb, Nbb, Naa, Nrhs ) 37 38 DO kstp_e = 1, icycle 39 CALL stp_2D(kstp, kstp_e, ll_init, Nbbb_e, Nbb_e, Nnn_e, uu_e, vv_e, ssh_e, Naa_e) 40 ! Swap external arrays: 41 Nbbb_e = Nbb_e 42 Nbb_e = Nnn_e 43 Nnn_e = Naa_e 37 DO WHILE( istp <= nitend ) 38 DO iit = 1, icycle 39 CALL stp 40 | 41 kstp = nit000 + MOD(Agrif_Nb_Step(), icycle) ! internal mode time step 42 kit = Agrif_Nb_Step() - icycle * MOD(Agrif_Nb_Step(), icycle) ! external mode time step 43 | 44 do_bef_stp2D = (kit == 1) 45 do_aft_stp2D = (kit == icycle) 46 | 47 IF ( do_bef_stp2D ) THEN 48 ! ... do stuff 49 ! Set barotropic forcing (incl. 3d to 2d forcing) 50 ! and initialize instantaneous barotropic arrays 51 CALL prep_stp_2D( kstp, Nbb, Nbb, Naa, Nrhs ) 52 END IF 53 | 54 CALL stp_2D(kstp, kit, ll_init, Nbbb_e, Nbb_e, Nnn_e, uu_e, vv_e, ssh_e, Naa_e) 55 ! Swap external mode arrays: 56 Nbbb_e = Nbb_e 57 Nbb_e = Nnn_e 58 Nnn_e = Naa_e 59 | 60 IF ( do_aft_stp2D ) THEN 61 ! ... do stuff 62 END IF 63 | 64 CALL Agrif_Integrate_ChildGrids( stp ) 65 | 66 END DO 67 istp = istp + 1 44 68 END DO 45 69 }}}