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/UKMO/dev_r5107_kara_mld/NEMOGCM/NEMO/LIM_SRC_3 – NEMO

source: branches/UKMO/dev_r5107_kara_mld/NEMOGCM/NEMO/LIM_SRC_3/limthd_sal.F90 @ 5244

Last change on this file since 5244 was 5244, checked in by davestorkey, 9 years ago

UKMO Kara MLD branch: remove svn keyword property and clear keywords.

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