Ignore:
Timestamp:
2020-04-07T10:27:23+02:00 (11 months ago)
Author:
orioltp
Message:

Added few more sea-ice related fixes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/dev_r12512_HPC-04_mcastril_Mixed_Precision_implementation/src/ICE/icethd_ent.F90

    r12489 r12701  
    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_rdtice *  & 
     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.