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/2013/dev_r4028_CNRS_LIM3/NEMOGCM/NEMO/LIM_SRC_3 – NEMO

source: branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/NEMO/LIM_SRC_3/limthd_sal.F90 @ 4649

Last change on this file since 4649 was 4649, checked in by clem, 10 years ago

finalizing LIM3 heat budget conservation + multiple minor bugs corrections

  • Property svn:keywords set to Id
File size: 7.8 KB
Line 
1MODULE limthd_sal
2   !!======================================================================
3   !!                       ***  MODULE limthd_sal ***
4   !! LIM-3 sea-ice :  computation of salinity variations in the ice
5   !!======================================================================
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
8   !!            4.0  ! 2011-02 (G. Madec) dynamical allocation
9   !!---------------------------------------------------------------------
10#if defined key_lim3
11   !!----------------------------------------------------------------------
12   !!   'key_lim3'                                      LIM-3 sea-ice model
13   !!----------------------------------------------------------------------
14   !!   lim_thd_sal   : salinity variations in the ice
15   !!----------------------------------------------------------------------
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) 
27
28   IMPLICIT NONE
29   PRIVATE
30
31   PUBLIC   lim_thd_sal        ! called by limthd module
32   PUBLIC   lim_thd_sal_init   ! called by iceini module
33
34   !!----------------------------------------------------------------------
35   !! NEMO/LIM3 4.0 , UCL - NEMO Consortium (2011)
36   !! $Id$
37   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
38   !!----------------------------------------------------------------------
39CONTAINS
40
41   SUBROUTINE lim_thd_sal( kideb, kiut )
42      !!-------------------------------------------------------------------
43      !!                ***  ROUTINE lim_thd_sal  ***   
44      !!   
45      !! ** Purpose :   computes new salinities in the ice
46      !!
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]
51      !!---------------------------------------------------------------------
52      INTEGER, INTENT(in) ::   kideb, kiut   ! thickness category index
53      !
54      INTEGER  ::   ji, jk     ! dummy loop indices
55      REAL(wp) ::   iflush, igravdr   ! local scalars
56      !!---------------------------------------------------------------------
57
58      !---------------------------------------------------------
59      !  0) Update ice salinity from snow-ice and bottom growth
60      !---------------------------------------------------------
61      DO ji = kideb, kiut
62         sm_i_b(ji) = sm_i_b(ji) + dsm_i_se_1d(ji) + dsm_i_si_1d(ji)
63      END DO
64 
65      !------------------------------------------------------------------------------|
66      ! 1) Constant salinity, constant in time                                       |
67      !------------------------------------------------------------------------------|
68!!gm comment: if num_sal = 1 s_i_new, s_i_b and sm_i_b can be set to bulk_sal one for all in the initialisation phase !!
69!!gm           ===>>>   simplification of almost all test on num_sal value
70      IF(  num_sal == 1  ) THEN
71            s_i_b  (kideb:kiut,1:nlay_i) =  bulk_sal
72            sm_i_b (kideb:kiut)          =  bulk_sal 
73            s_i_new(kideb:kiut)          =  bulk_sal
74      ENDIF
75
76      !------------------------------------------------------------------------------|
77      !  Module 2 : Constant salinity varying in time                                |
78      !------------------------------------------------------------------------------|
79      IF(  num_sal == 2  ) THEN
80
81         DO ji = kideb, kiut
82            !
83            ! Switches
84            !----------
85            iflush  = MAX( 0._wp , SIGN( 1._wp , t_su_b(ji) - rtt )        )    ! =1 if summer
86            igravdr = MAX( 0._wp , SIGN( 1._wp , t_bo_b(ji) - t_su_b(ji) ) )    ! =1 if t_su < t_bo
87
88            !---------------------
89            ! Salinity tendencies
90            !---------------------
91            ! drainage by gravity drainage
92            dsm_i_gd_1d(ji) = - igravdr * MAX( sm_i_b(ji) - sal_G , 0._wp ) / time_G * rdt_ice 
93            ! drainage by flushing 
94            dsm_i_fl_1d(ji) = - iflush  * MAX( sm_i_b(ji) - sal_F , 0._wp ) / time_F * rdt_ice
95
96            !-----------------
97            ! Update salinity   
98            !-----------------
99            ! only drainage terms ( gravity drainage and flushing )
100            ! snow ice / bottom sources are added in lim_thd_ent to conserve energy
101            sm_i_b(ji) = sm_i_b(ji) + dsm_i_fl_1d(ji) + dsm_i_gd_1d(ji)
102
103            !----------------------------
104            ! Salt flux - brine drainage
105            !----------------------------
106            sfx_bri_1d(ji) = sfx_bri_1d(ji) - rhoic * a_i_b(ji) * ht_i_b(ji) * ( dsm_i_fl_1d(ji) + dsm_i_gd_1d(ji) ) * r1_rdtice
107
108         END DO
109
110         ! Salinity profile
111         CALL lim_var_salprof1d( kideb, kiut )
112         !
113      ENDIF 
114
115      !------------------------------------------------------------------------------|
116      !  Module 3 : Profile of salinity, constant in time                            |
117      !------------------------------------------------------------------------------|
118      IF(  num_sal == 3  )   CALL lim_var_salprof1d( kideb, kiut )
119
120      !
121   END SUBROUTINE lim_thd_sal
122
123
124   SUBROUTINE lim_thd_sal_init
125      !!-------------------------------------------------------------------
126      !!                  ***  ROUTINE lim_thd_sal_init  ***
127      !!
128      !! ** Purpose :   initialization of ice salinity parameters
129      !!
130      !! ** Method  :   Read the namicesal namelist and check the parameter
131      !!              values called at the first timestep (nit000)
132      !!
133      !! ** input   :   Namelist namicesal
134      !!-------------------------------------------------------------------
135      NAMELIST/namicesal/ num_sal, bulk_sal, sal_G, time_G, sal_F, time_F,   &
136         &                s_i_max, s_i_min, s_i_0, s_i_1
137      !!-------------------------------------------------------------------
138      !
139      REWIND( numnam_ice )                   ! Read Namelist namicesal
140      READ  ( numnam_ice  , namicesal )
141      !
142      IF(lwp) THEN                           ! control print
143         WRITE(numout,*)
144         WRITE(numout,*) 'lim_thd_sal_init : Ice parameters for salinity '
145         WRITE(numout,*) '~~~~~~~~~~~~~~~~'
146         WRITE(numout,*) ' switch for salinity num_sal        : ', num_sal
147         WRITE(numout,*) ' bulk salinity value if num_sal = 1 : ', bulk_sal
148         WRITE(numout,*) ' restoring salinity for GD          : ', sal_G
149         WRITE(numout,*) ' restoring time for GD              : ', time_G
150         WRITE(numout,*) ' restoring salinity for flushing    : ', sal_F
151         WRITE(numout,*) ' restoring time for flushing        : ', time_F
152         WRITE(numout,*) ' Maximum tolerated ice salinity     : ', s_i_max
153         WRITE(numout,*) ' Minimum tolerated ice salinity     : ', s_i_min
154         WRITE(numout,*) ' 1st salinity for salinity profile  : ', s_i_0
155         WRITE(numout,*) ' 2nd salinity for salinity profile  : ', s_i_1
156      ENDIF
157      !
158   END SUBROUTINE lim_thd_sal_init
159
160#else
161   !!----------------------------------------------------------------------
162   !!   Default option         Dummy Module          No LIM-3 sea-ice model
163   !!----------------------------------------------------------------------
164#endif
165   !!======================================================================
166END MODULE limthd_sal
Note: See TracBrowser for help on using the repository browser.