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/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/LIM_SRC_3 – NEMO

source: branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/LIM_SRC_3/limthd_sal.F90 @ 6965

Last change on this file since 6965 was 6469, checked in by clem, 8 years ago

solve issue #1712

  • Property svn:keywords set to Id
File size: 7.9 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 sbc_oce        ! Surface boundary condition: ocean fields
19   USE ice            ! LIM variables
20   USE thd_ice        ! LIM thermodynamics
21   USE limvar         ! LIM variables
22   USE in_out_manager ! I/O manager
23   USE lib_mpp        ! MPP library
24   USE wrk_nemo       ! work arrays
25   USE lib_fortran    ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 
[825]26
27   IMPLICIT NONE
28   PRIVATE
29
[2528]30   PUBLIC   lim_thd_sal        ! called by limthd module
[5123]31   PUBLIC   lim_thd_sal_init   ! called by sbc_lim_init
[825]32
[1156]33   !!----------------------------------------------------------------------
[4161]34   !! NEMO/LIM3 4.0 , UCL - NEMO Consortium (2011)
[1156]35   !! $Id$
[2528]36   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
[1156]37   !!----------------------------------------------------------------------
[921]38CONTAINS
[825]39
[2528]40   SUBROUTINE lim_thd_sal( kideb, kiut )
[825]41      !!-------------------------------------------------------------------
[2528]42      !!                ***  ROUTINE lim_thd_sal  ***   
43      !!   
44      !! ** Purpose :   computes new salinities in the ice
[825]45      !!
[3625]46      !! ** Method  :  3 possibilities
[5123]47      !!               -> nn_icesal = 1 -> Sice = cst    [ice salinity constant in both time & space]
48      !!               -> nn_icesal = 2 -> Sice = S(z,t) [Vancoppenolle et al. 2005]
49      !!               -> nn_icesal = 3 -> Sice = S(z)   [multiyear ice]
[825]50      !!---------------------------------------------------------------------
[3625]51      INTEGER, INTENT(in) ::   kideb, kiut   ! thickness category index
[2528]52      !
53      INTEGER  ::   ji, jk     ! dummy loop indices
[4688]54      REAL(wp) ::   iflush, igravdr   ! local scalars
[2528]55      !!---------------------------------------------------------------------
[825]56
[4688]57      !---------------------------------------------------------
58      !  0) Update ice salinity from snow-ice and bottom growth
59      !---------------------------------------------------------
60      DO ji = kideb, kiut
[4872]61         sm_i_1d(ji) = sm_i_1d(ji) + dsm_i_se_1d(ji) + dsm_i_si_1d(ji)
[4688]62      END DO
63 
[6469]64      !--------------------------------------------------------------------|
65      ! 1) salinity constant in time                                       |
66      !--------------------------------------------------------------------|
67      ! do nothing
[825]68
[6469]69      !----------------------------------------------------------------------|
70      !  2) salinity varying in time                                         |
71      !----------------------------------------------------------------------|
[5123]72      IF(  nn_icesal == 2  ) THEN
[825]73
74         DO ji = kideb, kiut
[2715]75            !
[825]76            ! Switches
77            !----------
[5123]78            iflush  = MAX( 0._wp , SIGN( 1._wp , t_su_1d(ji) - rt0 )        )     ! =1 if summer
[4872]79            igravdr = MAX( 0._wp , SIGN( 1._wp , t_bo_1d(ji) - t_su_1d(ji) ) )    ! =1 if t_su < t_bo
[825]80
81            !---------------------
82            ! Salinity tendencies
83            !---------------------
[4688]84            ! drainage by gravity drainage
[5123]85            dsm_i_gd_1d(ji) = - igravdr * MAX( sm_i_1d(ji) - rn_sal_gd , 0._wp ) / rn_time_gd * rdt_ice 
[4688]86            ! drainage by flushing 
[5123]87            dsm_i_fl_1d(ji) = - iflush  * MAX( sm_i_1d(ji) - rn_sal_fl , 0._wp ) / rn_time_fl * rdt_ice
[825]88
89            !-----------------
90            ! Update salinity   
91            !-----------------
92            ! only drainage terms ( gravity drainage and flushing )
[2715]93            ! snow ice / bottom sources are added in lim_thd_ent to conserve energy
[4872]94            sm_i_1d(ji) = sm_i_1d(ji) + dsm_i_fl_1d(ji) + dsm_i_gd_1d(ji)
[825]95
[4161]96            !----------------------------
97            ! Salt flux - brine drainage
98            !----------------------------
[4872]99            sfx_bri_1d(ji) = sfx_bri_1d(ji) - rhoic * a_i_1d(ji) * ht_i_1d(ji) * ( dsm_i_fl_1d(ji) + dsm_i_gd_1d(ji) ) * r1_rdtice
[3625]100
[4161]101         END DO
[825]102
[4161]103         ! Salinity profile
104         CALL lim_var_salprof1d( kideb, kiut )
[2528]105         !
[3625]106      ENDIF 
[825]107
[921]108      !------------------------------------------------------------------------------|
[6469]109      !  3) vertical profile of salinity, constant in time                           |
[921]110      !------------------------------------------------------------------------------|
[5123]111      IF(  nn_icesal == 3  )   CALL lim_var_salprof1d( kideb, kiut )
[825]112
[2528]113      !
[825]114   END SUBROUTINE lim_thd_sal
115
[2528]116
[825]117   SUBROUTINE lim_thd_sal_init
118      !!-------------------------------------------------------------------
119      !!                  ***  ROUTINE lim_thd_sal_init  ***
120      !!
121      !! ** Purpose :   initialization of ice salinity parameters
122      !!
[2528]123      !! ** Method  :   Read the namicesal namelist and check the parameter
124      !!              values called at the first timestep (nit000)
[825]125      !!
126      !! ** input   :   Namelist namicesal
127      !!-------------------------------------------------------------------
[4147]128      INTEGER  ::   ios                 ! Local integer output status for namelist read
[5123]129      NAMELIST/namicesal/ nn_icesal, rn_icesal, rn_sal_gd, rn_time_gd, rn_sal_fl, rn_time_fl,   &
130         &                rn_simax, rn_simin 
[825]131      !!-------------------------------------------------------------------
[2528]132      !
[4147]133      REWIND( numnam_ice_ref )              ! Namelist namicesal in reference namelist : Ice salinity
134      READ  ( numnam_ice_ref, namicesal, IOSTAT = ios, ERR = 901)
135901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namicesal in reference namelist', lwp )
136
137      REWIND( numnam_ice_cfg )              ! Namelist namicesal in configuration namelist : Ice salinity
138      READ  ( numnam_ice_cfg, namicesal, IOSTAT = ios, ERR = 902 )
139902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namicesal in configuration namelist', lwp )
[4624]140      IF(lwm) WRITE ( numoni, namicesal )
[2528]141      !
142      IF(lwp) THEN                           ! control print
[825]143         WRITE(numout,*)
144         WRITE(numout,*) 'lim_thd_sal_init : Ice parameters for salinity '
145         WRITE(numout,*) '~~~~~~~~~~~~~~~~'
[5123]146         WRITE(numout,*) '   switch for salinity nn_icesal        = ', nn_icesal
147         WRITE(numout,*) '   bulk salinity value if nn_icesal = 1 = ', rn_icesal
148         WRITE(numout,*) '   restoring salinity for GD            = ', rn_sal_gd
149         WRITE(numout,*) '   restoring time for GD                = ', rn_time_gd
150         WRITE(numout,*) '   restoring salinity for flushing      = ', rn_sal_fl
151         WRITE(numout,*) '   restoring time for flushing          = ', rn_time_fl
152         WRITE(numout,*) '   Maximum tolerated ice salinity       = ', rn_simax
153         WRITE(numout,*) '   Minimum tolerated ice salinity       = ', rn_simin
[825]154      ENDIF
[2528]155      !
[825]156   END SUBROUTINE lim_thd_sal_init
157
158#else
159   !!----------------------------------------------------------------------
[2528]160   !!   Default option         Dummy Module          No LIM-3 sea-ice model
[825]161   !!----------------------------------------------------------------------
162#endif
163   !!======================================================================
164END MODULE limthd_sal
Note: See TracBrowser for help on using the repository browser.