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.
Diff from NEMO/branches/2021/dev_r14393_HPC-03_Mele_Comm_Cleanup/src/OCE/step.F90@14757 to NEMO/branches/2021/dev_r14273_HPC-02_Daley_Tiling/src/OCE/step.F90@14787 – NEMO

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2021/dev_r14273_HPC-02_Daley_Tiling/src/OCE/step.F90

    r14757 r14787  
    169169 
    170170      !  VERTICAL PHYSICS 
     171      ! lbc_lnk needed for zdf_sh2 when using nn_hls = 2, moved here to allow tiling in zdf_phy 
     172      IF( nn_hls == 2 .AND. l_zdfsh2 ) CALL lbc_lnk( 'stp', avm_k, 'W', 1.0_wp ) 
     173 
     174      IF( ln_tile ) CALL dom_tile_start         ! [tiling] ZDF tiling loop 
     175      DO jtile = 1, nijtile 
     176         IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = jtile ) 
     177 
    171178                         CALL zdf_phy( kstp, Nbb, Nnn, Nrhs )   ! vertical physics update (top/bot drag, avt, avs, avm + MLD) 
     179      END DO 
     180      IF( ln_tile ) CALL dom_tile_stop 
    172181 
    173182      !  LATERAL  PHYSICS 
     
    176185                         CALL eos( ts(:,:,:,:,Nbb), rhd, gdept_0(:,:,:) )               ! before in situ density 
    177186 
    178          IF( ln_zps .AND. .NOT. ln_isfcav)                                    & 
     187      IF( ln_zps .AND. .NOT. ln_isfcav)                                    & 
    179188            &            CALL zps_hde    ( kstp, Nnn, jpts, ts(:,:,:,:,Nbb), gtsu, gtsv,  &  ! Partial steps: before horizontal gradient 
    180189            &                                          rhd, gru , grv    )       ! of t, s, rd at the last ocean level 
    181190 
    182          IF( ln_zps .AND.       ln_isfcav)                                                & 
     191      IF( ln_zps .AND.       ln_isfcav)                                                & 
    183192            &            CALL zps_hde_isf( kstp, Nnn, jpts, ts(:,:,:,:,Nbb), gtsu, gtsv, gtui, gtvi,  &  ! Partial steps for top cell (ISF) 
    184193            &                                          rhd, gru , grv , grui, grvi   )       ! of t, s, rd at the first ocean level 
     
    208217                         vv(:,:,:,Nrhs) = 0._wp 
    209218 
    210       IF(  lk_asminc .AND. ln_asmiau .AND. ln_dyninc )   & 
    211                &         CALL dyn_asm_inc   ( kstp, Nbb, Nnn, uu, vv, Nrhs )  ! apply dynamics assimilation increment 
    212       IF( ln_bdy     )   CALL bdy_dyn3d_dmp ( kstp, Nbb,      uu, vv, Nrhs )  ! bdy damping trends 
    213 #if defined key_agrif 
     219      IF( ln_tile ) CALL dom_tile_start         ! [tiling] DYN tiling loop (1) 
     220      DO jtile = 1, nijtile 
     221         IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = jtile ) 
     222 
     223         IF(  lk_asminc .AND. ln_asmiau .AND. ln_dyninc )   & 
     224                  &         CALL dyn_asm_inc   ( kstp, Nbb, Nnn, uu, vv, Nrhs )  ! apply dynamics assimilation increment 
     225         IF( ln_bdy     )   CALL bdy_dyn3d_dmp ( kstp, Nbb,      uu, vv, Nrhs )  ! bdy damping trends 
     226#if defined key_agrif 
     227      END DO 
     228      IF( ln_tile ) CALL dom_tile_stop 
     229 
    214230      IF(.NOT. Agrif_Root())  & 
    215231               &         CALL Agrif_Sponge_dyn        ! momentum sponge 
    216 #endif 
    217                          CALL dyn_adv( kstp, Nbb, Nnn      , uu, vv, Nrhs )  ! advection (VF or FF)   ==> RHS 
    218                          CALL dyn_vor( kstp,      Nnn      , uu, vv, Nrhs )  ! vorticity              ==> RHS 
    219                          CALL dyn_ldf( kstp, Nbb, Nnn      , uu, vv, Nrhs )  ! lateral mixing 
    220       IF( ln_zdfosm  )   CALL dyn_osm( kstp,      Nnn      , uu, vv, Nrhs )  ! OSMOSIS non-local velocity fluxes ==> RHS 
    221                          CALL dyn_hpg( kstp,      Nnn      , uu, vv, Nrhs )  ! horizontal gradient of Hydrostatic pressure 
    222                          CALL dyn_spg( kstp, Nbb, Nnn, Nrhs, uu, vv, ssh, uu_b, vv_b, Naa )  ! surface pressure gradient 
     232 
     233      IF( ln_tile ) CALL dom_tile_start         ! [tiling] DYN tiling loop (1, continued) 
     234      DO jtile = 1, nijtile 
     235         IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = jtile ) 
     236#endif 
     237                            CALL dyn_adv( kstp, Nbb, Nnn      , uu, vv, Nrhs )  ! advection (VF or FF)   ==> RHS 
     238                            CALL dyn_vor( kstp,      Nnn      , uu, vv, Nrhs )  ! vorticity              ==> RHS 
     239                            CALL dyn_ldf( kstp, Nbb, Nnn      , uu, vv, Nrhs )  ! lateral mixing 
     240         IF( ln_zdfosm  )   CALL dyn_osm( kstp,      Nnn      , uu, vv, Nrhs )  ! OSMOSIS non-local velocity fluxes ==> RHS 
     241                            CALL dyn_hpg( kstp,      Nnn      , uu, vv, Nrhs )  ! horizontal gradient of Hydrostatic pressure 
     242      END DO 
     243      IF( ln_tile ) CALL dom_tile_stop 
     244 
     245                            CALL dyn_spg( kstp, Nbb, Nnn, Nrhs, uu, vv, ssh, uu_b, vv_b, Naa )  ! surface pressure gradient 
    223246 
    224247                                                      ! With split-explicit free surface, since now transports have been updated and ssh(:,:,Nrhs) as well 
    225248      IF( ln_dynspg_ts ) THEN                         ! vertical scale factors and vertical velocity need to be updated 
    226                             CALL div_hor       ( kstp, Nbb, Nnn )                ! Horizontal divergence  (2nd call in time-split case) 
    227          IF(.NOT.ln_linssh) CALL dom_vvl_sf_nxt( kstp, Nbb, Nnn, Naa, kcall=2 )  ! after vertical scale factors (update depth average component) 
    228       ENDIF 
    229                             CALL dyn_zdf    ( kstp, Nbb, Nnn, Nrhs, uu, vv, Naa  )  ! vertical diffusion 
     249         IF( ln_tile ) CALL dom_tile_start      ! [tiling] DYN tiling loop (2- div_hor only) 
     250         DO jtile = 1, nijtile 
     251            IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = jtile ) 
     252 
     253                             CALL div_hor       ( kstp, Nbb, Nnn )               ! Horizontal divergence  (2nd call in time-split case) 
     254         END DO 
     255         IF( ln_tile ) CALL dom_tile_stop 
     256 
     257         IF(.NOT. ln_linssh) CALL dom_vvl_sf_nxt( kstp, Nbb, Nnn, Naa, kcall=2 )  ! after vertical scale factors (update depth average component) 
     258      ENDIF 
     259 
     260      IF( ln_tile ) CALL dom_tile_start         ! [tiling] DYN tiling loop (3- dyn_zdf only) 
     261      DO jtile = 1, nijtile 
     262         IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = jtile ) 
     263 
     264                               CALL dyn_zdf    ( kstp, Nbb, Nnn, Nrhs, uu, vv, Naa  )  ! vertical diffusion 
     265      END DO 
     266      IF( ln_tile ) CALL dom_tile_stop 
     267 
    230268      IF( ln_dynspg_ts ) THEN                                                       ! vertical scale factors and vertical velocity need to be updated 
    231269                            CALL wzv        ( kstp, Nbb, Nnn, Naa, ww )             ! Nnn cross-level velocity 
     
    263301      ! Active tracers 
    264302      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    265       ! Loop over tile domains 
    266       DO jtile = 1, nijtile 
    267          IF( ln_tile    )   CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = jtile ) 
    268  
    269          DO_3D( 0, 0, 0, 0, 1, jpk ) 
    270             ts(ji,jj,jk,:,Nrhs) = 0._wp                                   ! set tracer trends to zero 
    271          END_3D 
     303                         ts(:,:,:,:,Nrhs) = 0._wp         ! set tracer trends to zero 
     304 
     305      IF( ln_tile ) CALL dom_tile_start         ! [tiling] TRA tiling loop (1) 
     306      DO jtile = 1, nijtile 
     307         IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = jtile ) 
    272308 
    273309         IF(  lk_asminc .AND. ln_asmiau .AND. & 
     
    281317         IF( ln_bdy     )   CALL bdy_tra_dmp( kstp, Nbb,      ts, Nrhs )  ! bdy damping trends 
    282318      END DO 
     319      IF( ln_tile ) CALL dom_tile_stop 
    283320 
    284321#if defined key_agrif 
    285322      IF(.NOT. Agrif_Root() )   THEN 
    286          IF( ln_tile    )   CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = 0 ) 
    287323                            CALL Agrif_Sponge_tra        ! tracers sponge 
    288324      ENDIF 
     
    290326 
    291327      ! TEMP: [tiling] Separate loop over tile domains (due to tra_adv workarounds for tiling) 
    292       DO jtile = 1, nijtile 
    293          IF( ln_tile    )   CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = jtile ) 
     328      IF( ln_tile ) CALL dom_tile_start         ! [tiling] TRA tiling loop (2) 
     329      DO jtile = 1, nijtile 
     330         IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = jtile ) 
    294331 
    295332                            CALL tra_adv    ( kstp, Nbb, Nnn, ts, Nrhs )  ! hor. + vert. advection ==> RHS 
     
    304341         IF( ln_zdfnpc  )   CALL tra_npc    ( kstp,      Nnn, Nrhs, ts, Naa  )  ! update after fields by non-penetrative convection 
    305342      END DO 
    306  
    307       IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = 0 ) ! Revert to tile over full domain 
     343      IF( ln_tile ) CALL dom_tile_stop 
     344 
    308345      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    309346      ! Set boundary conditions, time filter and swap time levels 
Note: See TracChangeset for help on using the changeset viewer.