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 4332 for branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/NEMO/LIM_SRC_3/limistate.F90 – NEMO

Ignore:
Timestamp:
2013-12-11T15:38:42+01:00 (10 years ago)
Author:
clem
Message:

update LIM3 to fix remaining bugs. Now working in global and regional config.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/NEMO/LIM_SRC_3/limistate.F90

    r4099 r4332  
    7676      !!                6) Lateral boundary conditions 
    7777      !! 
     78      !! ** Notes   : o_i, t_su, t_s, t_i, s_i must be filled everywhere, even 
     79      !!              where there is no ice (clem: I do not know why but it is mandatory)  
     80      !! 
    7881      !! History : 
    7982      !!   2.0  !  01-04  (C. Ethe, G. Madec)  Original code 
     
    8487      !! * Local variables 
    8588      INTEGER    :: ji, jj, jk, jl             ! dummy loop indices 
    86       REAL(wp)   :: epsi06, epsi20, ztmelts 
     89      REAL(wp)   :: epsi20, ztmelts, zdh 
    8790      INTEGER    :: i_hemis, i_fill, jl0   
    8891      REAL(wp)   :: ztest_1, ztest_2, ztest_3, ztest_4, ztests, zsigma, zarg, zA, zV, zA_cons, zV_cons, zconv 
     
    98101      CALL wrk_alloc(   2,      zhm_i_ini, zat_i_ini, zvt_i_ini, zhm_s_ini, zsm_i_ini ) 
    99102 
    100       epsi06   = 1.0e-6 
    101103      epsi20   = 1.0e-20 
    102104      IF(lwp) WRITE(numout,*) 
     
    308310      !--------------------------------------------------------------------- 
    309311 
    310       ! Ice concentration, thickness and volume, snow depth, ice 
    311       ! salinity, ice age, surface temperature 
     312      ! Ice concentration, thickness and volume, ice salinity, ice age, surface temperature 
    312313      DO jl = 1, jpl ! loop over categories 
    313314         DO jj = 1, jpj 
     
    315316               a_i(ji,jj,jl)   = zidto(ji,jj) * za_i_ini (jl,zhemis(ji,jj))  ! concentration 
    316317               ht_i(ji,jj,jl)  = zidto(ji,jj) * zht_i_ini(jl,zhemis(ji,jj))  ! ice thickness 
    317                ht_s(ji,jj,jl)  = zidto(ji,jj) * zhm_s_ini(zhemis(ji,jj))     ! snow depth 
    318                sm_i(ji,jj,jl)  = zidto(ji,jj) * zsm_i_ini(zhemis(ji,jj))     ! salinity 
     318               ht_s(ji,jj,jl)  = ht_i(ji,jj,jl) * ( zhm_s_ini( zhemis(ji,jj) ) / zhm_i_ini( zhemis(ji,jj) ) )  ! snow depth 
     319               sm_i(ji,jj,jl)  = zidto(ji,jj) * zsm_i_ini(zhemis(ji,jj)) + ( 1._wp - zidto(ji,jj) ) * s_i_min ! salinity 
    319320               o_i(ji,jj,jl)   = zidto(ji,jj) * 1._wp + ( 1._wp - zidto(ji,jj) ) ! age 
    320                t_su(ji,jj,jl)  = zidto(ji,jj) * 270.0 + ( 1._wp - zidto(ji,jj) ) * t_bo(ji,jj) ! surf temp 
    321   
    322                ! ice volume, snow volume, salt content, age content 
     321               t_su(ji,jj,jl)  = zidto(ji,jj) * 270.0 + ( 1._wp - zidto(ji,jj) ) * 270.0 ! surf temp 
     322 
     323               ! This case below should not be used if (ht_s/ht_i) is ok in namelist 
     324               ! In case snow load is in excess that would lead to transformation from snow to ice 
     325               ! Then, transfer the snow excess into the ice (different from limthd_dh) 
     326               zdh = MAX( 0._wp, ( rhosn * ht_s(ji,jj,jl) + ( rhoic - rau0 ) * ht_i(ji,jj,jl) ) * r1_rau0 )  
     327               ! recompute ht_i, ht_s avoiding out of bounds values 
     328               ht_i(ji,jj,jl) = MIN( hi_max(jl), ht_i(ji,jj,jl) + zdh ) 
     329               ht_s(ji,jj,jl) = MAX( 0._wp, ht_s(ji,jj,jl) - zdh * rhoic / rhosn ) 
     330 
     331               ! ice volume, salt content, age content 
    323332               v_i(ji,jj,jl)   = ht_i(ji,jj,jl) * a_i(ji,jj,jl)              ! ice volume 
    324333               v_s(ji,jj,jl)   = ht_s(ji,jj,jl) * a_i(ji,jj,jl)              ! snow volume 
Note: See TracChangeset for help on using the changeset viewer.