# Changeset 10929

Ignore:
Timestamp:
2019-05-05T21:35:24+02:00 (18 months ago)
Message:

solve a problem of conservation when ice advection is called twice (because of a cfl that is too large)

Location:
NEMO/releases/release-4.0/src/ICE
Files:
2 edited

Unmodified
Removed

• ## NEMO/releases/release-4.0/src/ICE/icevar.F90

 r10589 IF ( v_i(ji,jj,jl) > epsi20 ) THEN     !--- icy area ! ze_i             =   e_i (ji,jj,jk,jl) * z1_v_i(ji,jj,jl) * zlay_i               ! Energy of melting e(S,T) [J.m-3] ze_i             =   e_i (ji,jj,jk,jl) * z1_v_i(ji,jj,jl) * zlay_i             ! Energy of melting e(S,T) [J.m-3] ztmelts          = - sz_i(ji,jj,jk,jl) * rTmlt                                 ! Ice layer melt temperature [C] ! Conversion q(S,T) -> T (second order equation) t_i(ji,jj,jk,jl) = MAX( -100._wp , MIN( -( zbbb + zccc ) * 0.5_wp * r1_rcpi , ztmelts ) ) + rt0   ! [K] with bounds: -100 < t_i < ztmelts ! ELSE                                !--- no ice ELSE                                   !--- no ice t_i(ji,jj,jk,jl) = rt0 ENDIF SUBROUTINE ice_var_zapneg( pato_i, pv_i, pv_s, psv_i, poa_i, pa_i, pa_ip, pv_ip, pe_s, pe_i ) SUBROUTINE ice_var_zapneg( pdt, pato_i, pv_i, pv_s, psv_i, poa_i, pa_i, pa_ip, pv_ip, pe_s, pe_i ) !!------------------------------------------------------------------- !!                   ***  ROUTINE ice_var_zapneg *** !! ** Purpose :   Remove negative sea ice fields and correct fluxes !!------------------------------------------------------------------- INTEGER  ::   ji, jj, jl, jk   ! dummy loop indices ! REAL(wp)                    , INTENT(in   ) ::   pdt        ! tracer time-step REAL(wp), DIMENSION(:,:)    , INTENT(inout) ::   pato_i     ! open water area REAL(wp), DIMENSION(:,:,:)  , INTENT(inout) ::   pv_i       ! ice volume REAL(wp), DIMENSION(:,:,:,:), INTENT(inout) ::   pe_s       ! snw heat content REAL(wp), DIMENSION(:,:,:,:), INTENT(inout) ::   pe_i       ! ice heat content !!------------------------------------------------------------------- ! ! INTEGER  ::   ji, jj, jl, jk   ! dummy loop indices REAL(wp) ::   z1_dt !!------------------------------------------------------------------- ! z1_dt = 1._wp / pdt ! DO jl = 1, jpl       !==  loop over the categories  ==! DO ji = 1 , jpi IF( pe_i(ji,jj,jk,jl) < 0._wp .OR. pa_i(ji,jj,jl) < 0._wp ) THEN hfx_res(ji,jj)   = hfx_res(ji,jj) - pe_i(ji,jj,jk,jl) * r1_rdtice ! W.m-2 >0 hfx_res(ji,jj)   = hfx_res(ji,jj) - pe_i(ji,jj,jk,jl) * z1_dt ! W.m-2 >0 pe_i(ji,jj,jk,jl) = 0._wp ENDIF DO ji = 1 , jpi IF( pe_s(ji,jj,jk,jl) < 0._wp .OR. pa_i(ji,jj,jl) < 0._wp ) THEN hfx_res(ji,jj)   = hfx_res(ji,jj) - pe_s(ji,jj,jk,jl) * r1_rdtice ! W.m-2 <0 hfx_res(ji,jj)   = hfx_res(ji,jj) - pe_s(ji,jj,jk,jl) * z1_dt ! W.m-2 <0 pe_s(ji,jj,jk,jl) = 0._wp ENDIF DO ji = 1 , jpi IF( pv_i(ji,jj,jl) < 0._wp .OR. pa_i(ji,jj,jl) < 0._wp ) THEN wfx_res(ji,jj)    = wfx_res(ji,jj) + pv_i (ji,jj,jl) * rhoi * r1_rdtice wfx_res(ji,jj)    = wfx_res(ji,jj) + pv_i (ji,jj,jl) * rhoi * z1_dt pv_i   (ji,jj,jl) = 0._wp ENDIF IF( pv_s(ji,jj,jl) < 0._wp .OR. pa_i(ji,jj,jl) < 0._wp ) THEN wfx_res(ji,jj)    = wfx_res(ji,jj) + pv_s (ji,jj,jl) * rhos * r1_rdtice wfx_res(ji,jj)    = wfx_res(ji,jj) + pv_s (ji,jj,jl) * rhos * z1_dt pv_s   (ji,jj,jl) = 0._wp ENDIF IF( psv_i(ji,jj,jl) < 0._wp .OR. pa_i(ji,jj,jl) < 0._wp ) THEN sfx_res(ji,jj)    = sfx_res(ji,jj) + psv_i(ji,jj,jl) * rhoi * r1_rdtice sfx_res(ji,jj)    = sfx_res(ji,jj) + psv_i(ji,jj,jl) * rhoi * z1_dt psv_i  (ji,jj,jl) = 0._wp ENDIF
Note: See TracChangeset for help on using the changeset viewer.