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 15058 for NEMO – NEMO

Changeset 15058 for NEMO


Ignore:
Timestamp:
2021-06-25T11:15:15+02:00 (3 years ago)
Author:
clem
Message:

nn_hls=2: repare tiling from my previous commit r15055. But then ww is not defined on the halos and it is needed in traadv. I'll try to find a solution

Location:
NEMO/trunk/src/OCE
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/src/OCE/ASM/asminc.F90

    r15055 r15058  
    822822      ! 
    823823      IF( ln_linssh ) THEN 
    824          DO_2D_OVR( nn_hls, nn_hls, nn_hls, nn_hls ) 
     824         DO_2D_OVR( nn_hls-1, nn_hls, nn_hls-1, nn_hls ) 
    825825            phdivn(ji,jj,1) = phdivn(ji,jj,1) - ssh_iau(ji,jj) / e3t(ji,jj,1,Kmm) * tmask(ji,jj,1) 
    826826         END_2D 
    827827      ELSE 
    828828         ALLOCATE( ztim(A2D(nn_hls)) ) 
    829          DO_2D_OVR( nn_hls, nn_hls, nn_hls, nn_hls ) 
     829         DO_2D_OVR( nn_hls-1, nn_hls, nn_hls-1, nn_hls ) 
    830830            ztim(ji,jj) = ssh_iau(ji,jj) / ( ht(ji,jj) + 1.0 - ssmask(ji,jj) ) 
    831831            DO jk = 1, jpkm1 
  • NEMO/trunk/src/OCE/DYN/divhor.F90

    r15055 r15058  
    7979      ENDIF 
    8080      ! 
    81       DO_3D_OVR( 0, 0, 0, 0, 1, jpkm1 )                                          !==  Horizontal divergence  ==! 
     81      DO_3D_OVR( nn_hls-1, nn_hls, nn_hls-1, nn_hls, 1, jpkm1 )                                          !==  Horizontal divergence  ==! 
    8282         ! round brackets added to fix the order of floating point operations 
    8383         ! needed to ensure halo 1 - halo 2 compatibility 
     
    9090            &             )  * r1_e1e2t(ji,jj) / e3t(ji,jj,jk,Kmm) 
    9191      END_3D 
    92       CALL lbc_lnk( 'divhor', hdiv, 'T', 1.0_wp )   !   (no sign change) 
    93       !                                             ! needed for ww 
    9492      ! 
    9593      IF( ln_rnf )   CALL sbc_rnf_div( hdiv, Kmm )                               !==  runoffs    ==!   (update hdiv field) 
     
    10199      IF( ln_isf )                      CALL isf_hdiv( kt, Kmm, hdiv )           !==  ice shelf         ==!   (update hdiv field) 
    102100      ! 
     101      IF( nn_hls==1 )   CALL lbc_lnk( 'divhor', hdiv, 'T', 1.0_wp )   !   (no sign change) 
     102      !                                                               ! needed for ww in sshwzv 
    103103      IF( ln_timing )   CALL timing_stop('div_hor') 
    104104      ! 
  • NEMO/trunk/src/OCE/DYN/sshwzv.F90

    r15055 r15058  
    182182            ! horizontal divergence of thickness diffusion transport ( velocity multiplied by e3t) 
    183183            ! - ML - note: computation already done in dom_vvl_sf_nxt. Could be optimized (not critical and clearer this way) 
    184             DO_2D( 0, 0, 0, 0 ) 
     184            DO_2D( nn_hls-1, nn_hls, nn_hls-1, nn_hls ) 
    185185               zhdiv(ji,jj,jk) = r1_e1e2t(ji,jj) * ( un_td(ji,jj,jk) - un_td(ji-1,jj,jk) + vn_td(ji,jj,jk) - vn_td(ji,jj-1,jk) ) 
    186186            END_2D 
    187187         END DO 
    188          CALL lbc_lnk('sshwzv', zhdiv, 'T', 1.0_wp)  ! - ML - Perhaps not necessary: not used for horizontal "connexions" 
     188         IF( nn_hls == 1)   CALL lbc_lnk('sshwzv', zhdiv, 'T', 1.0_wp)  ! - ML - Perhaps not necessary: not used for horizontal "connexions" 
    189189         !                             ! Is it problematic to have a wrong vertical velocity in boundary cells? 
    190190         !                             ! Same question holds for hdiv. Perhaps just for security 
    191191         !                             ! clem: yes it is a problem because ww is used in many other places where we need the halos 
    192192         ! 
    193          DO_3DS( nn_hls, nn_hls, nn_hls, nn_hls, jpkm1, 1, -1 )         ! integrate from the bottom the hor. divergence 
     193         DO_3DS( nn_hls-1, nn_hls, nn_hls-1, nn_hls, jpkm1, 1, -1 )     ! integrate from the bottom the hor. divergence 
    194194            ! computation of w 
    195195            pww(ji,jj,jk) = pww(ji,jj,jk+1) - (   e3t(ji,jj,jk,Kmm) * hdiv(ji,jj,jk)   & 
     
    203203      ELSEIF( ln_linssh )   THEN                      !==  linear free surface cases  ==! 
    204204         !                                            !=================================! 
    205          DO_3DS( nn_hls, nn_hls, nn_hls, nn_hls, jpkm1, 1, -1 )         ! integrate from the bottom the hor. divergence 
     205         DO_3DS( nn_hls-1, nn_hls, nn_hls-1, nn_hls, jpkm1, 1, -1 )     ! integrate from the bottom the hor. divergence 
    206206            pww(ji,jj,jk) = pww(ji,jj,jk+1) - (  e3t(ji,jj,jk,Kmm) * hdiv(ji,jj,jk)  ) * tmask(ji,jj,jk) 
    207207         END_3D 
     
    209209      ELSE                                            !==  Quasi-Eulerian vertical coordinate  ==!   ('key_qco') 
    210210         !                                            !==========================================! 
    211          DO_3DS( nn_hls, nn_hls, nn_hls, nn_hls, jpkm1, 1, -1 )         ! integrate from the bottom the hor. divergence 
     211         DO_3DS( nn_hls-1, nn_hls, nn_hls-1, nn_hls, jpkm1, 1, -1 )     ! integrate from the bottom the hor. divergence 
    212212            pww(ji,jj,jk) = pww(ji,jj,jk+1) - (  e3t(ji,jj,jk,Kmm) * hdiv(ji,jj,jk)    & 
    213213               &                                 + r1_Dt * (  e3t(ji,jj,jk,Kaa)        & 
     
    218218      IF( ln_bdy ) THEN 
    219219         DO jk = 1, jpkm1 
    220             DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
     220            DO_2D( nn_hls-1, nn_hls, nn_hls-1, nn_hls ) 
    221221               pww(ji,jj,jk) = pww(ji,jj,jk) * bdytmask(ji,jj) 
    222222            END_2D 
  • NEMO/trunk/src/OCE/ISF/isfhdiv.F90

    r15055 r15058  
    9797      ! 
    9898      ! compute integrated divergence correction 
    99       DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
     99      DO_2D( nn_hls-1, nn_hls, nn_hls-1, nn_hls ) 
    100100         zhdiv(ji,jj) = 0.5_wp * ( pfwf(ji,jj) + pfwf_b(ji,jj) ) * r1_rho0 / phtbl(ji,jj) 
    101101      END_2D 
    102102      ! 
    103103      ! update divergence at each level affected by ice shelf top boundary layer 
    104       DO_2D_OVR( nn_hls, nn_hls, nn_hls, nn_hls ) 
     104      DO_2D_OVR( nn_hls-1, nn_hls, nn_hls-1, nn_hls ) 
    105105         ikt = ktop(ji,jj) 
    106106         ikb = kbot(ji,jj) 
     
    136136      !!---------------------------------------------------------------------- 
    137137      ! 
    138       DO_3D_OVR( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpk ) 
     138      DO_3D_OVR( nn_hls-1, nn_hls, nn_hls-1, nn_hls, 1, jpk ) 
    139139         phdiv(ji,jj,jk) =  phdiv(ji,jj,jk) + pqvol(ji,jj,jk) * r1_e1e2t(ji,jj)   & 
    140140            &                             / e3t(ji,jj,jk,Kmm) 
  • NEMO/trunk/src/OCE/SBC/sbcrnf.F90

    r15055 r15058  
    211211      IF( ln_rnf_depth .OR. ln_rnf_depth_ini ) THEN      !==   runoff distributed over several levels   ==! 
    212212         IF( ln_linssh ) THEN    !* constant volume case : just apply the runoff input flow 
    213             DO_2D_OVR( nn_hls, nn_hls, nn_hls, nn_hls ) 
     213            DO_2D_OVR( nn_hls-1, nn_hls, nn_hls-1, nn_hls ) 
    214214               DO jk = 1, nk_rnf(ji,jj) 
    215215                  phdivn(ji,jj,jk) = phdivn(ji,jj,jk) - ( rnf(ji,jj) + rnf_b(ji,jj) ) * zfact * r1_rho0 / h_rnf(ji,jj) 
     
    222222                  h_rnf(ji,jj) = h_rnf(ji,jj) + e3t(ji,jj,jk,Kmm)   ! to the bottom of the relevant grid box 
    223223               END DO 
    224                !                          ! apply the runoff input flow 
     224            END_2D 
     225            DO_2D_OVR( nn_hls-1, nn_hls, nn_hls-1, nn_hls )         ! apply the runoff input flow 
    225226               DO jk = 1, nk_rnf(ji,jj) 
    226227                  phdivn(ji,jj,jk) = phdivn(ji,jj,jk) - ( rnf(ji,jj) + rnf_b(ji,jj) ) * zfact * r1_rho0 / h_rnf(ji,jj) 
     
    231232         DO_2D_OVR( nn_hls, nn_hls, nn_hls, nn_hls ) 
    232233            h_rnf (ji,jj)   = e3t (ji,jj,1,Kmm)        ! update h_rnf to be depth of top box 
     234         END_2D 
     235         DO_2D_OVR( nn_hls-1, nn_hls, nn_hls-1, nn_hls ) 
    233236            phdivn(ji,jj,1) = phdivn(ji,jj,1) - ( rnf(ji,jj) + rnf_b(ji,jj) ) * zfact * r1_rho0 / e3t(ji,jj,1,Kmm) 
    234237         END_2D 
Note: See TracChangeset for help on using the changeset viewer.