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.
limthd_sal.F90 in branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3 – NEMO

source: branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limthd_sal.F90 @ 8420

Last change on this file since 8420 was 8420, checked in by clem, 7 years ago

changing names

  • Property svn:keywords set to Id
File size: 8.3 KB
RevLine 
[825]1MODULE limthd_sal
2   !!======================================================================
3   !!                       ***  MODULE limthd_sal ***
[2528]4   !! LIM-3 sea-ice :  computation of salinity variations in the ice
[825]5   !!======================================================================
[2528]6   !! History :   -   ! 2003-05 (M. Vancoppenolle) UCL-ASTR first coding for LIM3-1D
7   !!            3.0  ! 2005-12 (M. Vancoppenolle) adapted to the 3-D version
[2715]8   !!            4.0  ! 2011-02 (G. Madec) dynamical allocation
[2528]9   !!---------------------------------------------------------------------
[888]10#if defined key_lim3
[825]11   !!----------------------------------------------------------------------
[2528]12   !!   'key_lim3'                                      LIM-3 sea-ice model
13   !!----------------------------------------------------------------------
[3625]14   !!   lim_thd_sal   : salinity variations in the ice
[2528]15   !!----------------------------------------------------------------------
[3625]16   USE par_oce        ! ocean parameters
17   USE phycst         ! physical constants (ocean directory)
18   USE ice            ! LIM variables
[8420]19   USE ice1D          ! LIM thermodynamics
[3625]20   USE limvar         ! LIM variables
[8378]21   !
[3625]22   USE in_out_manager ! I/O manager
23   USE lib_mpp        ! MPP library
24   USE lib_fortran    ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 
[825]25
26   IMPLICIT NONE
27   PRIVATE
28
[2528]29   PUBLIC   lim_thd_sal        ! called by limthd module
[8321]30   PUBLIC   lim_thd_sal_init   ! called by ice_init
[825]31
[1156]32   !!----------------------------------------------------------------------
[4161]33   !! NEMO/LIM3 4.0 , UCL - NEMO Consortium (2011)
[1156]34   !! $Id$
[2528]35   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
[1156]36   !!----------------------------------------------------------------------
[921]37CONTAINS
[825]38
[8342]39   SUBROUTINE lim_thd_sal
[825]40      !!-------------------------------------------------------------------
[2528]41      !!                ***  ROUTINE lim_thd_sal  ***   
42      !!   
43      !! ** Purpose :   computes new salinities in the ice
[825]44      !!
[3625]45      !! ** Method  :  3 possibilities
[5123]46      !!               -> nn_icesal = 1 -> Sice = cst    [ice salinity constant in both time & space]
47      !!               -> nn_icesal = 2 -> Sice = S(z,t) [Vancoppenolle et al. 2005]
48      !!               -> nn_icesal = 3 -> Sice = S(z)   [multiyear ice]
[825]49      !!---------------------------------------------------------------------
[8326]50      INTEGER  ::   ji, jk                       ! dummy loop indices
[7646]51      REAL(wp) ::   iflush, igravdr              ! local scalars
52      REAL(wp) ::   zs_sni, zsm_i_gd, zsm_i_fl, zsm_i_si, zsm_i_bg   ! local scalars
[2528]53      !!---------------------------------------------------------------------
[825]54
[6470]55      !--------------------------------------------------------------------|
56      ! 1) salinity constant in time                                       |
57      !--------------------------------------------------------------------|
58      ! do nothing
[825]59
[6470]60      !----------------------------------------------------------------------|
61      !  2) salinity varying in time                                         |
62      !----------------------------------------------------------------------|
[5123]63      IF(  nn_icesal == 2  ) THEN
[825]64
[8342]65         DO ji = 1, nidx
[825]66
[7646]67            !---------------------------------------------------------
68            !  Update ice salinity from snow-ice and bottom growth
69            !---------------------------------------------------------
[8326]70            zs_sni   = sss_1d(ji) * ( rhoic - rhosn ) * r1_rhoic   ! Salinity of snow ice
[7646]71            rswitch  = MAX( 0._wp , SIGN( 1._wp , ht_i_1d(ji) - epsi20 ) )
72            zsm_i_si = ( zs_sni      - sm_i_1d(ji) ) *             dh_snowice(ji)  / MAX( ht_i_1d(ji), epsi20 ) * rswitch ! snow-ice   
73            zsm_i_bg = ( s_i_new(ji) - sm_i_1d(ji) ) * MAX( 0._wp, dh_i_bott(ji) ) / MAX( ht_i_1d(ji), epsi20 ) * rswitch ! bottom growth
[825]74
[7646]75            ! Update salinity (nb: salt flux already included in limthd_dh)
76            sm_i_1d(ji) = sm_i_1d(ji) + zsm_i_bg + zsm_i_si
[825]77
[7646]78            IF( ln_limdS ) THEN
79               !---------------------------------------------------------
80               !  Update ice salinity from brine drainage and flushing
81               !---------------------------------------------------------
82               iflush   = MAX( 0._wp , SIGN( 1._wp , t_su_1d(ji) - rt0         ) )  ! =1 if summer
83               igravdr  = MAX( 0._wp , SIGN( 1._wp , t_bo_1d(ji) - t_su_1d(ji) ) )  ! =1 if t_su < t_bo
84               zsm_i_gd = - igravdr * MAX( sm_i_1d(ji) - rn_sal_gd , 0._wp ) / rn_time_gd * rdt_ice  ! gravity drainage
85               zsm_i_fl = - iflush  * MAX( sm_i_1d(ji) - rn_sal_fl , 0._wp ) / rn_time_fl * rdt_ice  ! flushing
86               
87               ! Update salinity   
88               sm_i_1d(ji) = sm_i_1d(ji) + zsm_i_fl + zsm_i_gd
89               
90               ! Salt flux
91               sfx_bri_1d(ji) = sfx_bri_1d(ji) - rhoic * a_i_1d(ji) * ht_i_1d(ji) * ( zsm_i_fl + zsm_i_gd ) * r1_rdtice
92            ENDIF
[4161]93         END DO
[825]94
[4161]95         ! Salinity profile
[8342]96         CALL lim_var_salprof1d
[2528]97         !
[3625]98      ENDIF 
[825]99
[921]100      !------------------------------------------------------------------------------|
[6470]101      !  3) vertical profile of salinity, constant in time                           |
[921]102      !------------------------------------------------------------------------------|
[8342]103      IF(  nn_icesal == 3  )   CALL lim_var_salprof1d
[825]104
[2528]105      !
[825]106   END SUBROUTINE lim_thd_sal
107
[2528]108
[825]109   SUBROUTINE lim_thd_sal_init
110      !!-------------------------------------------------------------------
111      !!                  ***  ROUTINE lim_thd_sal_init  ***
112      !!
113      !! ** Purpose :   initialization of ice salinity parameters
114      !!
[2528]115      !! ** Method  :   Read the namicesal namelist and check the parameter
116      !!              values called at the first timestep (nit000)
[825]117      !!
118      !! ** input   :   Namelist namicesal
119      !!-------------------------------------------------------------------
[4147]120      INTEGER  ::   ios                 ! Local integer output status for namelist read
[7646]121      NAMELIST/namicesal/ ln_limdS, nn_icesal, rn_icesal, rn_sal_gd, rn_time_gd,   &
122         &                rn_sal_fl, rn_time_fl, rn_simax, rn_simin 
[825]123      !!-------------------------------------------------------------------
[2528]124      !
[4147]125      REWIND( numnam_ice_ref )              ! Namelist namicesal in reference namelist : Ice salinity
126      READ  ( numnam_ice_ref, namicesal, IOSTAT = ios, ERR = 901)
127901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namicesal in reference namelist', lwp )
128
129      REWIND( numnam_ice_cfg )              ! Namelist namicesal in configuration namelist : Ice salinity
130      READ  ( numnam_ice_cfg, namicesal, IOSTAT = ios, ERR = 902 )
131902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namicesal in configuration namelist', lwp )
[4624]132      IF(lwm) WRITE ( numoni, namicesal )
[2528]133      !
134      IF(lwp) THEN                           ! control print
[825]135         WRITE(numout,*)
136         WRITE(numout,*) 'lim_thd_sal_init : Ice parameters for salinity '
137         WRITE(numout,*) '~~~~~~~~~~~~~~~~'
[7646]138         WRITE(numout,*) '   activate gravity drainage and flushing (T) or not (F)   ln_limdS   = ', ln_limdS
139         WRITE(numout,*) '   switch for salinity                                     nn_icesal  = ', nn_icesal
140         WRITE(numout,*) '   bulk salinity value if nn_icesal = 1                    rn_icesal  = ', rn_icesal
141         WRITE(numout,*) '   restoring salinity for gravity drainage                 rn_sal_gd  = ', rn_sal_gd
142         WRITE(numout,*) '   restoring time for for gravity drainage                 rn_time_gd = ', rn_time_gd
143         WRITE(numout,*) '   restoring salinity for flushing                         rn_sal_fl  = ', rn_sal_fl
144         WRITE(numout,*) '   restoring time for flushing                             rn_time_fl = ', rn_time_fl
145         WRITE(numout,*) '   Maximum tolerated ice salinity                          rn_simax   = ', rn_simax
146         WRITE(numout,*) '   Minimum tolerated ice salinity                          rn_simin   = ', rn_simin
[825]147      ENDIF
[2528]148      !
[825]149   END SUBROUTINE lim_thd_sal_init
150
151#else
152   !!----------------------------------------------------------------------
[2528]153   !!   Default option         Dummy Module          No LIM-3 sea-ice model
[825]154   !!----------------------------------------------------------------------
155#endif
156   !!======================================================================
157END MODULE limthd_sal
Note: See TracBrowser for help on using the repository browser.