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 11423 for NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfhdiv.F90 – NEMO

Ignore:
Timestamp:
2019-08-08T16:02:49+02:00 (5 years ago)
Author:
mathiot
Message:

ENHANCE-02_ISF_nemo : add UKESM ice sheet coupling method (ticket #2142)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfhdiv.F90

    r11403 r11423  
    44   USE isf 
    55   USE phycst 
     6   USE in_out_manager 
    67 
    78   IMPLICIT NONE 
     
    1314CONTAINS 
    1415 
    15    SUBROUTINE isf_hdiv( phdiv ) 
     16   SUBROUTINE isf_hdiv( kt, phdiv ) 
    1617      !!---------------------------------------------------------------------- 
    1718      !!                  ***  SUBROUTINE isf_hdiv  *** 
     
    2526      REAL(wp), DIMENSION(:,:,:), INTENT( inout ) ::   phdiv   ! horizontal divergence 
    2627      !!---------------------------------------------------------------------- 
     28      INTEGER, INTENT(in) :: kt 
    2729      ! 
    2830      ! ice shelf cavity contribution 
     
    3335      ! 
    3436      ! ice sheet coupling contribution (if conservation needed) 
    35       !IF ( ln_iscpl_hsb  ) CALL isf_hdiv_cpl(hdiv_iscpl, phdivn) 
     37      IF ( ll_isfcpl ) THEN 
     38         ! 
     39         ! correct divergence only for the first time step 
     40         IF ( kt == nit000 ) CALL isf_hdiv_cpl(risfcpl_vol, phdiv) 
     41         ! 
     42         ! correct divergence every time step to remove any trend due to coupling 
     43         IF ( ll_isfcpl_cons ) CALL isf_hdiv_cpl(risfcpl_cons_vol, phdiv) 
     44         ! 
     45      END IF 
    3646      ! 
    3747   END SUBROUTINE isf_hdiv 
     
    8191   END SUBROUTINE isf_hdiv_mlt 
    8292 
     93   SUBROUTINE isf_hdiv_cpl(pqvol, phdiv) 
     94      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(inout) :: phdiv 
     95      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(in   ) :: pqvol 
     96    
     97   INTEGER :: jk 
     98       
     99      DO jk=1,jpk  
     100         phdiv(:,:,jk) =  phdiv(:,:,jk) + pqvol(:,:,jk) * r1_e1e2t(:,:) / e3t_n(:,:,jk) 
     101      END DO 
     102 
     103   END SUBROUTINE 
     104 
    83105END MODULE isfhdiv 
Note: See TracChangeset for help on using the changeset viewer.