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/limupdate1.F90

    r4072 r4099  
    2626   USE limthd 
    2727   USE limsbc 
    28    USE limdia 
    2928   USE limdiahsb 
    3029   USE limwri 
     
    402401      ! 2.11) Ice salinity 
    403402      !--------------------- 
    404       !clem@bug: smv_i should be updated too: smv_i(:,:,:) = smv_i(:,:,:) + sm_i(:,:,:) * ( v_i(:,:,:) - zviold(:,:,:) ) 
     403      ! clem correct bug on smv_i 
     404      smv_i(:,:,:) = sm_i(:,:,:) * v_i(:,:,:) 
     405 
    405406      IF (  num_sal == 2  ) THEN ! general case 
    406  
    407407         DO jl = 1, jpl 
    408408            !DO jk = 1, nlay_i 
     
    410410                  DO ji = 1, jpi 
    411411                     ! salinity stays in bounds 
    412                      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) ) 
    413                      i_ice_switch    =  1.0-MAX(0.0,SIGN(1.0,-v_i(ji,jj,jl) + epsi20)) 
    414                      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) 
     412                     !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) ) 
     413                     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) ) 
     414                     i_ice_switch    = 1._wp - MAX( 0._wp, SIGN( 1._wp, -v_i(ji,jj,jl) + epsi20 ) ) 
     415                     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) 
    415416                  END DO ! ji 
    416417               END DO ! jj 
    417418            !END DO !jk 
    418419         END DO !jl 
    419  
    420420      ENDIF 
    421421 
Note: See TracChangeset for help on using the changeset viewer.