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.
Changeset 14644 for NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/stpmlf.F90 – NEMO

Ignore:
Timestamp:
2021-03-26T15:33:49+01:00 (3 years ago)
Author:
sparonuz
Message:

Merge trunk -r14642:HEAD

Location:
NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final

    • Property svn:externals
      •  

        old new  
        99 
        1010# SETTE 
        11 ^/utils/CI/sette_wave@13990         sette 
         11^/utils/CI/sette@14244        sette 
  • NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/stpmlf.F90

    r14286 r14644  
    3535   !!            4.x  !  2020-08  (S. Techene, G. Madec)  quasi eulerian coordinate time stepping 
    3636   !!---------------------------------------------------------------------- 
    37  
    3837#if defined key_qco   ||   defined key_linssh 
    3938   !!---------------------------------------------------------------------- 
     
    4241   !!   'key_linssh                       Fixed in time vertical coordinate 
    4342   !!---------------------------------------------------------------------- 
    44  
     43   !! 
    4544   !!---------------------------------------------------------------------- 
    4645   !!   stp_MLF       : NEMO modified Leap Frog time-stepping with qco or linssh 
     
    4948   ! 
    5049   USE domqco         ! quasi-eulerian coordinate 
    51    USE traatf_qco     ! time filtering                   (tra_atf_qco routine) 
    52    USE dynatf_qco     ! time filtering                   (dyn_atf_qco routine) 
    53     
    54    USE bdydyn         ! ocean open boundary conditions (define bdy_dyn) 
    55  
    56 #if defined key_agrif 
    57    USE agrif_oce_interp 
    58 #endif 
     50   USE traatf_qco     ! time filtering                 (tra_atf_qco routine) 
     51   USE dynatf_qco     ! time filtering                 (dyn_atf_qco routine) 
    5952 
    6053   IMPLICIT NONE 
    6154   PRIVATE 
    62     
     55 
    6356   PUBLIC   stp_MLF   ! called by nemogcm.F90 
    6457 
     
    6760 
    6861   !! * Substitutions 
     62#  include "do_loop_substitute.h90" 
    6963#  include "domzgr_substitute.h90" 
    7064#  include "single_precision_substitute.h90" 
     65#  include "do_loop_substitute.h90" 
    7166   !!---------------------------------------------------------------------- 
    7267   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
     
    8681      !!                     ***  ROUTINE stp_MLF  *** 
    8782      !! 
    88       !! ** Purpose : - Time stepping of OPA  (momentum and active tracer eqs.) 
     83      !! ** Purpose : - Time stepping of OCE  (momentum and active tracer eqs.) 
    8984      !!              - Time stepping of SI3 (dynamic and thermodynamic eqs.) 
    9085      !!              - Time stepping of TRC  (passive tracer eqs.) 
     
    9994      !!              -8- Outputs and diagnostics 
    10095      !!---------------------------------------------------------------------- 
    101       INTEGER ::   ji, jj, jk   ! dummy loop indice 
    102       INTEGER ::   indic        ! error indicator if < 0 
    103       REAL(wp),              DIMENSION(jpi,jpj,jpk) ::   zgdept 
    104       REAL(wp), ALLOCATABLE, DIMENSION(:,:)         ::   zssh_f 
     96      INTEGER ::   ji, jj, jk, jtile   ! dummy loop indice 
     97      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::   zgdept 
    10598      !! --------------------------------------------------------------------- 
    10699#if defined key_agrif 
     100      IF( nstop > 0 ) RETURN   ! avoid to go further if an error was detected during previous time step (child grid) 
    107101      kstp = nit000 + Agrif_Nb_Step() 
    108102      Kbb_a = Nbb; Kmm_a = Nnn; Krhs_a = Nrhs   ! agrif_oce module copies of time level indices 
     
    112106      ENDIF 
    113107      IF( kstp == nit000 + 1 )   lk_agrif_fstep = .FALSE. 
    114 # if defined key_iomput 
     108# if defined key_xios 
    115109      IF( Agrif_Nbstepint() == 0 )   CALL iom_swap( cxios_context ) 
    116110# endif 
     
    131125      ! update I/O and calendar 
    132126      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    133                              indic = 0                ! reset to no error condition 
    134  
     127      ! 
    135128      IF( kstp == nit000 ) THEN                       ! initialize IOM context (must be done after nemo_init for AGRIF+XIOS+OASIS) 
    136                              CALL iom_init( cxios_context, ld_closedef=.FALSE. )   ! for model grid (including passible AGRIF zoom) 
     129                             CALL iom_init( cxios_context, ld_closedef=.FALSE. )   ! for model grid (including possible AGRIF zoom) 
    137130         IF( lk_diamlr   )   CALL dia_mlr_iom_init    ! with additional setup for multiple-linear-regression analysis 
    138131                             CALL iom_init_closedef 
    139132         IF( ln_crs      )   CALL iom_init( TRIM(cxios_context)//"_crs" )  ! for coarse grid 
     133      ENDIF 
     134      IF( kstp == nitrst .AND. lwxios ) THEN 
     135                             CALL iom_swap(                     cw_ocerst_cxt ) 
     136                             CALL iom_init_closedef(            cw_ocerst_cxt ) 
     137                             CALL iom_setkt( kstp - nit000 + 1, cw_ocerst_cxt ) 
     138#if defined key_top 
     139                             CALL iom_swap(                     cw_toprst_cxt ) 
     140                             CALL iom_init_closedef(            cw_toprst_cxt ) 
     141                             CALL iom_setkt( kstp - nit000 + 1, cw_toprst_cxt ) 
     142#endif 
     143      ENDIF 
     144      IF( kstp + nn_fsbc - 1 == nitrst .AND. lwxios ) THEN 
     145#if defined key_si3 
     146                             CALL iom_swap(                     cw_icerst_cxt ) 
     147                             CALL iom_init_closedef(            cw_icerst_cxt ) 
     148                             CALL iom_setkt( kstp - nit000 + 1, cw_icerst_cxt ) 
     149#endif 
     150         IF( ln_abl      ) THEN 
     151                             CALL iom_swap(                     cw_ablrst_cxt ) 
     152                             CALL iom_init_closedef(            cw_ablrst_cxt ) 
     153                             CALL iom_setkt( kstp - nit000 + 1, cw_ablrst_cxt ) 
     154         ENDIF 
    140155      ENDIF 
    141156      IF( kstp /= nit000 )   CALL day( kstp )         ! Calendar (day was already called at nit000 in day_init) 
     
    155170      ! Update stochastic parameters and random T/S fluctuations 
    156171      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    157       IF( ln_sto_eos ) CALL sto_par( kstp )          ! Stochastic parameters 
    158       IF( ln_sto_eos ) CALL sto_pts( ts(:,:,:,:,Nnn)  )          ! Random T/S fluctuations 
     172      IF( ln_sto_eos )   CALL sto_par( kstp )                         ! Stochastic parameters 
     173      IF( ln_sto_eos )   CALL sto_pts( ts(:,:,:,:,Nnn)  )             ! Random T/S fluctuations 
    159174 
    160175      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    195210      !  Ocean dynamics : hdiv, ssh, e3, u, v, w 
    196211      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    197       DO jk = 1, jpk 
    198          zgdept(:,:,jk) = gdept(:,:,jk,Nnn) 
    199       END DO 
    200                             CALL ssh_nxt    ( kstp, Nbb, Nnn, ssh,  Naa )   ! after ssh (includes call to div_hor) 
    201       IF( .NOT.lk_linssh )  THEN 
    202                              CALL dom_qco_r3c( CASTWP(ssh(:,:,Naa)), r3t(:,:,Naa), r3u(:,:,Naa), r3v(:,:,Naa)           )   ! "after" ssh/h_0 ratio at t,u,v pts 
    203          IF( ln_dynspg_exp ) CALL dom_qco_r3c( CASTWP(ssh(:,:,Nnn)), r3t(:,:,Nnn), r3u(:,:,Nnn), r3v(:,:,Nnn), r3f(:,:) )   ! spg_exp : needed only for "now" ssh/h_0 ratio at f point 
    204       ENDIF 
    205                             CALL wzv        ( kstp, Nbb, Nnn, Naa, ww  )    ! Nnn cross-level velocity 
    206       IF( ln_zad_Aimp )     CALL wAimp      ( kstp,      Nnn           )    ! Adaptive-implicit vertical advection partitioning 
    207                             CALL eos        ( CASTWP(ts(:,:,:,:,Nnn)), rhd, rhop, zgdept ) ! now in situ density for hpg computation 
    208  
     212       
     213                         CALL ssh_nxt    ( kstp, Nbb, Nnn, ssh,  Naa )   ! after ssh (includes call to div_hor) 
     214      IF( .NOT.lk_linssh ) THEN 
     215                         CALL dom_qco_r3c( CASTWP(ssh(:,:,Naa)), r3t(:,:,Naa), r3u(:,:,Naa), r3v(:,:,Naa)           )   ! "after" ssh/h_0 ratio at t,u,v pts 
     216         IF( ln_dynspg_exp )   & 
     217            &            CALL dom_qco_r3c( CASTWP(ssh(:,:,Nnn)), r3t(:,:,Nnn), r3u(:,:,Nnn), r3v(:,:,Nnn), r3f(:,:) )   ! spg_exp : needed only for "now" ssh/h_0 ratio at f point 
     218      ENDIF 
     219                         CALL wzv        ( kstp, Nbb, Nnn, Naa, ww  )    ! Nnn cross-level velocity 
     220      IF( ln_zad_Aimp )  CALL wAimp      ( kstp,      Nnn           )    ! Adaptive-implicit vertical advection partitioning 
     221                         ALLOCATE( zgdept(jpi,jpj,jpk) ) 
     222                         DO jk = 1, jpk 
     223                            zgdept(:,:,jk) = gdept(:,:,jk,Nnn) 
     224                         END DO 
     225                         CALL eos        ( CASTWP(ts(:,:,:,:,Nnn)), rhd, rhop, zgdept ) ! now in situ density for hpg computation 
     226                         DEALLOCATE( zgdept ) 
    209227 
    210228                         uu(:,:,:,Nrhs) = 0._wp            ! set dynamics trends to zero 
     
    224242                         CALL dyn_hpg( kstp,      Nnn      , uu, vv, Nrhs )  ! horizontal gradient of Hydrostatic pressure 
    225243                         CALL dyn_spg( kstp, Nbb, Nnn, Nrhs, uu, vv, ssh, uu_b, vv_b, Naa )  ! surface pressure gradient 
    226                                                       ! With split-explicit free surface, since now transports have been updated and ssh(:,:,Nrhs) as well 
    227  
    228       IF( ln_dynspg_ts ) THEN                         ! vertical scale factors and vertical velocity need to be updated 
     244                          
     245      IF( ln_dynspg_ts ) THEN      ! With split-explicit free surface, since now transports have been updated and ssh(:,:,Nrhs) 
     246                                   ! as well as vertical scale factors and vertical velocity need to be updated 
    229247                            CALL div_hor    ( kstp, Nbb, Nnn )                ! Horizontal divergence  (2nd call in time-split case) 
    230          IF(.NOT.lk_linssh) CALL dom_qco_r3c ( CASTWP(ssh(:,:,Naa)), r3t(:,:,Naa), r3u(:,:,Naa), r3v(:,:,Naa), r3f(:,:) )   ! update ssh/h_0 ratio at t,u,v,f pts  
     248         IF(.NOT.lk_linssh) CALL dom_qco_r3c( CASTWP(ssh(:,:,Naa)), r3t(:,:,Naa), r3u(:,:,Naa), r3v(:,:,Naa), r3f(:,:) )   ! update ssh/h_0 ratio at t,u,v,f pts  
    231249      ENDIF 
    232250                            CALL dyn_zdf    ( kstp, Nbb, Nnn, Nrhs, uu, vv, Naa  )  ! vertical diffusion 
     
    271289      ! Active tracers 
    272290      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    273                          ts(:,:,:,:,Nrhs) = 0._wp         ! set tracer trends to zero 
    274  
    275       IF(  lk_asminc .AND. ln_asmiau .AND. & 
    276          & ln_trainc )   CALL tra_asm_inc( kstp, Nbb, Nnn, ts, Nrhs )  ! apply tracer assimilation increment 
    277                          CALL tra_sbc    ( kstp,      Nnn, ts, Nrhs )  ! surface boundary condition 
    278       IF( ln_traqsr  )   CALL tra_qsr    ( kstp,      Nnn, ts, Nrhs )  ! penetrative solar radiation qsr 
    279       IF( ln_isf     )   CALL tra_isf    ( kstp,      Nnn, ts, Nrhs )  ! ice shelf heat flux 
    280       IF( ln_trabbc  )   CALL tra_bbc    ( kstp,      Nnn, ts, Nrhs )  ! bottom heat flux 
    281       IF( ln_trabbl  )   CALL tra_bbl    ( kstp, Nbb, Nnn, ts, Nrhs )  ! advective (and/or diffusive) bottom boundary layer scheme 
    282       IF( ln_tradmp  )   CALL tra_dmp    ( kstp, Nbb, Nnn, ts, Nrhs )  ! internal damping trends 
    283       IF( ln_bdy     )   CALL bdy_tra_dmp( kstp, Nbb,      ts, Nrhs )  ! bdy damping trends 
    284 #if defined key_agrif 
    285       IF(.NOT. Agrif_Root())  & 
    286                &         CALL Agrif_Sponge_tra        ! tracers sponge 
    287 #endif 
    288                          CALL tra_adv    ( kstp, Nbb, Nnn, ts, Nrhs )  ! hor. + vert. advection ==> RHS 
    289       IF( ln_zdfosm  )   CALL tra_osm    ( kstp,      Nnn, ts, Nrhs )  ! OSMOSIS non-local tracer fluxes ==> RHS 
    290       IF( lrst_oce .AND. ln_zdfosm ) & 
    291            &             CALL osm_rst    ( kstp,      Nnn, 'WRITE'  )  ! write OSMOSIS outputs + ww (so must do here) to restarts 
    292                          CALL tra_ldf    ( kstp, Nbb, Nnn, ts, Nrhs )  ! lateral mixing 
    293  
    294                          CALL tra_zdf    ( kstp, Nbb, Nnn, Nrhs, ts, Naa  )  ! vertical mixing and after tracer fields 
    295       IF( ln_zdfnpc  )   CALL tra_npc    ( kstp,      Nnn, Nrhs, ts, Naa  )  ! update after fields by non-penetrative convection 
    296  
     291      ! Loop over tile domains 
     292      DO jtile = 1, nijtile 
     293         IF( ln_tile    )   CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = jtile ) 
     294 
     295         DO_3D( 0, 0, 0, 0, 1, jpk ) 
     296            ts(ji,jj,jk,:,Nrhs) = 0._wp                                   ! set tracer trends to zero 
     297         END_3D 
     298 
     299         IF(  lk_asminc .AND. ln_asmiau .AND. & 
     300            & ln_trainc )   CALL tra_asm_inc( kstp, Nbb, Nnn, ts, Nrhs )  ! apply tracer assimilation increment 
     301                            CALL tra_sbc    ( kstp,      Nnn, ts, Nrhs )  ! surface boundary condition 
     302         IF( ln_traqsr  )   CALL tra_qsr    ( kstp,      Nnn, ts, Nrhs )  ! penetrative solar radiation qsr 
     303         IF( ln_isf     )   CALL tra_isf    ( kstp,      Nnn, ts, Nrhs )  ! ice shelf heat flux 
     304         IF( ln_trabbc  )   CALL tra_bbc    ( kstp,      Nnn, ts, Nrhs )  ! bottom heat flux 
     305         IF( ln_trabbl  )   CALL tra_bbl    ( kstp, Nbb, Nnn, ts, Nrhs )  ! advective (and/or diffusive) bottom boundary layer scheme 
     306         IF( ln_tradmp  )   CALL tra_dmp    ( kstp, Nbb, Nnn, ts, Nrhs )  ! internal damping trends 
     307         IF( ln_bdy     )   CALL bdy_tra_dmp( kstp, Nbb,      ts, Nrhs )  ! bdy damping trends 
     308      END DO 
     309 
     310#if defined key_agrif 
     311      IF(.NOT. Agrif_Root() ) THEN 
     312         IF( ln_tile    )   CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = 0 ) 
     313                            CALL Agrif_Sponge_tra        ! tracers sponge 
     314      ENDIF 
     315#endif 
     316 
     317      ! TEMP: [tiling] Separate loop over tile domains (due to tra_adv workarounds for tiling) 
     318      DO jtile = 1, nijtile 
     319         IF( ln_tile    )   CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = jtile ) 
     320 
     321                            CALL tra_adv    ( kstp, Nbb, Nnn, ts, Nrhs )  ! hor. + vert. advection ==> RHS 
     322         IF( ln_zdfmfc  )   CALL tra_mfc    ( kstp, Nbb,      ts, Nrhs )  ! Mass Flux Convection 
     323         IF( ln_zdfosm  ) THEN 
     324                            CALL tra_osm    ( kstp,      Nnn, ts, Nrhs )  ! OSMOSIS non-local tracer fluxes ==> RHS 
     325            IF( lrst_oce )  CALL osm_rst    ( kstp,      Nnn, 'WRITE'  )  ! write OSMOSIS outputs + ww (so must do here) to restarts 
     326         ENDIF 
     327                            CALL tra_ldf    ( kstp, Nbb, Nnn, ts, Nrhs )  ! lateral mixing 
     328 
     329                            CALL tra_zdf    ( kstp, Nbb, Nnn, Nrhs, ts, Naa  )  ! vertical mixing and after tracer fields 
     330         IF( ln_zdfnpc  )   CALL tra_npc    ( kstp,      Nnn, Nrhs, ts, Naa  )  ! update after fields by non-penetrative convection 
     331      END DO 
     332 
     333      IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = 0 ) ! Revert to tile over full domain 
    297334      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    298335      ! Set boundary conditions, time filter and swap time levels 
     
    320357                         r3v(:,:,Nnn) = r3v_f(:,:) 
    321358      ENDIF 
    322  
    323359      ! 
    324360      ! Swap time levels 
     
    341377#if defined key_agrif 
    342378      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    343       ! AGRIF 
     379      ! AGRIF recursive integration 
    344380      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    345381                         Kbb_a = Nbb; Kmm_a = Nnn; Krhs_a = Nrhs      ! agrif_oce module copies of time level indices 
    346382                         CALL Agrif_Integrate_ChildGrids( stp_MLF )       ! allows to finish all the Child Grids before updating 
    347383 
    348                          IF( Agrif_NbStepint() == 0 ) THEN 
    349                             CALL Agrif_update_all( )                  ! Update all components 
    350                          ENDIF 
    351 #endif 
    352       IF( ln_diaobs  )   CALL dia_obs      ( kstp, Nnn )      ! obs-minus-model (assimilation) diagnostics (call after dynamics update) 
    353  
     384#endif 
    354385      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    355386      ! Control 
     
    357388                         CALL stp_ctl      ( kstp, Nnn ) 
    358389 
     390#if defined key_agrif 
     391      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     392      ! AGRIF update 
     393      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
     394      IF( Agrif_NbStepint() == 0 .AND. nstop == 0 )   & 
     395         &               CALL Agrif_update_all( )                  ! Update all components 
     396 
     397#endif 
     398      IF( ln_diaobs .AND. nstop == 0 )   & 
     399         &               CALL dia_obs( kstp, Nnn )  ! obs-minus-model (assimilation) diags (after dynamics update) 
     400 
     401      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     402      ! File manipulation at the end of the first time step 
     403      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    359404      IF( kstp == nit000 ) THEN                          ! 1st time step only 
    360405                                        CALL iom_close( numror )   ! close input  ocean restart file 
     406         IF( lrxios )                   CALL iom_context_finalize( cr_ocerst_cxt ) 
    361407         IF(lwm)                        CALL FLUSH    ( numond )   ! flush output namelist oce 
    362408         IF(lwm .AND. numoni /= -1 )    CALL FLUSH    ( numoni )   ! flush output namelist ice (if exist) 
     
    366412      ! Coupled mode 
    367413      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    368 !!gm why lk_oasis and not lk_cpl ???? 
    369       IF( lk_oasis   )   CALL sbc_cpl_snd( kstp, Nbb, Nnn )        ! coupled mode : field exchanges 
    370       ! 
    371 #if defined key_iomput 
    372       IF( kstp == nitend .OR. indic < 0 ) THEN 
     414      IF( lk_oasis .AND. nstop == 0 )   CALL sbc_cpl_snd( kstp, Nbb, Nnn )     ! coupled mode : field exchanges 
     415      ! 
     416#if defined key_xios 
     417      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     418      ! Finalize contextes if end of simulation or error detected 
     419      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
     420      IF( kstp == nitend .OR. nstop > 0 ) THEN 
    373421                      CALL iom_context_finalize(      cxios_context          ) ! needed for XIOS+AGRIF 
    374422         IF( ln_crs ) CALL iom_context_finalize( trim(cxios_context)//"_crs" ) ! 
     
    377425      ! 
    378426      IF( l_1st_euler ) THEN         ! recover Leap-frog timestep 
    379          rDt   = 2._wp * rn_Dt    
     427         rDt   = 2._wp * rn_Dt 
    380428         r1_Dt = 1._wp / rDt 
    381          l_1st_euler = .FALSE.       
     429         l_1st_euler = .FALSE. 
    382430      ENDIF 
    383431      ! 
     
    448496      !! ** Action :   puu(Kaa),pvv(Kaa)   after horizontal velocity and tracers 
    449497      !!---------------------------------------------------------------------- 
     498#if defined key_agrif 
     499      USE agrif_oce_interp 
     500#endif 
     501      USE bdydyn         ! ocean open boundary conditions (define bdy_dyn) 
     502      !! 
    450503      INTEGER                                  , INTENT(in   ) ::   kt         ! ocean time-step index 
    451504      INTEGER                                  , INTENT(in   ) ::   Kbb, Kaa   ! before and after time level indices 
     
    461514# endif 
    462515      !                                        ! local domain boundaries  (T-point, unchanged sign) 
    463       CALL lbc_lnk_multi( 'finalize_lbc', puu(:,:,:,       Kaa), 'U', -1._wp, pvv(:,:,:       ,Kaa), 'V', -1._wp   & 
    464                        &                , pts(:,:,:,jp_tem,Kaa), 'T',  1._wp, pts(:,:,:,jp_sal,Kaa), 'T',  1._wp ) 
     516      CALL lbc_lnk( 'finalize_lbc', puu(:,:,:,       Kaa), 'U', -1._wp, pvv(:,:,:       ,Kaa), 'V', -1._wp   & 
     517                       &          , pts(:,:,:,jp_tem,Kaa), 'T',  1._wp, pts(:,:,:,jp_sal,Kaa), 'T',  1._wp ) 
    465518      ! 
    466519      !                                        !* BDY open boundaries 
Note: See TracChangeset for help on using the changeset viewer.