Ignore:
Timestamp:
2017-09-15T20:07:33+02:00 (3 years ago)
Author:
clem
Message:

changes in style - part6 - more clarity (still not finished)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/icethd_sal.F90

    r8518 r8531  
    2727   PRIVATE 
    2828 
    29    PUBLIC   ice_thd_sal        ! called by icethd module 
     29   PUBLIC   ice_thd_sal        ! called by icethd 
    3030   PUBLIC   ice_thd_sal_init   ! called by ice_init 
    3131    
    32    ! ** namelist (namsal) ** 
    33    LOGICAL  ::   ln_icedS         ! activate gravity drainage and flushing (T) or not (F) 
    34    REAL(wp) ::   rn_sal_gd        !    restoring salinity for gravity drainage [PSU] 
    35    REAL(wp) ::   rn_time_gd       !    restoring time constant for gravity drainage (= 20 days) [s] 
    36    REAL(wp) ::   rn_sal_fl        !    restoring salinity for flushing [PSU] 
    37    REAL(wp) ::   rn_time_fl       !    restoring time constant for gravity drainage (= 10 days) [s] 
     32   ! ** namelist (namthd_sal) ** 
     33   REAL(wp) ::   rn_sal_gd        ! restoring salinity for gravity drainage [PSU] 
     34   REAL(wp) ::   rn_time_gd       ! restoring time constant for gravity drainage (= 20 days) [s] 
     35   REAL(wp) ::   rn_sal_fl        ! restoring salinity for flushing [PSU] 
     36   REAL(wp) ::   rn_time_fl       ! restoring time constant for gravity drainage (= 10 days) [s] 
    3837 
    3938   !!---------------------------------------------------------------------- 
     
    4443CONTAINS 
    4544 
    46    SUBROUTINE ice_thd_sal 
     45   SUBROUTINE ice_thd_sal( ld_sal ) 
    4746      !!------------------------------------------------------------------- 
    4847      !!                ***  ROUTINE ice_thd_sal  ***     
     
    5554      !!               -> nn_icesal = 3 -> Sice = S(z)   [multiyear ice] 
    5655      !!--------------------------------------------------------------------- 
     56      LOGICAL, INTENT(in) ::   ld_sal            ! gravity drainage and flushing or not  
    5757      INTEGER  ::   ji, jk                       ! dummy loop indices  
    5858      REAL(wp) ::   iflush, igravdr              ! local scalars 
     
    7878            sm_i_1d(ji) = sm_i_1d(ji) + zsm_i_bg + zsm_i_si 
    7979 
    80             IF( ln_icedS ) THEN 
     80            IF( ld_sal ) THEN 
    8181               !--------------------------------------------------------- 
    8282               !  Update ice salinity from brine drainage and flushing 
     
    114114      !! ** Purpose :   initialization of ice salinity parameters 
    115115      !! 
    116       !! ** Method  :   Read the namice_sal namelist and check the parameter 
    117       !!              values called at the first timestep (nit000) 
     116      !! ** Method  :   Read the namthd_sal namelist and check the parameter 
     117      !!                values called at the first timestep (nit000) 
    118118      !! 
    119       !! ** input   :   Namelist namice_sal 
     119      !! ** input   :   Namelist namthd_sal 
    120120      !!------------------------------------------------------------------- 
    121121      INTEGER  ::   ios                 ! Local integer output status for namelist read 
    122122      !! 
    123       NAMELIST/namice_sal/ ln_icedS , nn_icesal , rn_icesal, rn_sal_gd, rn_time_gd,   & 
     123      NAMELIST/namthd_sal/ nn_icesal, rn_icesal, rn_sal_gd, rn_time_gd,   & 
    124124         &                 rn_sal_fl, rn_time_fl, rn_simax , rn_simin  
    125125      !!------------------------------------------------------------------- 
    126126      ! 
    127       REWIND( numnam_ice_ref )              ! Namelist namice_sal in reference namelist : Ice salinity 
    128       READ  ( numnam_ice_ref, namice_sal, IOSTAT = ios, ERR = 901) 
    129 901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namice_sal in reference namelist', lwp ) 
     127      REWIND( numnam_ice_ref )              ! Namelist namthd_sal in reference namelist : Ice salinity 
     128      READ  ( numnam_ice_ref, namthd_sal, IOSTAT = ios, ERR = 901) 
     129901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namthd_sal in reference namelist', lwp ) 
    130130      ! 
    131       REWIND( numnam_ice_cfg )              ! Namelist namice_sal in configuration namelist : Ice salinity 
    132       READ  ( numnam_ice_cfg, namice_sal, IOSTAT = ios, ERR = 902 ) 
    133 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namice_sal in configuration namelist', lwp ) 
    134       IF(lwm) WRITE ( numoni, namice_sal ) 
     131      REWIND( numnam_ice_cfg )              ! Namelist namthd_sal in configuration namelist : Ice salinity 
     132      READ  ( numnam_ice_cfg, namthd_sal, IOSTAT = ios, ERR = 902 ) 
     133902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namthd_sal in configuration namelist', lwp ) 
     134      IF(lwm) WRITE ( numoni, namthd_sal ) 
    135135      ! 
    136136      IF(lwp) THEN                           ! control print 
     
    138138         WRITE(numout,*) 'ice_thd_sal_init : Ice parameters for salinity ' 
    139139         WRITE(numout,*) '~~~~~~~~~~~~~~~~' 
    140          WRITE(numout,*) '   Namelist namice_sal' 
    141          WRITE(numout,*) '      activate gravity drainage and flushing (T) or not (F)   ln_icedS   = ', ln_icedS 
     140         WRITE(numout,*) '   Namelist namthd_sal:' 
    142141         WRITE(numout,*) '      switch for salinity                                     nn_icesal  = ', nn_icesal 
    143142         WRITE(numout,*) '      bulk salinity value if nn_icesal = 1                    rn_icesal  = ', rn_icesal 
     
    148147         WRITE(numout,*) '      Maximum tolerated ice salinity                          rn_simax   = ', rn_simax 
    149148         WRITE(numout,*) '      Minimum tolerated ice salinity                          rn_simin   = ', rn_simin 
    150       ENDIF 
    151       ! 
    152       IF( ln_icedS .AND. nn_icesal == 1 ) THEN 
    153          ln_icedS = .FALSE. 
    154          CALL ctl_warn('ln_icedS is set to false since constant ice salinity is chosen (nn_icesal=1)') 
    155149      ENDIF 
    156150      ! 
Note: See TracChangeset for help on using the changeset viewer.