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 13247 for NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/ICE/icethd_ent.F90 – NEMO

Ignore:
Timestamp:
2020-07-03T19:15:31+02:00 (4 years ago)
Author:
francesca
Message:

dev_r12558_HPC-08_epico_Extra_Halo: merge with trunk@13227, see #2366

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/ICE/icethd_ent.F90

    r12489 r13247  
    3838CONTAINS 
    3939  
    40    SUBROUTINE ice_thd_ent( qnew ) 
     40   SUBROUTINE ice_thd_ent( qnew, compute_hfx_err ) 
    4141      !!------------------------------------------------------------------- 
    4242      !!               ***   ROUTINE ice_thd_ent  *** 
     
    6464      !!------------------------------------------------------------------- 
    6565      REAL(wp), DIMENSION(:,:), INTENT(inout) ::   qnew             ! new enthlapies (J.m-3, remapped) 
     66      LOGICAL, INTENT(in)                     ::   compute_hfx_err  ! determines whether to compute diag. 
     67                                                                    ! error or not 
    6668      ! 
    6769      INTEGER  :: ji         !  dummy loop indices 
     
    128130      ! comment: if input h_i_old and eh_i_old are already multiplied by a_i (as in icethd_do),  
    129131      ! then we should not (* a_i) again but not important since this is just to check that remap error is ~0 
    130       DO ji = 1, npti 
    131          hfx_err_rem_1d(ji) = hfx_err_rem_1d(ji) + a_i_1d(ji) * r1_Dt_ice *  & 
    132             &               ( SUM( qnew(ji,1:nlay_i) ) * zhnew(ji) - SUM( eh_i_old(ji,0:nlay_i+1) ) )  
    133       END DO 
    134        
     132      IF( compute_hfx_err ) THEN 
     133         DO ji = 1, npti 
     134            hfx_err_rem_1d(ji) = hfx_err_rem_1d(ji) + a_i_1d(ji) * r1_Dt_ice *  & 
     135               &               ( SUM( qnew(ji,1:nlay_i) ) * zhnew(ji) - SUM( eh_i_old(ji,0:nlay_i+1) ) ) 
     136         END DO 
     137      END IF 
     138  
    135139   END SUBROUTINE ice_thd_ent 
    136140 
Note: See TracChangeset for help on using the changeset viewer.