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 15055 – NEMO

Changeset 15055


Ignore:
Timestamp:
2021-06-25T00:36:40+02:00 (3 years ago)
Author:
clem
Message:

nn_hls=2: make sure ww is defined on the halos since it is used in several places. So we need to ensure that hdiv is also defined on the halos

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

Legend:

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

    r15023 r15055  
    822822      ! 
    823823      IF( ln_linssh ) THEN 
    824          DO_2D_OVR( nn_hls-1, nn_hls, nn_hls-1, nn_hls ) 
     824         DO_2D_OVR( nn_hls, nn_hls, nn_hls, 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-1, nn_hls, nn_hls-1, nn_hls ) 
     829         DO_2D_OVR( nn_hls, nn_hls, nn_hls, 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

    r14834 r15055  
    7979      ENDIF 
    8080      ! 
    81       DO_3D_OVR( nn_hls-1, nn_hls, nn_hls-1, nn_hls, 1, jpkm1 )                                    !==  Horizontal divergence  ==! 
     81      DO_3D_OVR( 0, 0, 0, 0, 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 
    9294      ! 
    93       IF( ln_rnf )   CALL sbc_rnf_div( hdiv, Kmm )                     !==  runoffs    ==!   (update hdiv field) 
     95      IF( ln_rnf )   CALL sbc_rnf_div( hdiv, Kmm )                               !==  runoffs    ==!   (update hdiv field) 
    9496      ! 
    9597#if defined key_asminc  
     
    99101      IF( ln_isf )                      CALL isf_hdiv( kt, Kmm, hdiv )           !==  ice shelf         ==!   (update hdiv field) 
    100102      ! 
    101       IF (nn_hls==1) CALL lbc_lnk( 'divhor', hdiv, 'T', 1.0_wp )   !   (no sign change) 
    102       ! 
    103103      IF( ln_timing )   CALL timing_stop('div_hor') 
    104104      ! 
  • NEMO/trunk/src/OCE/DYN/sshwzv.F90

    r15004 r15055  
    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( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
     184            DO_2D( 0, 0, 0, 0 ) 
    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          IF (nn_hls==1) CALL lbc_lnk('sshwzv', zhdiv, 'T', 1.0_wp)  ! - ML - Perhaps not necessary: not used for horizontal "connexions" 
     188         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 
    191          DO_3DS( 1, 1, 1, 1, jpkm1, 1, -1 )         ! integrate from the bottom the hor. divergence 
     191         !                             ! clem: yes it is a problem because ww is used in many other places where we need the halos 
     192         ! 
     193         DO_3DS( nn_hls, nn_hls, nn_hls, nn_hls, jpkm1, 1, -1 )         ! integrate from the bottom the hor. divergence 
    192194            ! computation of w 
    193195            pww(ji,jj,jk) = pww(ji,jj,jk+1) - (   e3t(ji,jj,jk,Kmm) * hdiv(ji,jj,jk)   & 
     
    201203      ELSEIF( ln_linssh )   THEN                      !==  linear free surface cases  ==! 
    202204         !                                            !=================================! 
    203          DO_3DS( 1, 1, 1, 1, jpkm1, 1, -1 )                 ! integrate from the bottom the hor. divergence 
     205         DO_3DS( nn_hls, nn_hls, nn_hls, nn_hls, jpkm1, 1, -1 )         ! integrate from the bottom the hor. divergence 
    204206            pww(ji,jj,jk) = pww(ji,jj,jk+1) - (  e3t(ji,jj,jk,Kmm) * hdiv(ji,jj,jk)  ) * tmask(ji,jj,jk) 
    205207         END_3D 
     
    207209      ELSE                                            !==  Quasi-Eulerian vertical coordinate  ==!   ('key_qco') 
    208210         !                                            !==========================================! 
    209          DO_3DS( 1, 1, 1, 1, jpkm1, 1, -1 )                 ! integrate from the bottom the hor. divergence 
     211         DO_3DS( nn_hls, nn_hls, nn_hls, nn_hls, jpkm1, 1, -1 )         ! integrate from the bottom the hor. divergence 
    210212            pww(ji,jj,jk) = pww(ji,jj,jk+1) - (  e3t(ji,jj,jk,Kmm) * hdiv(ji,jj,jk)    & 
    211213               &                                 + r1_Dt * (  e3t(ji,jj,jk,Kaa)        & 
     
    216218      IF( ln_bdy ) THEN 
    217219         DO jk = 1, jpkm1 
    218             pww(:,:,jk) = pww(:,:,jk) * bdytmask(:,:) 
     220            DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
     221               pww(ji,jj,jk) = pww(ji,jj,jk) * bdytmask(ji,jj) 
     222            END_2D 
    219223         END DO 
    220224      ENDIF 
  • NEMO/trunk/src/OCE/ISF/isfhdiv.F90

    r15004 r15055  
    9797      ! 
    9898      ! compute integrated divergence correction 
    99       DO_2D( nn_hls-1, nn_hls, nn_hls-1, nn_hls ) 
     99      DO_2D( nn_hls, nn_hls, nn_hls, 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-1, nn_hls, nn_hls-1, nn_hls ) 
     104      DO_2D_OVR( nn_hls, nn_hls, nn_hls, nn_hls ) 
    105105         ikt = ktop(ji,jj) 
    106106         ikb = kbot(ji,jj) 
     
    136136      !!---------------------------------------------------------------------- 
    137137      ! 
    138       DO_3D_OVR( nn_hls-1, nn_hls, nn_hls-1, nn_hls, 1, jpk ) 
     138      DO_3D_OVR( nn_hls, nn_hls, nn_hls, 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

    r14834 r15055  
    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-1, nn_hls, nn_hls-1, nn_hls ) 
     213            DO_2D_OVR( nn_hls, nn_hls, nn_hls, 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) 
Note: See TracChangeset for help on using the changeset viewer.