diff --git a/src/NST/agrif_user.F90 b/src/NST/agrif_user.F90 index 06bf76ce78af4fc937b3fa4af78327dc2a3bb445..bd5416f7d92b4fd0e0529e49ba615ecb3316d4ce 100644 --- a/src/NST/agrif_user.F90 +++ b/src/NST/agrif_user.F90 @@ -28,7 +28,11 @@ !!---------------------------------------------------------------------- ! CALL nemo_init !* Initializations of each fine grid +# if defined key_RK3 + Kbb_a = Nbb; Kmm_a = Nbb; Krhs_a = Nrhs +# else Kbb_a = Nbb; Kmm_a = Nnn; Krhs_a = Nrhs ! agrif_oce module copies of time level indices +# endif ! ! !* Agrif initialization CALL Agrif_InitValues_cont diff --git a/src/OCE/DOM/domqco.F90 b/src/OCE/DOM/domqco.F90 index 2e981d7101d4fbf796b6fc77039fcbb7cf2f668b..83d424cb6af2b8bb8921c57df825cd2796c3a690 100644 --- a/src/OCE/DOM/domqco.F90 +++ b/src/OCE/DOM/domqco.F90 @@ -118,7 +118,9 @@ CONTAINS ! ! Horizontal interpolation of e3t #if defined key_RK3 CALL dom_qco_r3c( ssh(:,:,Kbb), r3t(:,:,Kbb), r3u(:,:,Kbb), r3v(:,:,Kbb), r3f(:,:) ) - CALL dom_qco_r3c( ssh(:,:,Kmm), r3t(:,:,Kmm), r3u(:,:,Kmm), r3v(:,:,Kmm) ) !!st needed for Agrif_Grid call in nemo_gcm + r3t(:,:,Kmm) = r3t(:,:,Kbb) !!st r3 at Kmm needed to be initialised for Agrid_Grid call in nemo_gcm + r3u(:,:,Kmm) = r3u(:,:,Kbb) !! maybe we only need zeros ??? + r3v(:,:,Kmm) = r3v(:,:,Kbb) #else CALL dom_qco_r3c( ssh(:,:,Kbb), r3t(:,:,Kbb), r3u(:,:,Kbb), r3v(:,:,Kbb) ) CALL dom_qco_r3c( ssh(:,:,Kmm), r3t(:,:,Kmm), r3u(:,:,Kmm), r3v(:,:,Kmm), r3f(:,:) ) diff --git a/src/OCE/nemogcm.F90 b/src/OCE/nemogcm.F90 index dc97bf36affec4468b12414fb659dc4ffb4376d8..deab2b74e83379dd037b0e4049a22cbd8fbdd888 100644 --- a/src/OCE/nemogcm.F90 +++ b/src/OCE/nemogcm.F90 @@ -125,7 +125,11 @@ CONTAINS CALL nemo_init !== Initialisations ==! ! !-----------------------! #if defined key_agrif +# if defined key_RK3 + Kbb_a = Nbb; Kmm_a = Nbb; Krhs_a = Nrhs ! agrif_oce module copies of time level indices +# else Kbb_a = Nbb; Kmm_a = Nnn; Krhs_a = Nrhs ! agrif_oce module copies of time level indices +# endif CALL Agrif_Declare_Var ! " " " " " DYN/TRA # if defined key_top CALL Agrif_Declare_Var_top ! " " " " " TOP @@ -150,7 +154,11 @@ CONTAINS CALL Agrif_Regrid() ! ! Recursive update from highest nested level to lowest: +# if defined key_RK3 + Kbb_a = Nbb; Kmm_a = Nbb; Krhs_a = Nrhs ! agrif_oce module copies of time level indices +# else Kbb_a = Nbb; Kmm_a = Nnn; Krhs_a = Nrhs ! agrif_oce module copies of time level indices +# endif CALL Agrif_step_child_adj(Agrif_Update_All) CALL Agrif_step_child_adj(Agrif_Check_parent_bat) ! @@ -403,7 +411,11 @@ CONTAINS ! Initialise time level indices Nbb = 1 ; Nnn = 2 ; Naa = 3 ; Nrhs = Naa #if defined key_agrif +# if defined key_RK3 + Kbb_a = Nbb ; Kmm_a = Nbb ; Krhs_a = Nrhs ! agrif_oce module copies of time level indices +# else Kbb_a = Nbb ; Kmm_a = Nnn ; Krhs_a = Nrhs ! agrif_oce module copies of time level indices +# endif #endif ! !-------------------------------! ! ! NEMO general initialization ! diff --git a/src/OCE/stprk3.F90 b/src/OCE/stprk3.F90 index 9b68d341f7f12cf8c7f81805389c652225e7593f..c027b91a4d840644c423f7ed6c80334119809c80 100644 --- a/src/OCE/stprk3.F90 +++ b/src/OCE/stprk3.F90 @@ -74,7 +74,7 @@ CONTAINS #if defined key_agrif IF( nstop > 0 ) RETURN ! avoid to go further if an error was detected during previous time step (child grid) kstp = nit000 + Agrif_Nb_Step() - Kbb_a = Nbb ; Kmm_a = Nnn ; Krhs_a = Nrhs ! agrif_oce module copies of time level indices + Kbb_a = Nbb ; Kmm_a = Nbb ; Krhs_a = Nrhs ! agrif_oce module copies of time level indices IF( lk_agrif_debug ) THEN IF( Agrif_Root() .AND. lwp) WRITE(*,*) '---' IF(lwp) WRITE(*,*) 'Grid Number', Agrif_Fixed(),' time step ', kstp, 'int tstep', Agrif_NbStepint()