Ignore:
Timestamp:
2013-10-22T14:07:21+02:00 (8 years ago)
Author:
clem
Message:
 
File:
1 edited

Legend:

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

    r4072 r4099  
    2626   USE limthd 
    2727   USE limsbc 
    28    USE limdia 
    2928   USE limdiahsb 
    3029   USE limwri 
     
    305304                     zesum = zesum + e_i(ji,jj,jk,jl) 
    306305                  END DO 
    307                   IF (ind_im .LT. nlay_i ) THEN 
    308                      smv_i(ji,jj,jl) = smv_i(ji,jj,jl) / ht_i(ji,jj,jl) * ( ht_i(ji,jj,jl) - REAL(ind_im)*ht_i(ji,jj,jl) / REAL(nlay_i) ) 
    309                   ENDIF 
     306                  !clem IF (ind_im .LT. nlay_i ) THEN 
     307                  !clem   smv_i(ji,jj,jl) = smv_i(ji,jj,jl) / ht_i(ji,jj,jl) * ( ht_i(ji,jj,jl) - REAL(ind_im)*ht_i(ji,jj,jl) / REAL(nlay_i) ) 
     308                  !clem ENDIF 
    310309                  ht_i(ji,jj,jl) = ht_i(ji,jj,jl) - REAL(ind_im)*ht_i(ji,jj,jl) / REAL(nlay_i) 
    311310                  v_i(ji,jj,jl)  = ht_i(ji,jj,jl) * a_i(ji,jj,jl) 
     
    532531      ! 2.11) Ice salinity 
    533532      !--------------------- 
    534       !clem@bug: smv_i should be updated too: smv_i(:,:,:) = smv_i(:,:,:) + sm_i(:,:,:) * ( v_i(:,:,:) - zviold(:,:,:) ) 
     533      ! clem correct bug on smv_i 
     534      smv_i(:,:,:) = sm_i(:,:,:) * v_i(:,:,:) 
     535 
    535536      IF (  num_sal == 2  ) THEN ! general case 
    536537         DO jl = 1, jpl 
     
    539540                  DO ji = 1, jpi 
    540541                     ! salinity stays in bounds 
    541                      smv_i(ji,jj,jl)  =  MAX(MIN((rhoic-rhosn)/rhoic*sss_m(ji,jj),smv_i(ji,jj,jl)),0.1 * v_i(ji,jj,jl) ) 
    542                      i_ice_switch    =  1.0-MAX(0.0,SIGN(1.0,-v_i(ji,jj,jl) + epsi20)) 
    543                      smv_i(ji,jj,jl)  = i_ice_switch*smv_i(ji,jj,jl) + 0.1*(1.0-i_ice_switch)*v_i(ji,jj,jl) 
     542                     !clem smv_i(ji,jj,jl)  =  MAX(MIN((rhoic-rhosn)/rhoic*sss_m(ji,jj),smv_i(ji,jj,jl)),0.1 * v_i(ji,jj,jl) ) 
     543                     smv_i(ji,jj,jl) = MAX( MIN( s_i_max * v_i(ji,jj,jl), smv_i(ji,jj,jl) ), s_i_min * v_i(ji,jj,jl) ) 
     544                     i_ice_switch    = 1._wp - MAX( 0._wp, SIGN( 1._wp, -v_i(ji,jj,jl) + epsi20 ) ) 
     545                     smv_i(ji,jj,jl) = i_ice_switch * smv_i(ji,jj,jl) + s_i_min * ( 1._wp - i_ice_switch ) * v_i(ji,jj,jl) 
    544546                  END DO ! ji 
    545547               END DO ! jj 
Note: See TracChangeset for help on using the changeset viewer.