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 – NEMO
wiki:2021WP/KNL-02_Jerome_RK3_stage1_tsplit

Version 4 (modified by jchanut, 3 years ago) (diff)

--

Name and subject of the action

Last edition: Wikinfo(changed_ts)? by Wikinfo(changed_by)?

The PI is responsible to closely follow the progress of the action, and especially to contact NEMO project manager if the delay on preview (or review) are longer than the 2 weeks expected.

  1. Summary
  2. Preview
  3. Tests
  4. Review

Summary

Action RK3_stage1_tsplit
PI(S) Jérôme Chanut
Digest Refactorize time splitting scheme for RK3 (and MLF). Make is compliant with a possible coupling at barotropic level with AGRiF
Dependencies
Branch source:/NEMO/branches/2021/dev_r14318_RK3_stage1_tsplit/
Previewer(s) G. Madec & S. Téchené
Reviewer(s) G. Madec & S. Téchené
Ticket #2634

Description

1) Simplify/clean the actual split-explicit procedure:

  • Remove " centred integration" of barotropic mode (ln_bt_fw=F), which is only relevant with LF-RA and not compatible with AGRIF.
  • 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).
  • Add time indexes (4 levels) to barotropic instantaneous arrays (AB3-AM4 time stepping) to match baroclinic mode syntax
  • 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.

2) Refactorize dynspg_ts module:

  • Extract a single external step into a stp_2D routine
  • Same for barotropic to baroclinic forcing term: prep_stp_2D

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.

Even if this task won't go up the AGRIF implementation itself, the idea is to have the following flowchart at the end:

DO WHILE( istp <= nitend  )
   DO iit = 1, icycle
      CALL stp   
           | 
           kstp = nit000 + MOD(Agrif_Nb_Step(), icycle)                   ! internal mode time step
           kit = Agrif_Nb_Step() - icycle * MOD(Agrif_Nb_Step(), icycle)  ! external mode time step
           |
           do_bef_stp2D = (kit == 1)
           do_aft_stp2D = (kit == icycle)                
           |
           IF ( do_bef_stp2D ) THEN
              ! ... do stuff
              ! Set barotropic forcing (incl. 3d to 2d forcing)
              !  and initialize instantaneous barotropic arrays
              CALL prep_stp_2D( kstp, Nbb, Nbb, Naa, Nrhs )
           END IF
           |
           CALL stp_2D(kstp, kit, ll_init, Nbbb_e, Nbb_e, Nnn_e, uu_e, vv_e, ssh_e, Naa_e)
           ! Swap external mode arrays:
           Nbbb_e =  Nbb_e
           Nbb_e  =  Nnn_e
           Nnn_e  =  Naa_e
           |
           IF ( do_aft_stp2D ) THEN
              ! ... do stuff
           END IF 
           |
           CALL Agrif_Integrate_ChildGrids( stp ) 
           |
   END DO
   istp = istp + 1
END DO

...

Implementation

Error: Failed to load processor box
No macro or processor named 'box' found

...

Documentation updates

Error: Failed to load processor box
No macro or processor named 'box' found

...

Preview

Error: Failed to load processor box
No macro or processor named 'box' found

...

Tests

Error: Failed to load processor box
No macro or processor named 'box' found

...

Review

Error: Failed to load processor box
No macro or processor named 'box' found

...