Changeset 12520


Ignore:
Timestamp:
2020-03-08T15:40:26+01:00 (8 months ago)
Author:
clem
Message:

in case ice temperature is read with bdy, make sure that input ice temperature cannot be at the melting point otherwise instant melting can occur and make a big mess

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/releases/release-4.0-HEAD/src/OCE/BDY/bdyice.F90

    r11536 r12520  
    247247               ! 
    248248               ! global fields 
    249                v_i (ji,jj,jl) = h_i(ji,jj,jl) * a_i(ji,jj,jl)                       ! volume ice 
    250                v_s (ji,jj,jl) = h_s(ji,jj,jl) * a_i(ji,jj,jl)                       ! volume snw 
    251                sv_i(ji,jj,jl) = MIN( s_i(ji,jj,jl) , sss_m(ji,jj) ) * v_i(ji,jj,jl) ! salt content 
     249               v_i (ji,jj,jl) = h_i(ji,jj,jl) * a_i(ji,jj,jl)                          ! volume ice 
     250               v_s (ji,jj,jl) = h_s(ji,jj,jl) * a_i(ji,jj,jl)                          ! volume snw 
     251               sv_i(ji,jj,jl) = MIN( s_i(ji,jj,jl) , sss_m(ji,jj) ) * v_i(ji,jj,jl)    ! salt content 
    252252               DO jk = 1, nlay_s 
     253                  t_s(ji,jj,jk,jl) = MIN( t_s(ji,jj,jk,jl), -0.15_wp + rt0 )           ! Force t_s to be lower than -0.15deg (arbitrary) => likely conservation issue 
     254                  !                                                                    !       otherwise instant melting can occur 
    253255                  e_s(ji,jj,jk,jl) = rhos * ( rcpi * ( rt0 - t_s(ji,jj,jk,jl) ) + rLfus )   ! enthalpy in J/m3 
    254256                  e_s(ji,jj,jk,jl) = e_s(ji,jj,jk,jl) * v_s(ji,jj,jl) * r1_nlay_s           ! enthalpy in J/m2 
    255                END DO                
     257               END DO 
     258               t_su(ji,jj,jl) = MIN( t_su(ji,jj,jl), -0.15_wp + rt0 )                  ! Force t_su to be lower than -0.15deg (arbitrary) 
    256259               DO jk = 1, nlay_i 
    257                   ztmelts          = - rTmlt  * sz_i(ji,jj,jk,jl)             ! Melting temperature in C 
    258                   t_i(ji,jj,jk,jl) = MIN( t_i(ji,jj,jk,jl), ztmelts + rt0 )   ! Force t_i to be lower than melting point => likely conservation issue 
    259                   ! 
     260                  ztmelts          = - rTmlt  * sz_i(ji,jj,jk,jl)                      ! Melting temperature in C 
     261                  t_i(ji,jj,jk,jl) = MIN( t_i(ji,jj,jk,jl), (ztmelts-0.15_wp) + rt0 )  ! Force t_i to be lower than melting point (-0.15) => likely conservation issue 
     262                  !                                                                    !       otherwise instant melting can occur  
    260263                  e_i(ji,jj,jk,jl) = rhoi * ( rcpi  * ( ztmelts - ( t_i(ji,jj,jk,jl) - rt0 ) )           &   ! enthalpy in J/m3 
    261264                     &                      + rLfus * ( 1._wp - ztmelts / ( t_i(ji,jj,jk,jl) - rt0 ) )   & 
Note: See TracChangeset for help on using the changeset viewer.