1 | MODULE 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 | !!---------------------------------------------------------------------- |
---|
38 | CONTAINS |
---|
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) Constant salinity, constant in time | |
---|
66 | !------------------------------------------------------------------------------| |
---|
67 | !!gm comment: if nn_icesal = 1 s_i_new, s_i_1d and sm_i_1d can be set to rn_icesal one for all in the initialisation phase !! |
---|
68 | !!gm ===>>> simplification of almost all test on nn_icesal value |
---|
69 | IF( nn_icesal == 1 ) THEN |
---|
70 | s_i_1d (kideb:kiut,1:nlay_i) = rn_icesal |
---|
71 | sm_i_1d(kideb:kiut) = rn_icesal |
---|
72 | s_i_new(kideb:kiut) = rn_icesal |
---|
73 | ENDIF |
---|
74 | |
---|
75 | !------------------------------------------------------------------------------| |
---|
76 | ! Module 2 : Constant salinity varying in time | |
---|
77 | !------------------------------------------------------------------------------| |
---|
78 | IF( nn_icesal == 2 ) THEN |
---|
79 | |
---|
80 | DO ji = kideb, kiut |
---|
81 | ! |
---|
82 | ! Switches |
---|
83 | !---------- |
---|
84 | iflush = MAX( 0._wp , SIGN( 1._wp , t_su_1d(ji) - rt0 ) ) ! =1 if summer |
---|
85 | igravdr = MAX( 0._wp , SIGN( 1._wp , t_bo_1d(ji) - t_su_1d(ji) ) ) ! =1 if t_su < t_bo |
---|
86 | |
---|
87 | !--------------------- |
---|
88 | ! Salinity tendencies |
---|
89 | !--------------------- |
---|
90 | ! drainage by gravity drainage |
---|
91 | dsm_i_gd_1d(ji) = - igravdr * MAX( sm_i_1d(ji) - rn_sal_gd , 0._wp ) / rn_time_gd * rdt_ice |
---|
92 | ! drainage by flushing |
---|
93 | dsm_i_fl_1d(ji) = - iflush * MAX( sm_i_1d(ji) - rn_sal_fl , 0._wp ) / rn_time_fl * rdt_ice |
---|
94 | |
---|
95 | !----------------- |
---|
96 | ! Update salinity |
---|
97 | !----------------- |
---|
98 | ! only drainage terms ( gravity drainage and flushing ) |
---|
99 | ! snow ice / bottom sources are added in lim_thd_ent to conserve energy |
---|
100 | sm_i_1d(ji) = sm_i_1d(ji) + dsm_i_fl_1d(ji) + dsm_i_gd_1d(ji) |
---|
101 | |
---|
102 | !---------------------------- |
---|
103 | ! Salt flux - brine drainage |
---|
104 | !---------------------------- |
---|
105 | 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 |
---|
106 | |
---|
107 | END DO |
---|
108 | |
---|
109 | ! Salinity profile |
---|
110 | CALL lim_var_salprof1d( kideb, kiut ) |
---|
111 | ! |
---|
112 | ENDIF |
---|
113 | |
---|
114 | !------------------------------------------------------------------------------| |
---|
115 | ! Module 3 : Profile of salinity, constant in time | |
---|
116 | !------------------------------------------------------------------------------| |
---|
117 | IF( nn_icesal == 3 ) CALL lim_var_salprof1d( kideb, kiut ) |
---|
118 | |
---|
119 | ! |
---|
120 | END SUBROUTINE lim_thd_sal |
---|
121 | |
---|
122 | |
---|
123 | SUBROUTINE lim_thd_sal_init |
---|
124 | !!------------------------------------------------------------------- |
---|
125 | !! *** ROUTINE lim_thd_sal_init *** |
---|
126 | !! |
---|
127 | !! ** Purpose : initialization of ice salinity parameters |
---|
128 | !! |
---|
129 | !! ** Method : Read the namicesal namelist and check the parameter |
---|
130 | !! values called at the first timestep (nit000) |
---|
131 | !! |
---|
132 | !! ** input : Namelist namicesal |
---|
133 | !!------------------------------------------------------------------- |
---|
134 | INTEGER :: ios ! Local integer output status for namelist read |
---|
135 | NAMELIST/namicesal/ nn_icesal, rn_icesal, rn_sal_gd, rn_time_gd, rn_sal_fl, rn_time_fl, & |
---|
136 | & rn_simax, rn_simin |
---|
137 | !!------------------------------------------------------------------- |
---|
138 | ! |
---|
139 | REWIND( numnam_ice_ref ) ! Namelist namicesal in reference namelist : Ice salinity |
---|
140 | READ ( numnam_ice_ref, namicesal, IOSTAT = ios, ERR = 901) |
---|
141 | 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namicesal in reference namelist', lwp ) |
---|
142 | |
---|
143 | REWIND( numnam_ice_cfg ) ! Namelist namicesal in configuration namelist : Ice salinity |
---|
144 | READ ( numnam_ice_cfg, namicesal, IOSTAT = ios, ERR = 902 ) |
---|
145 | 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namicesal in configuration namelist', lwp ) |
---|
146 | IF(lwm) WRITE ( numoni, namicesal ) |
---|
147 | ! |
---|
148 | IF(lwp) THEN ! control print |
---|
149 | WRITE(numout,*) |
---|
150 | WRITE(numout,*) 'lim_thd_sal_init : Ice parameters for salinity ' |
---|
151 | WRITE(numout,*) '~~~~~~~~~~~~~~~~' |
---|
152 | WRITE(numout,*) ' switch for salinity nn_icesal = ', nn_icesal |
---|
153 | WRITE(numout,*) ' bulk salinity value if nn_icesal = 1 = ', rn_icesal |
---|
154 | WRITE(numout,*) ' restoring salinity for GD = ', rn_sal_gd |
---|
155 | WRITE(numout,*) ' restoring time for GD = ', rn_time_gd |
---|
156 | WRITE(numout,*) ' restoring salinity for flushing = ', rn_sal_fl |
---|
157 | WRITE(numout,*) ' restoring time for flushing = ', rn_time_fl |
---|
158 | WRITE(numout,*) ' Maximum tolerated ice salinity = ', rn_simax |
---|
159 | WRITE(numout,*) ' Minimum tolerated ice salinity = ', rn_simin |
---|
160 | ENDIF |
---|
161 | ! |
---|
162 | END SUBROUTINE lim_thd_sal_init |
---|
163 | |
---|
164 | #else |
---|
165 | !!---------------------------------------------------------------------- |
---|
166 | !! Default option Dummy Module No LIM-3 sea-ice model |
---|
167 | !!---------------------------------------------------------------------- |
---|
168 | #endif |
---|
169 | !!====================================================================== |
---|
170 | END MODULE limthd_sal |
---|