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 4626 for branches/dev_r4028_CNRS_LIM3_MV2014/NEMOGCM/NEMO/LIM_SRC_3/limthd_sal.F90 – NEMO

Ignore:
Timestamp:
2014-05-02T12:11:34+02:00 (10 years ago)
Author:
gm
Message:

dev_r4028_CNRS_LIM3_MV2014 : minor corrections on LIM3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/dev_r4028_CNRS_LIM3_MV2014/NEMOGCM/NEMO/LIM_SRC_3/limthd_sal.F90

    r4045 r4626  
    5353      ! 
    5454      INTEGER  ::   ji, jk     ! dummy loop indices  
    55       REAL(wp) ::   zsold, iflush, iaccrbo, igravdr, isnowic, i_ice_switch,  ztmelts   ! local scalars 
     55      REAL(wp) ::   zsold, iflush, iaccrbo, igravdr, isnowic, ice_switch,  ztmelts   ! local scalars 
    5656      REAL(wp) ::   zaaa, zbbb, zccc, zdiscrim   ! local scalars 
    5757      REAL(wp), POINTER, DIMENSION(:) ::   ze_init, zhiold, zsiold 
     
    9999            ! Switches  
    100100            !---------- 
    101             iflush       =         MAX( 0._wp , SIGN( 1.0 , t_su_b(ji) - rtt )        )    ! =1 if summer  
    102             igravdr      =         MAX( 0._wp , SIGN( 1.0 , t_bo_b(ji) - t_su_b(ji) ) )    ! =1 if t_su < t_bo 
    103             iaccrbo      =         MAX( 0._wp , SIGN( 1.0 , dh_i_bott(ji) )           )    ! =1 if bottom accretion 
    104             i_ice_switch = 1._wp - MAX ( 0._wp , SIGN( 1._wp , - ht_i_b(ji) + 1.e-2 ) ) 
    105             isnowic      = 1._wp - MAX ( 0._wp , SIGN( 1._wp , - dh_snowice(ji) ) ) * i_ice_switch   ! =1 if snow ice formation 
    106  
     101            iflush     =         MAX( 0._wp , SIGN( 1.0 , t_su_b(ji) - rtt )        )           ! =1 if summer  
     102            igravdr    =         MAX( 0._wp , SIGN( 1.0 , t_bo_b(ji) - t_su_b(ji) ) )           ! =1 if t_su < t_bo 
     103            iaccrbo    =         MAX( 0._wp , SIGN( 1.0 , dh_i_bott(ji) )           )           ! =1 if bottom accretion 
     104            ice_switch = 1._wp - MAX ( 0._wp , SIGN( 1._wp , - ht_i_b(ji) + 1.e-2 ) )           ! =1 ice thickness > 1cm 
     105            isnowic    = 1._wp - MAX ( 0._wp , SIGN( 1._wp , - dh_snowice(ji) ) ) * ice_switch  ! =1 if snow ice formation 
     106            ! 
    107107            !--------------------- 
    108108            ! Salinity tendencies 
    109109            !--------------------- 
    110             !                                   ! drainage by gravity drainage 
    111             dsm_i_gd_1d(ji) = - igravdr * MAX( sm_i_b(ji) - sal_G , 0._wp ) / time_G * rdt_ice  
    112             !                                   ! drainage by flushing   
    113             dsm_i_fl_1d(ji) = - iflush  * MAX( sm_i_b(ji) - sal_F , 0._wp ) / time_F * rdt_ice 
    114  
     110            !                                
     111            dsm_i_gd_1d(ji) = - igravdr * MAX( sm_i_b(ji) - sal_G , 0._wp ) / time_G * rdt_ice  ! drainage by gravity 
     112            dsm_i_fl_1d(ji) = - iflush  * MAX( sm_i_b(ji) - sal_F , 0._wp ) / time_F * rdt_ice  ! drainage by flushing  
     113            ! 
    115114            !----------------- 
    116115            ! Update salinity    
     
    119118            ! snow ice / bottom sources are added in lim_thd_ent to conserve energy 
    120119            sm_i_b(ji) = sm_i_b(ji) + dsm_i_fl_1d(ji) + dsm_i_gd_1d(ji) 
    121  
     120            ! 
    122121            ! if no ice, salinity = 0.1 
    123             i_ice_switch = 1._wp - MAX ( 0._wp, SIGN( 1._wp , - ht_i_b(ji) ) ) 
    124             sm_i_b(ji)   = i_ice_switch * sm_i_b(ji) + s_i_min * ( 1._wp - i_ice_switch ) 
    125  
     122            ice_switch = 1._wp - MAX ( 0._wp, SIGN( 1._wp , - ht_i_b(ji) ) ) 
     123            sm_i_b(ji) = ice_switch * sm_i_b(ji) + s_i_min * ( 1._wp - ice_switch ) 
     124            ! 
    126125            !---------------------------- 
    127126            ! Heat flux - brine drainage 
    128127            !---------------------------- 
    129128            fhbri_1d(ji) = 0._wp 
    130  
     129            ! 
    131130            !---------------------------- 
    132131            ! Salt flux - brine drainage 
    133132            !---------------------------- 
    134             sfx_bri_1d(ji) = sfx_bri_1d(ji) - i_ice_switch * rhoic * a_i_b(ji) * ht_i_b(ji) * ( sm_i_b(ji) - zsiold(ji) ) * r1_rdtice 
    135  
     133            sfx_bri_1d(ji) = sfx_bri_1d(ji) - ice_switch * rhoic * a_i_b(ji) * ht_i_b(ji) * ( sm_i_b(ji) - zsiold(ji) ) * r1_rdtice 
     134            ! 
    136135         END DO 
    137136 
Note: See TracChangeset for help on using the changeset viewer.