Ignore:
Timestamp:
2020-07-30T15:40:36+02:00 (2 months ago)
Author:
mathiot
Message:

ticket #1900: add subroutine icb_utl_zavg, fix issue in icb_utl_getkb, add subroutine test_icb_utl_getkb to test awkward cases (will be removed after the review), simplify icbdyn.F90 icbthm.F90 according to the new routine created.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/tickets_icb_1900/src/OCE/ICB/icbthm.F90

    r13357 r13359  
    5454      REAL(wp) ::   zMbits, znMbits, zdMbitsE, zdMbitsM, zLbits, zAbits, zMbb 
    5555      REAL(wp) ::   zxi, zyj, zff, z1_rday, z1_e1e2, zdt, z1_dt, z1_dt_e1e2, zdepw 
    56       REAL(wp), DIMENSION(jpk) :: ztoce, zuoce, zvoce, ze3t, ztmp 
     56      REAL(wp), DIMENSION(jpk) :: ztoce, zuoce, zvoce, ze3t, zzMv 
    5757      TYPE(iceberg), POINTER ::   this, next 
    5858      TYPE(point)  , POINTER ::   pt 
     
    142142         IF ( ln_M2016 ) THEN 
    143143            ! Buoyant convection at sides (eqn M.A10) but averaging along all the iceberg draft 
    144             ztmp(:) = MAX( 7.62d-3*ztoce(:)+1.29d-3*(ztoce(:)**2), 0._wp ) * z1_rday 
    145             zMv = 0.0; zdepw = 0.0 
    146             DO jk = 1,ikb-1 
    147                zMv = zMv + ze3t(jk)*ztmp(jk) 
    148                zdepw = zdepw + ze3t(jk) 
    149             END DO 
    150             zMv = (zMv + (zD - zdepw)*ztmp(ikb)) / zD 
     144            zzMv(:) = MAX( 7.62d-3*ztoce(:)+1.29d-3*(ztoce(:)**2), 0._wp ) * z1_rday 
     145            CALL icb_utl_zavg(zMv, zzMv, ze3t, zD, ikb ) 
    151146         ELSE 
    152147            zMv = MAX( 7.62d-3*zSST+1.29d-3*(zSST**2), 0._wp ) * z1_rday 
     
    262257 
    263258!!gm  add a test to avoid over melting ? 
     259!!pm  I agree, over melting could break conservation (more melt than calving) 
    264260 
    265261         IF( zMnew <= 0._wp ) THEN       ! Delete the berg if completely melted 
Note: See TracChangeset for help on using the changeset viewer.