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 10928 for NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/DYN/divhor.F90 – NEMO

Ignore:
Timestamp:
2019-05-03T17:44:56+02:00 (5 years ago)
Author:
davestorkey
Message:

2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps : Finish converting DYN module, including some updates to previously processed modules, but excluding dynnxt.F90 (which needs to be completely rewritten) and wet_dry.F90 - I need to talk to Enda about this.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/DYN/divhor.F90

    r10922 r10928  
    5555      !! 
    5656      !! ** Method  :   the now divergence is computed as : 
    57       !!         hdivn = 1/(e1e2t*e3t) ( di[e2u*e3u un] + dj[e1v*e3v vn] ) 
     57      !!         hdiv = 1/(e1e2t*e3t) ( di[e2u*e3u un] + dj[e1v*e3v vn] ) 
    5858      !!      and correct with runoff inflow (div_rnf) and cross land flow (div_cla)  
    5959      !! 
    60       !! ** Action  : - update hdivn, the now horizontal divergence 
     60      !! ** Action  : - update hdiv, the now horizontal divergence 
    6161      !!---------------------------------------------------------------------- 
    6262      INTEGER, INTENT(in) ::   kt   ! ocean time-step index 
    63       INTEGER, INTENT(in) ::   Kmm  ! ocean time-level index 
     63      INTEGER, INTENT(in) ::   Kmm  ! ocean time level index 
    6464      ! 
    6565      INTEGER  ::   ji, jj, jk    ! dummy loop indices 
     
    7878         DO jj = 2, jpjm1 
    7979            DO ji = fs_2, fs_jpim1   ! vector opt. 
    80                hdivn(ji,jj,jk) = (  e2u(ji  ,jj) * e3u_n(ji  ,jj,jk) * un(ji  ,jj,jk)      & 
    81                   &               - e2u(ji-1,jj) * e3u_n(ji-1,jj,jk) * un(ji-1,jj,jk)      & 
    82                   &               + e1v(ji,jj  ) * e3v_n(ji,jj  ,jk) * vn(ji,jj  ,jk)      & 
    83                   &               - e1v(ji,jj-1) * e3v_n(ji,jj-1,jk) * vn(ji,jj-1,jk)  )   & 
    84                   &            * r1_e1e2t(ji,jj) / e3t_n(ji,jj,jk) 
     80               hdiv(ji,jj,jk) = (  e2u(ji  ,jj) * e3u(ji  ,jj,jk,Kmm) * uu(ji  ,jj,jk,Kmm)      & 
     81                  &               - e2u(ji-1,jj) * e3u(ji-1,jj,jk,Kmm) * uu(ji-1,jj,jk,Kmm)      & 
     82                  &               + e1v(ji,jj  ) * e3v(ji,jj  ,jk,Kmm) * vv(ji,jj  ,jk,Kmm)      & 
     83                  &               - e1v(ji,jj-1) * e3v(ji,jj-1,jk,Kmm) * vv(ji,jj-1,jk,Kmm)  )   & 
     84                  &            * r1_e1e2t(ji,jj) / e3t(ji,jj,jk,Kmm) 
    8585            END DO   
    8686         END DO   
     
    8888#if defined key_agrif 
    8989      IF( .NOT. Agrif_Root() ) THEN 
    90          IF( nbondi == -1 .OR. nbondi == 2 )   hdivn(   2   ,  :   ,:) = 0._wp      ! west 
    91          IF( nbondi ==  1 .OR. nbondi == 2 )   hdivn( nlci-1,  :   ,:) = 0._wp      ! east 
    92          IF( nbondj == -1 .OR. nbondj == 2 )   hdivn(   :   ,  2   ,:) = 0._wp      ! south 
    93          IF( nbondj ==  1 .OR. nbondj == 2 )   hdivn(   :   ,nlcj-1,:) = 0._wp      ! north 
     90         IF( nbondi == -1 .OR. nbondi == 2 )   hdiv(   2   ,  :   ,:) = 0._wp      ! west 
     91         IF( nbondi ==  1 .OR. nbondi == 2 )   hdiv( nlci-1,  :   ,:) = 0._wp      ! east 
     92         IF( nbondj == -1 .OR. nbondj == 2 )   hdiv(   :   ,  2   ,:) = 0._wp      ! south 
     93         IF( nbondj ==  1 .OR. nbondj == 2 )   hdiv(   :   ,nlcj-1,:) = 0._wp      ! north 
    9494      ENDIF 
    9595#endif 
    9696      ! 
    97       IF( ln_rnf )   CALL sbc_rnf_div( hdivn, Kmm )                     !==  runoffs    ==!   (update hdivn field) 
     97      IF( ln_rnf )   CALL sbc_rnf_div( hdiv, Kmm )                     !==  runoffs    ==!   (update hdiv field) 
    9898      ! 
    9999#if defined key_asminc  
    100       IF( ln_sshinc .AND. ln_asmiau )   CALL ssh_asm_div( kt, hdivn )   !==  SSH assimilation  ==!   (update hdivn field) 
     100      IF( ln_sshinc .AND. ln_asmiau )   CALL ssh_asm_div( kt, hdiv )   !==  SSH assimilation  ==!   (update hdiv field) 
    101101      !  
    102102#endif 
    103       IF( ln_isf )   CALL sbc_isf_div( hdivn, Kmm )                     !==  ice shelf  ==!   (update hdivn field) 
     103      IF( ln_isf )   CALL sbc_isf_div( hdiv, Kmm )                     !==  ice shelf  ==!   (update hdiv field) 
    104104      ! 
    105       IF( ln_iscpl .AND. ln_hsb )   CALL iscpl_div( hdivn )             !==  ice sheet  ==!   (update hdivn field) 
     105      IF( ln_iscpl .AND. ln_hsb )   CALL iscpl_div( hdiv ) !==  ice sheet  ==!   (update hdiv field) 
    106106      ! 
    107       CALL lbc_lnk( 'divhor', hdivn, 'T', 1. )   !   (no sign change) 
     107      CALL lbc_lnk( 'divhor', hdiv, 'T', 1. )   !   (no sign change) 
    108108      ! 
    109109      IF( ln_timing )   CALL timing_stop('div_hor') 
Note: See TracChangeset for help on using the changeset viewer.