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/NERC/dev_r5518_GO6_conserv_check_up/NEMOGCM/NEMO/LIM_SRC_3 – NEMO

source: branches/NERC/dev_r5518_GO6_conserv_check_up/NEMOGCM/NEMO/LIM_SRC_3/limthd_sal.F90 @ 9260

Last change on this file since 9260 was 7993, checked in by frrh, 7 years ago

Merge in missing revisions 6428:2477 inclusive and 6482 from nemo_v3_6_STABLE
branch. In ptic, this includes the fix for restartability of runoff fields in coupled
models. Evolution of coupled models will therefor be affected.

These changes donot affect evolution of the current stand-alone NEMO-CICE GO6
standard configuration.

Work and testing documented in Met Office GMED ticket 320.

File size: 7.9 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 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) 
26
27   IMPLICIT NONE
28   PRIVATE
29
30   PUBLIC   lim_thd_sal        ! called by limthd module
31   PUBLIC   lim_thd_sal_init   ! called by sbc_lim_init
32
33   !!----------------------------------------------------------------------
34   !! NEMO/LIM3 4.0 , UCL - NEMO Consortium (2011)
35   !! $Id$
36   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
37   !!----------------------------------------------------------------------
38CONTAINS
39
40   SUBROUTINE lim_thd_sal( kideb, kiut )
41      !!-------------------------------------------------------------------
42      !!                ***  ROUTINE lim_thd_sal  ***   
43      !!   
44      !! ** Purpose :   computes new salinities in the ice
45      !!
46      !! ** Method  :  3 possibilities
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]
50      !!---------------------------------------------------------------------
51      INTEGER, INTENT(in) ::   kideb, kiut   ! thickness category index
52      !
53      INTEGER  ::   ji, jk     ! dummy loop indices
54      REAL(wp) ::   iflush, igravdr   ! local scalars
55      !!---------------------------------------------------------------------
56
57      !---------------------------------------------------------
58      !  0) Update ice salinity from snow-ice and bottom growth
59      !---------------------------------------------------------
60      DO ji = kideb, kiut
61         sm_i_1d(ji) = sm_i_1d(ji) + dsm_i_se_1d(ji) + dsm_i_si_1d(ji)
62      END DO
63 
64      !--------------------------------------------------------------------|
65      ! 1) salinity constant in time                                       |
66      !--------------------------------------------------------------------|
67      ! do nothing
68
69      !----------------------------------------------------------------------|
70      !  2) salinity varying in time                                         |
71      !----------------------------------------------------------------------|
72      IF(  nn_icesal == 2  ) THEN
73
74         DO ji = kideb, kiut
75            !
76            ! Switches
77            !----------
78            iflush  = MAX( 0._wp , SIGN( 1._wp , t_su_1d(ji) - rt0 )        )     ! =1 if summer
79            igravdr = MAX( 0._wp , SIGN( 1._wp , t_bo_1d(ji) - t_su_1d(ji) ) )    ! =1 if t_su < t_bo
80
81            !---------------------
82            ! Salinity tendencies
83            !---------------------
84            ! drainage by gravity drainage
85            dsm_i_gd_1d(ji) = - igravdr * MAX( sm_i_1d(ji) - rn_sal_gd , 0._wp ) / rn_time_gd * rdt_ice 
86            ! drainage by flushing 
87            dsm_i_fl_1d(ji) = - iflush  * MAX( sm_i_1d(ji) - rn_sal_fl , 0._wp ) / rn_time_fl * rdt_ice
88
89            !-----------------
90            ! Update salinity   
91            !-----------------
92            ! only drainage terms ( gravity drainage and flushing )
93            ! snow ice / bottom sources are added in lim_thd_ent to conserve energy
94            sm_i_1d(ji) = sm_i_1d(ji) + dsm_i_fl_1d(ji) + dsm_i_gd_1d(ji)
95
96            !----------------------------
97            ! Salt flux - brine drainage
98            !----------------------------
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
100
101         END DO
102
103         ! Salinity profile
104         CALL lim_var_salprof1d( kideb, kiut )
105         !
106      ENDIF 
107
108      !------------------------------------------------------------------------------|
109      !  3) vertical profile of salinity, constant in time                           |
110      !------------------------------------------------------------------------------|
111      IF(  nn_icesal == 3  )   CALL lim_var_salprof1d( kideb, kiut )
112
113      !
114   END SUBROUTINE lim_thd_sal
115
116
117   SUBROUTINE lim_thd_sal_init
118      !!-------------------------------------------------------------------
119      !!                  ***  ROUTINE lim_thd_sal_init  ***
120      !!
121      !! ** Purpose :   initialization of ice salinity parameters
122      !!
123      !! ** Method  :   Read the namicesal namelist and check the parameter
124      !!              values called at the first timestep (nit000)
125      !!
126      !! ** input   :   Namelist namicesal
127      !!-------------------------------------------------------------------
128      INTEGER  ::   ios                 ! Local integer output status for namelist read
129      NAMELIST/namicesal/ nn_icesal, rn_icesal, rn_sal_gd, rn_time_gd, rn_sal_fl, rn_time_fl,   &
130         &                rn_simax, rn_simin 
131      !!-------------------------------------------------------------------
132      !
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 )
140      IF(lwm) WRITE ( numoni, 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 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
154      ENDIF
155      !
156   END SUBROUTINE lim_thd_sal_init
157
158#else
159   !!----------------------------------------------------------------------
160   !!   Default option         Dummy Module          No LIM-3 sea-ice model
161   !!----------------------------------------------------------------------
162#endif
163   !!======================================================================
164END MODULE limthd_sal
Note: See TracBrowser for help on using the repository browser.