1 | MODULE limdia |
---|
2 | !!====================================================================== |
---|
3 | !! *** MODULE limdia *** |
---|
4 | !! LIM-3 sea ice model : diagnostics of ice model |
---|
5 | !!====================================================================== |
---|
6 | !! History : 3.2 ! 2007-01 (M. Vancoppenolle) Code adapted from LIM-2 |
---|
7 | !! - ! 2008-03 (M. Vancoppenolle) add lim_dia_init |
---|
8 | !!---------------------------------------------------------------------- |
---|
9 | #if defined key_lim3 |
---|
10 | !!---------------------------------------------------------------------- |
---|
11 | !! 'key_lim3' LIM3 sea-ice model |
---|
12 | !!---------------------------------------------------------------------- |
---|
13 | !! lim_dia : computation and output of the time evolution of keys variables |
---|
14 | !! lim_dia_init : initialization and namelist read |
---|
15 | !!---------------------------------------------------------------------- |
---|
16 | USE ice ! LIM-3: sea-ice variable |
---|
17 | USE par_ice ! LIM-3: ice parameters |
---|
18 | USE dom_ice ! LIM-3: sea-ice domain |
---|
19 | USE dom_oce ! ocean domain |
---|
20 | USE sbc_oce ! surface boundary condition: ocean fields |
---|
21 | USE daymod ! model calendar |
---|
22 | USE phycst ! physical constant |
---|
23 | USE in_out_manager ! I/O manager |
---|
24 | USE lib_mpp ! MPP library |
---|
25 | USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) |
---|
26 | |
---|
27 | IMPLICIT NONE |
---|
28 | PRIVATE |
---|
29 | |
---|
30 | PUBLIC lim_dia ! called by ice_step |
---|
31 | |
---|
32 | INTEGER, PUBLIC :: ntmoy = 1 !: instantaneous values of ice evolution or averaging ntmoy |
---|
33 | INTEGER, PUBLIC :: ninfo = 1 !: frequency of ouputs on file ice_evolu in case of averaging |
---|
34 | |
---|
35 | ! !!! Parameters for outputs to files "evolu" |
---|
36 | INTEGER, PARAMETER :: jpinfmx = 100 ! maximum number of key variables |
---|
37 | INTEGER, PARAMETER :: jpchinf = 5 ! ??? |
---|
38 | INTEGER, PARAMETER :: jpchsep = jpchinf + 2 ! ??? |
---|
39 | |
---|
40 | INTEGER :: nfrinf = 4 ! number of variables written in one line |
---|
41 | INTEGER :: nferme ! last time step at which the var. are written on file |
---|
42 | INTEGER :: nvinfo ! number of total variables |
---|
43 | INTEGER :: nbvt ! number of time variables |
---|
44 | INTEGER :: naveg ! number of step for accumulation before averaging |
---|
45 | REAL(wp) :: epsi06 = 1.e-6_wp ! small number |
---|
46 | |
---|
47 | CHARACTER(len= 8) :: fmtinf = '1PE13.5 ' ! format of the output values |
---|
48 | CHARACTER(len=30) :: fmtw ! formats |
---|
49 | CHARACTER(len=30) :: fmtr ! ??? |
---|
50 | CHARACTER(len=30) :: fmtitr ! ??? |
---|
51 | |
---|
52 | CHARACTER(len=jpchsep), DIMENSION(jpinfmx) :: titvar ! title of key variables |
---|
53 | |
---|
54 | REAL(wp), DIMENSION(jpinfmx) :: vinfom ! temporary working space |
---|
55 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: aire ! masked grid cell area |
---|
56 | |
---|
57 | !! * Substitutions |
---|
58 | # include "vectopt_loop_substitute.h90" |
---|
59 | !!---------------------------------------------------------------------- |
---|
60 | !! NEMO/LIM3 3.3 , UCL - NEMO Consortium (2010) |
---|
61 | !! $Id$ |
---|
62 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
63 | !!---------------------------------------------------------------------- |
---|
64 | CONTAINS |
---|
65 | |
---|
66 | SUBROUTINE lim_dia |
---|
67 | !!-------------------------------------------------------------------- |
---|
68 | !! *** ROUTINE lim_dia *** |
---|
69 | !! |
---|
70 | !! ** Purpose : Computation and outputs on file ice.evolu |
---|
71 | !! the temporal evolution of some key variables |
---|
72 | !!------------------------------------------------------------------- |
---|
73 | INTEGER :: jv, ji, jj, jl ! dummy loop indices |
---|
74 | INTEGER :: ii0, ii1, ij0, ij1 ! temporary integer |
---|
75 | REAL(wp) :: zshift_date ! date from the minimum ice extent |
---|
76 | REAL(wp) :: zday, zday_min ! current day, day of minimum extent |
---|
77 | REAL(wp) :: zafy, zamy ! temporary area of fy and my ice |
---|
78 | REAL(wp) :: zindb |
---|
79 | REAL(wp), DIMENSION(jpinfmx) :: vinfor ! 1D workspace |
---|
80 | !!------------------------------------------------------------------- |
---|
81 | |
---|
82 | ! 0) date from the minimum of ice extent |
---|
83 | !--------------------------------------- |
---|
84 | zday_min = 273._wp ! zday_min = date of minimum extent, here September 30th |
---|
85 | zday = REAL(numit-nit000,wp) * rdt_ice / ( 86400._wp * REAL(nn_fsbc,wp) ) |
---|
86 | ! |
---|
87 | IF( zday > zday_min ) THEN ; zshift_date = zday - zday_min |
---|
88 | ELSE ; zshift_date = zday - (365.0 - zday_min) |
---|
89 | ENDIF |
---|
90 | |
---|
91 | IF( numit == nstart ) CALL lim_dia_init ! initialisation of ice_evolu file |
---|
92 | |
---|
93 | vinfor(1) = REAL(numit) ! time diagnostics |
---|
94 | vinfor(2) = nyear |
---|
95 | |
---|
96 | DO jv = nbvt + 1, nvinfo ! put everything to zero |
---|
97 | vinfor(jv) = 0._wp |
---|
98 | END DO |
---|
99 | |
---|
100 | !!------------------------------------------------------------------- |
---|
101 | !! 1) Northern hemisphere |
---|
102 | !!------------------------------------------------------------------- |
---|
103 | !! 1.1) Diagnostics independent on age |
---|
104 | !!------------------------------------ |
---|
105 | DO jj = njeq, jpjm1 |
---|
106 | DO ji = fs_2, fs_jpim1 ! vector opt. |
---|
107 | IF( tms(ji,jj) == 1 ) THEN |
---|
108 | vinfor(3) = vinfor(3) + at_i(ji,jj)*aire(ji,jj) * 1.e-12_wp !ice area |
---|
109 | IF ( at_i(ji,jj) > 0.15 ) vinfor(5) = vinfor(5) + aire(ji,jj) * 1.e-12_wp !ice extent |
---|
110 | vinfor(7) = vinfor(7) + vt_i(ji,jj)*aire(ji,jj) * 1.e-12_wp !ice volume |
---|
111 | vinfor(9) = vinfor(9) + vt_s(ji,jj)*aire(ji,jj) * 1.e-12_wp !snow volume |
---|
112 | vinfor(15) = vinfor(15) + ot_i(ji,jj) *vt_i(ji,jj)*aire(ji,jj) * 1.e-12_wp !mean age |
---|
113 | vinfor(29) = vinfor(29) + smt_i(ji,jj)*vt_i(ji,jj)*aire(ji,jj) * 1.e-12_wp !mean salinity |
---|
114 | ! the computation of this diagnostic is not reliable |
---|
115 | vinfor(31) = vinfor(31) + vt_i(ji,jj) * ( u_ice(ji,jj)*u_ice(ji,jj) & |
---|
116 | & + v_ice(ji,jj)*v_ice(ji,jj) ) * aire(ji,jj) * 1.e-12 |
---|
117 | vinfor(53) = vinfor(53) + sfx (ji,jj)*aire(ji,jj) * 1.e-12_wp !salt flux |
---|
118 | vinfor(55) = vinfor(55) + sfx_bri(ji,jj)*aire(ji,jj) * 1.e-12_wp !brine drainage flux |
---|
119 | vinfor(57) = vinfor(57) + sfx_thd(ji,jj)*aire(ji,jj) * 1.e-12_wp !equivalent salt flux |
---|
120 | vinfor(59) = vinfor(59) +(sst_m(ji,jj)+rt0)*at_i(ji,jj)*aire(ji,jj) * 1.e-12_wp !SST |
---|
121 | vinfor(61) = vinfor(61) + sss_m(ji,jj)*at_i(ji,jj)*aire(ji,jj) * 1.e-12_wp !SSS |
---|
122 | vinfor(65) = vinfor(65) + et_s(ji,jj)/1.0e9*aire(ji,jj) * 1.e-12_wp ! snow temperature |
---|
123 | vinfor(67) = vinfor(67) + et_i(ji,jj)/1.0e9*aire(ji,jj) * 1.e-12_wp ! ice heat content |
---|
124 | vinfor(69) = vinfor(69) + v_i(ji,jj,1)*aire(ji,jj) * 1.e-12_wp !ice volume |
---|
125 | vinfor(71) = vinfor(71) + v_i(ji,jj,2)*aire(ji,jj) * 1.e-12_wp !ice volume |
---|
126 | vinfor(73) = vinfor(73) + v_i(ji,jj,3)*aire(ji,jj) * 1.e-12_wp !ice volume |
---|
127 | vinfor(75) = vinfor(75) + v_i(ji,jj,4)*aire(ji,jj) * 1.e-12_wp !ice volume |
---|
128 | vinfor(77) = vinfor(77) + v_i(ji,jj,5)*aire(ji,jj) * 1.e-12_wp !ice volume |
---|
129 | vinfor(79) = 0.0 |
---|
130 | vinfor(81) = vinfor(81) + emp(ji,jj)*aire(ji,jj) * 1.e-12_wp ! mass flux |
---|
131 | ENDIF |
---|
132 | END DO |
---|
133 | END DO |
---|
134 | |
---|
135 | DO jl = ice_cat_bounds(1,1), ice_cat_bounds(1,2) |
---|
136 | DO jj = njeq, jpjm1 |
---|
137 | DO ji = fs_2, fs_jpim1 ! vector opt. |
---|
138 | IF( tms(ji,jj) == 1 ) THEN |
---|
139 | vinfor(11) = vinfor(11) + v_i(ji,jj,jl)*aire(ji,jj) * 1.e-12_wp !undef def ice volume |
---|
140 | ENDIF |
---|
141 | END DO |
---|
142 | END DO |
---|
143 | END DO |
---|
144 | |
---|
145 | vinfor(13) = 0._wp |
---|
146 | |
---|
147 | vinfor(15) = vinfor(15) / MAX(vinfor(7),epsi06) ! these have to be divided by total ice volume to have the |
---|
148 | vinfor(29) = vinfor(29) / MAX(vinfor(7),epsi06) ! right value |
---|
149 | vinfor(31) = SQRT( vinfor(31) / MAX( vinfor(7) , epsi06 ) ) |
---|
150 | vinfor(67) = vinfor(67) / MAX(vinfor(7),epsi06) |
---|
151 | |
---|
152 | vinfor(53) = vinfor(53) / MAX(vinfor(5),epsi06) ! these have to be divided by total ice extent to have the |
---|
153 | vinfor(55) = vinfor(55) / MAX(vinfor(5),epsi06) ! right value |
---|
154 | vinfor(57) = vinfor(57) / MAX(vinfor(5),epsi06) ! |
---|
155 | vinfor(79) = vinfor(79) / MAX(vinfor(5),epsi06) ! |
---|
156 | |
---|
157 | zindb = 1.0 - MAX(0.0,SIGN(1.0,-vinfor(3))) ! |
---|
158 | vinfor(59) = zindb*vinfor(59) / MAX(vinfor(3),epsi06) ! divide by ice area |
---|
159 | vinfor(61) = zindb*vinfor(61) / MAX(vinfor(3),epsi06) ! |
---|
160 | |
---|
161 | zindb = 1.0 - MAX(0.0,SIGN(1.0,-vinfor(9))) ! |
---|
162 | vinfor(65) = zindb*vinfor(65) / MAX(vinfor(9),epsi06) ! divide it by snow volume |
---|
163 | |
---|
164 | |
---|
165 | DO jl = 1, jpl |
---|
166 | DO jj = njeq, jpjm1 |
---|
167 | DO ji = fs_2, fs_jpim1 ! vector opt. |
---|
168 | IF( tms(ji,jj) == 1 ) THEN |
---|
169 | vinfor(33) = vinfor(33) + d_v_i_trp(ji,jj,jl)*aire(ji,jj) * 1.e-12_wp !ice volume |
---|
170 | vinfor(35) = vinfor(35) + d_v_i_thd(ji,jj,jl)*aire(ji,jj) * 1.e-12_wp !ice volume |
---|
171 | ENDIF |
---|
172 | END DO |
---|
173 | END DO |
---|
174 | END DO |
---|
175 | |
---|
176 | DO jj = njeq, jpjm1 |
---|
177 | DO ji = fs_2, fs_jpim1 ! vector opt. |
---|
178 | IF( tms(ji,jj) == 1 ) THEN |
---|
179 | vinfor(37) = vinfor(37) + diag_sni_gr(ji,jj)*aire(ji,jj) * 1.e-12_wp !th growth rates |
---|
180 | vinfor(39) = vinfor(39) + diag_lat_gr(ji,jj)*aire(ji,jj) * 1.e-12_wp |
---|
181 | vinfor(41) = vinfor(41) + diag_bot_gr(ji,jj)*aire(ji,jj) * 1.e-12_wp |
---|
182 | vinfor(43) = vinfor(43) + diag_dyn_gr(ji,jj)*aire(ji,jj) * 1.e-12_wp |
---|
183 | vinfor(45) = vinfor(45) + dv_dt_thd(ji,jj,5)*aire(ji,jj) * 1.e-12_wp |
---|
184 | vinfor(47) = vinfor(47) + v_newice(ji,jj) *aire(ji,jj) * 1.e-12_wp * r1_rdtice ! volume acc in OW |
---|
185 | ENDIF |
---|
186 | END DO |
---|
187 | END DO |
---|
188 | |
---|
189 | DO jl = 1, jpl |
---|
190 | DO jj = njeq, jpjm1 |
---|
191 | DO ji = fs_2, fs_jpim1 ! vector opt. |
---|
192 | IF( tms(ji,jj) == 1 ) THEN |
---|
193 | vinfor(63) = vinfor(63) + t_su(ji,jj,jl)*a_i(ji,jj,jl)*aire(ji,jj) * 1.e-12_wp |
---|
194 | ENDIF |
---|
195 | END DO |
---|
196 | END DO |
---|
197 | END DO |
---|
198 | vinfor(63) = vinfor(63) / MAX(vinfor(3),epsi06) ! these have to be divided by total ice area |
---|
199 | |
---|
200 | !! 1.2) Diagnostics dependent on age |
---|
201 | !!------------------------------------ |
---|
202 | DO jj = njeq, jpjm1 |
---|
203 | DO ji = fs_2, fs_jpim1 ! vector opt. |
---|
204 | IF( tms(ji,jj) == 1 ) THEN |
---|
205 | zafy = 0.0 |
---|
206 | zamy = 0.0 |
---|
207 | DO jl = 1, jpl |
---|
208 | IF ((o_i(ji,jj,jl) - zshift_date).LT.0.0) THEN |
---|
209 | vinfor(17) = vinfor(17) + a_i(ji,jj,jl)*aire(ji,jj) * 1.e-12_wp ! FY ice area |
---|
210 | vinfor(25) = vinfor(25) + v_i(ji,jj,jl)*aire(ji,jj) * 1.e-12_wp ! FY ice volume |
---|
211 | vinfor(49) = vinfor(49) + sm_i(ji,jj,jl)*v_i(ji,jj,jl)*aire(ji,jj) * 1.e-12_wp !FY ice salinity |
---|
212 | zafy = zafy + a_i(ji,jj,jl) |
---|
213 | ENDIF |
---|
214 | IF ((o_i(ji,jj,jl) - zshift_date).GT.0.0) THEN |
---|
215 | vinfor(19) = vinfor(19) + a_i(ji,jj,jl)*aire(ji,jj) * 1.e-12_wp ! MY ice area |
---|
216 | vinfor(27) = vinfor(27) + v_i(ji,jj,jl)*aire(ji,jj) * 1.e-12_wp ! MY ice volume |
---|
217 | vinfor(51) = vinfor(51) + sm_i(ji,jj,jl)*v_i(ji,jj,jl)*aire(ji,jj) * 1.e-12_wp !MY ice salinity |
---|
218 | zamy = zamy + a_i(ji,jj,jl) |
---|
219 | ENDIF |
---|
220 | END DO |
---|
221 | IF ((at_i(ji,jj).GT.0.15).AND.(zafy.GT.zamy)) THEN |
---|
222 | vinfor(21) = vinfor(21) + aire(ji,jj) * 1.e-12_wp ! Seasonal ice extent |
---|
223 | ENDIF |
---|
224 | IF ((at_i(ji,jj).GT.0.15).AND.(zafy.LE.zamy)) THEN |
---|
225 | vinfor(23) = vinfor(23) + aire(ji,jj) * 1.e-12_wp ! Perennial ice extent |
---|
226 | ENDIF |
---|
227 | ENDIF |
---|
228 | END DO |
---|
229 | END DO |
---|
230 | zindb = 1.0 - MAX(0.0,SIGN(1.0,-vinfor(25))) !=0 if no multiyear ice 1 if yes |
---|
231 | vinfor(49) = zindb*vinfor(49) / MAX(vinfor(25),epsi06) |
---|
232 | zindb = 1.0 - MAX(0.0,SIGN(1.0,-vinfor(27))) !=0 if no multiyear ice 1 if yes |
---|
233 | vinfor(51) = zindb*vinfor(51) / MAX(vinfor(27),epsi06) |
---|
234 | |
---|
235 | IF( cp_cfg == "orca" ) THEN !* ORCA configuration : Fram Strait Export |
---|
236 | SELECT CASE ( jp_cfg ) |
---|
237 | CASE ( 2 ) ! ORCA_R2 |
---|
238 | ij0 = 136 ; ij1 = 136 ! Fram strait : 83 = area export |
---|
239 | ii0 = 134 ; ii1 = 138 ! 84 = volume export |
---|
240 | DO jj = mj0(ij0):mj1(ij1) |
---|
241 | DO ji = mi0(ii0):mi1(ii1) |
---|
242 | vinfor(83) = vinfor(83) - v_ice(ji,jj) * e1t(ji,jj)*at_i(ji,jj)*rdt_ice * 1.e-12_wp |
---|
243 | vinfor(84) = vinfor(84) - v_ice(ji,jj) * e1t(ji,jj)*vt_i(ji,jj)*rdt_ice * 1.e-12_wp |
---|
244 | END DO |
---|
245 | END DO |
---|
246 | !!gm just above, this is NOT the correct way of evaluating the transport ! |
---|
247 | !!gm mass of snow is missing and v_ice should be the mean between jj and jj+1 |
---|
248 | !!gm Other ORCA configurations should be added |
---|
249 | ENDIF |
---|
250 | |
---|
251 | !!------------------------------------------------------------------- |
---|
252 | !! 2) Southern hemisphere |
---|
253 | !!------------------------------------------------------------------- |
---|
254 | !! 2.1) Diagnostics independent on age |
---|
255 | !!------------------------------------ |
---|
256 | DO jj = 2, njeqm1 |
---|
257 | DO ji = fs_2, fs_jpim1 ! vector opt. |
---|
258 | IF( tms(ji,jj) == 1 ) THEN |
---|
259 | vinfor(4) = vinfor(4) + at_i(ji,jj)*aire(ji,jj) * 1.e-12_wp !ice area |
---|
260 | IF (at_i(ji,jj).GT.0.15) vinfor(6) = vinfor(6) + aire(ji,jj) * 1.e-12_wp !ice extent |
---|
261 | vinfor(8) = vinfor(8) + vt_i(ji,jj)*aire(ji,jj) * 1.e-12_wp !ice volume |
---|
262 | vinfor(10) = vinfor(10) + vt_s(ji,jj)*aire(ji,jj) * 1.e-12_wp !snow volume |
---|
263 | vinfor(16) = vinfor(16) + ot_i(ji,jj)*vt_i(ji,jj)*aire(ji,jj) * 1.e-12_wp !mean age |
---|
264 | vinfor(30) = vinfor(30) + smt_i(ji,jj)*vt_i(ji,jj)*aire(ji,jj) * 1.e-12_wp !mean salinity |
---|
265 | ! this diagnostic is not well computed (weighted by vol instead |
---|
266 | ! of area) |
---|
267 | vinfor(32) = vinfor(32) + vt_i(ji,jj)*( u_ice(ji,jj)*u_ice(ji,jj) + & |
---|
268 | v_ice(ji,jj)*v_ice(ji,jj) )*aire(ji,jj)/1.0e12 !ice vel |
---|
269 | vinfor(54) = vinfor(54) + sfx (ji,jj)*aire(ji,jj) * 1.e-12_wp ! Total salt flux |
---|
270 | vinfor(56) = vinfor(56) + sfx_bri(ji,jj)*aire(ji,jj) * 1.e-12_wp ! Brine drainage salt flux |
---|
271 | vinfor(58) = vinfor(58) + sfx_thd(ji,jj)*aire(ji,jj) * 1.e-12_wp ! Equivalent salt flux |
---|
272 | vinfor(60) = vinfor(60) +(sst_m(ji,jj)+rt0)*at_i(ji,jj)*aire(ji,jj) * 1.e-12_wp !SST |
---|
273 | vinfor(62) = vinfor(62) + sss_m(ji,jj)*at_i(ji,jj)*aire(ji,jj) * 1.e-12_wp !SSS |
---|
274 | vinfor(66) = vinfor(66) + et_s(ji,jj)/1.0e9*aire(ji,jj) * 1.e-12_wp ! snow temperature |
---|
275 | vinfor(68) = vinfor(68) + et_i(ji,jj)/1.0e9*aire(ji,jj) * 1.e-12_wp ! ice enthalpy |
---|
276 | vinfor(70) = vinfor(70) + v_i(ji,jj,1)*aire(ji,jj) * 1.e-12_wp !ice volume |
---|
277 | vinfor(72) = vinfor(72) + v_i(ji,jj,2)*aire(ji,jj) * 1.e-12_wp !ice volume |
---|
278 | vinfor(74) = vinfor(74) + v_i(ji,jj,3)*aire(ji,jj) * 1.e-12_wp !ice volume |
---|
279 | vinfor(76) = vinfor(76) + v_i(ji,jj,4)*aire(ji,jj) * 1.e-12_wp !ice volume |
---|
280 | vinfor(78) = vinfor(78) + v_i(ji,jj,5)*aire(ji,jj) * 1.e-12_wp !ice volume |
---|
281 | vinfor(80) = 0.0 |
---|
282 | vinfor(82) = vinfor(82) + emp(ji,jj)*aire(ji,jj) * 1.e-12_wp ! mass flux |
---|
283 | ENDIF |
---|
284 | END DO |
---|
285 | END DO |
---|
286 | |
---|
287 | DO jl = ice_cat_bounds(1,1), ice_cat_bounds(1,2) |
---|
288 | DO jj = 2, njeqm1 |
---|
289 | DO ji = fs_2, fs_jpim1 ! vector opt. |
---|
290 | vinfor(12) = vinfor(12) + v_i(ji,jj,jl)*aire(ji,jj) * 1.e-12_wp !undef def ice volume |
---|
291 | END DO |
---|
292 | END DO |
---|
293 | END DO |
---|
294 | |
---|
295 | vinfor(14) = 0.0 |
---|
296 | |
---|
297 | zindb = 1.0 - MAX(0.0,SIGN(1.0,-vinfor(8))) |
---|
298 | vinfor(16) = zindb * vinfor(16) / MAX(vinfor(8),epsi06) ! these have to be divided by ice vol |
---|
299 | vinfor(30) = zindb * vinfor(30) / MAX(vinfor(8),epsi06) ! |
---|
300 | vinfor(32) = zindb * SQRT( vinfor(32) / MAX( vinfor(8) , epsi06 ) ) |
---|
301 | vinfor(68) = zindb * vinfor(68) / MAX(vinfor(8),epsi06) ! |
---|
302 | |
---|
303 | zindb = 1.0 - MAX(0.0,SIGN(1.0,-vinfor(6))) |
---|
304 | vinfor(54) = zindb * vinfor(54) / MAX(vinfor(6),epsi06) ! these have to be divided by ice extt |
---|
305 | vinfor(56) = zindb * vinfor(56) / MAX(vinfor(6),epsi06) ! |
---|
306 | vinfor(58) = zindb * vinfor(58) / MAX(vinfor(6),epsi06) ! |
---|
307 | vinfor(80) = zindb * vinfor(80) / MAX(vinfor(6),epsi06) ! |
---|
308 | ! vinfor(84) = vinfor(84) / vinfor(6) ! |
---|
309 | |
---|
310 | zindb = 1.0 - MAX(0.0,SIGN(1.0,-vinfor(4))) ! |
---|
311 | vinfor(60) = zindb*vinfor(60) / ( MAX(vinfor(4), epsi06) ) ! divide by ice area |
---|
312 | vinfor(62) = zindb*vinfor(62) / ( MAX(vinfor(4), epsi06) ) ! |
---|
313 | |
---|
314 | zindb = 1.0 - MAX(0.0,SIGN(1.0,-vinfor(10))) ! |
---|
315 | vinfor(66) = zindb*vinfor(66) / MAX(vinfor(10),epsi06) ! divide it by snow volume |
---|
316 | |
---|
317 | DO jl = 1, jpl |
---|
318 | DO jj = 2, njeqm1 |
---|
319 | DO ji = fs_2, fs_jpim1 ! vector opt. |
---|
320 | IF( tms(ji,jj) == 1 ) THEN |
---|
321 | vinfor(34) = vinfor(34) + d_v_i_trp(ji,jj,jl)*aire(ji,jj) * 1.e-12_wp !ice volume |
---|
322 | vinfor(36) = vinfor(36) + d_v_i_thd(ji,jj,jl)*aire(ji,jj) * 1.e-12_wp !ice volume |
---|
323 | ENDIF |
---|
324 | END DO |
---|
325 | END DO |
---|
326 | END DO |
---|
327 | |
---|
328 | DO jj = 2, njeqm1 |
---|
329 | DO ji = fs_2, fs_jpim1 ! vector opt. |
---|
330 | IF( tms(ji,jj) == 1 ) THEN |
---|
331 | vinfor(38) = vinfor(38) + diag_sni_gr(ji,jj)*aire(ji,jj) * 1.e-12_wp !th growth rates |
---|
332 | vinfor(40) = vinfor(40) + diag_lat_gr(ji,jj)*aire(ji,jj) * 1.e-12_wp |
---|
333 | vinfor(42) = vinfor(42) + diag_bot_gr(ji,jj)*aire(ji,jj) * 1.e-12_wp |
---|
334 | vinfor(44) = vinfor(44) + diag_dyn_gr(ji,jj)*aire(ji,jj) * 1.e-12_wp |
---|
335 | vinfor(46) = vinfor(46) + dv_dt_thd(ji,jj,5)*aire(ji,jj) * 1.e-12_wp |
---|
336 | vinfor(48) = vinfor(48) + v_newice(ji,jj) *aire(ji,jj) * 1.e-12_wp * r1_rdtice ! volume acc in OW |
---|
337 | ENDIF |
---|
338 | END DO |
---|
339 | END DO |
---|
340 | |
---|
341 | DO jl = 1, jpl |
---|
342 | DO jj = 2, njeqm1 |
---|
343 | DO ji = fs_2, fs_jpim1 ! vector opt. |
---|
344 | IF( tms(ji,jj) == 1 ) THEN |
---|
345 | vinfor(64) = vinfor(64) + t_su(ji,jj,jl)*a_i(ji,jj,jl)*aire(ji,jj) * 1.e-12_wp |
---|
346 | ENDIF |
---|
347 | END DO |
---|
348 | END DO |
---|
349 | END DO |
---|
350 | zindb = 1._wp - MAX( 0._wp , SIGN( 1._wp , -vinfor(4) ) ) ! |
---|
351 | vinfor(64) = zindb * vinfor(64) / MAX( vinfor(4) , epsi06 ) ! divide by ice extt |
---|
352 | !! 2.2) Diagnostics dependent on age |
---|
353 | !!------------------------------------ |
---|
354 | DO jj = 2, njeqm1 |
---|
355 | DO ji = fs_2, fs_jpim1 ! vector opt. |
---|
356 | IF( tms(ji,jj) == 1 ) THEN |
---|
357 | zafy = 0._wp |
---|
358 | zamy = 0._wp |
---|
359 | DO jl = 1, jpl |
---|
360 | IF( (o_i(ji,jj,jl) - zshift_date) < 0._wp ) THEN |
---|
361 | vinfor(18) = vinfor(18) + a_i(ji,jj,jl)*aire(ji,jj) * 1.e-12_wp ! FY ice area |
---|
362 | vinfor(26) = vinfor(26) + v_i(ji,jj,jl)*aire(ji,jj) * 1.e-12_wp ! FY ice volume |
---|
363 | zafy = zafy + a_i(ji,jj,jl) |
---|
364 | vinfor(50) = vinfor(50) + sm_i(ji,jj,jl)*v_i(ji,jj,jl)*aire(ji,jj) * 1.e-12_wp !FY ice salinity |
---|
365 | ENDIF |
---|
366 | IF( (o_i(ji,jj,jl) - zshift_date) > 0._wp ) THEN |
---|
367 | vinfor(20) = vinfor(20) + a_i(ji,jj,jl)*aire(ji,jj) * 1.e-12_wp ! MY ice area |
---|
368 | vinfor(28) = vinfor(28) + v_i(ji,jj,jl)*aire(ji,jj) * 1.e-12_wp |
---|
369 | vinfor(52) = vinfor(52) + sm_i(ji,jj,jl)*v_i(ji,jj,jl)*aire(ji,jj) * 1.e-12_wp !FY ice salinity |
---|
370 | zamy = zamy + a_i(ji,jj,jl) |
---|
371 | ENDIF |
---|
372 | END DO ! jl |
---|
373 | IF ( at_i(ji,jj) > 0.15 .AND. zafy > zamy ) THEN |
---|
374 | vinfor(22) = vinfor(22) + aire(ji,jj) * 1.e-12_wp ! Seasonal ice extent |
---|
375 | ENDIF |
---|
376 | IF ( at_i(ji,jj) > 0.15 .AND. zafy <= zamy ) THEN |
---|
377 | vinfor(24) = vinfor(24) + aire(ji,jj) * 1.e-12_wp ! Perennial ice extent |
---|
378 | ENDIF |
---|
379 | ENDIF ! tms |
---|
380 | END DO ! jj |
---|
381 | END DO ! ji |
---|
382 | zindb = 1.0 - MAX( 0.0,SIGN( 1._wp , -vinfor(26) ) ) !=0 if no multiyear ice 1 if yes |
---|
383 | vinfor(50) = zindb * vinfor(50) / MAX( vinfor(26) , epsi06 ) |
---|
384 | zindb = 1.0 - MAX( 0._wp , SIGN( 1._wp , -vinfor(28) ) ) !=0 if no multiyear ice 1 if yes |
---|
385 | vinfor(52) = zindb * vinfor(52) / MAX( vinfor(28) , epsi06 ) |
---|
386 | |
---|
387 | ! Accumulation before averaging |
---|
388 | DO jv = 1, nvinfo |
---|
389 | vinfom(jv) = vinfom(jv) + vinfor(jv) |
---|
390 | END DO |
---|
391 | naveg = naveg + 1 |
---|
392 | |
---|
393 | ! oututs on file ice_evolu |
---|
394 | !MV IF( MOD( numit , ninfo ) == 0 ) THEN |
---|
395 | WRITE(numevo_ice,fmtw) ( titvar(jv), vinfom(jv)/naveg, jv = 1, nvinfo ) |
---|
396 | naveg = 0 |
---|
397 | DO jv = 1, nvinfo |
---|
398 | vinfom(jv) = 0._wp |
---|
399 | END DO |
---|
400 | !MV ENDIF |
---|
401 | ! |
---|
402 | END SUBROUTINE lim_dia |
---|
403 | |
---|
404 | |
---|
405 | SUBROUTINE lim_dia_init |
---|
406 | !!------------------------------------------------------------------- |
---|
407 | !! *** ROUTINE lim_dia_init *** |
---|
408 | !! |
---|
409 | !! ** Purpose : Preparation of the file ice_evolu for the output of |
---|
410 | !! the temporal evolution of key variables |
---|
411 | !! |
---|
412 | !! ** input : Namelist namicedia |
---|
413 | !!------------------------------------------------------------------- |
---|
414 | INTEGER :: jv ! dummy loop indice |
---|
415 | INTEGER :: ierr, ntot , ndeb , irecl ! local integers |
---|
416 | REAL(wp) :: zxx0, zxx1 ! local scalars |
---|
417 | CHARACTER(len=jpchinf) :: titinf |
---|
418 | CHARACTER(len=50) :: clname |
---|
419 | !! |
---|
420 | NAMELIST/namicedia/fmtinf, nfrinf, ninfo, ntmoy |
---|
421 | !!------------------------------------------------------------------- |
---|
422 | ! |
---|
423 | REWIND( numnam_ice ) ! read namicedia namelist |
---|
424 | READ ( numnam_ice, namicedia ) |
---|
425 | ! |
---|
426 | IF(lwp) THEN ! control print |
---|
427 | WRITE(numout,*) |
---|
428 | WRITE(numout,*) 'lim_dia_init : ice parameters for ice diagnostics ' |
---|
429 | WRITE(numout,*) '~~~~~~~~~~~~' |
---|
430 | WRITE(numout,*) ' format of the output values fmtinf = ', fmtinf |
---|
431 | WRITE(numout,*) ' number of variables written in one line nfrinf = ', nfrinf |
---|
432 | WRITE(numout,*) ' Instantaneous values of ice evolution or averaging ntmoy = ', ntmoy |
---|
433 | WRITE(numout,*) ' frequency of ouputs on file ice_evolu in case of averaging ninfo = ', ninfo |
---|
434 | ENDIF |
---|
435 | |
---|
436 | ALLOCATE( aire(jpi,jpj) , STAT=ierr ) ! masked grid cell area (interior domain only) |
---|
437 | IF( lk_mpp ) CALL mpp_sum( ierr ) |
---|
438 | IF( ierr /= 0 ) CALL ctl_stop( 'STOP', 'lim_dia_init_2 : unable to allocate arrays' ) |
---|
439 | aire(:,:) = area(:,:) * tms(:,:) * tmask_i(:,:) |
---|
440 | |
---|
441 | ! Titles of ice key variables : |
---|
442 | titvar(1) = 'NoIt' ! iteration number |
---|
443 | titvar(2) = 'T yr' ! time step in years |
---|
444 | nbvt = 2 ! number of time variables |
---|
445 | |
---|
446 | titvar(3) = 'AI_N' ! sea ice area in the northern Hemisp.(10^12 km2) |
---|
447 | titvar(4) = 'AI_S' ! sea ice area in the southern Hemisp.(10^12 km2) |
---|
448 | titvar(5) = 'EI_N' ! sea ice extent (15%) in the northern Hemisp.(10^12 km2) |
---|
449 | titvar(6) = 'EI_S' ! sea ice extent (15%) in the southern Hemisp.(10^12 km2) |
---|
450 | titvar(7) = 'VI_N' ! sea ice volume in the northern Hemisp.(10^3 km3) |
---|
451 | titvar(8) = 'VI_S' ! sea ice volume in the southern Hemisp.(10^3 km3) |
---|
452 | titvar(9) = 'VS_N' ! snow volume over sea ice in the northern Hemisp.(10^3 km3) |
---|
453 | titvar(10)= 'VS_S' ! snow volume over sea ice in the northern Hemisp.(10^3 km3) |
---|
454 | titvar(11)= 'VuIN' ! undeformed sea ice volume in the northern Hemisp.(10^3 km3) |
---|
455 | titvar(12)= 'VuIS' ! undeformed sea ice volume in the southern Hemisp.(10^3 km3) |
---|
456 | titvar(13)= 'VdIN' ! deformed sea ice volume in the northern Hemisp.(10^3 km3) |
---|
457 | titvar(14)= 'VdIS' ! deformed sea ice volume in the southern Hemisp.(10^3 km3) |
---|
458 | titvar(15)= 'OI_N' ! sea ice mean age in the northern Hemisp.(years) |
---|
459 | titvar(16)= 'OI_S' ! sea ice mean age in the southern Hemisp.(years) |
---|
460 | titvar(17)= 'AFYN' ! total FY ice area northern Hemisp.(10^12 km2) |
---|
461 | titvar(18)= 'AFYS' ! total FY ice area southern Hemisp.(10^12 km2) |
---|
462 | titvar(19)= 'AMYN' ! total MY ice area northern Hemisp.(10^12 km2) |
---|
463 | titvar(20)= 'AMYS' ! total MY ice area southern Hemisp.(10^12 km2) |
---|
464 | titvar(21)= 'EFYN' ! total FY ice extent northern Hemisp.(10^12 km2) (with more 50% FY ice) |
---|
465 | titvar(22)= 'EFYS' ! total FY ice extent southern Hemisp.(10^12 km2) (with more 50% FY ice) |
---|
466 | titvar(23)= 'EMYN' ! total MY ice extent northern Hemisp.(10^12 km2) (with more 50% MY ice) |
---|
467 | titvar(24)= 'EMYS' ! total MY ice extent southern Hemisp.(10^12 km2) (with more 50% MY ice) |
---|
468 | titvar(25)= 'VFYN' ! total undeformed FY ice volume northern Hemisp.(10^3 km3) |
---|
469 | titvar(26)= 'VFYS' ! total undeformed FY ice volume southern Hemisp.(10^3 km3) |
---|
470 | titvar(27)= 'VMYN' ! total undeformed MY ice volume northern Hemisp.(10^3 km3) |
---|
471 | titvar(28)= 'VMYS' ! total undeformed MY ice volume southern Hemisp.(10^3 km3) |
---|
472 | titvar(29)= 'IS_N' ! sea ice mean salinity in the northern hemisphere (ppt) |
---|
473 | titvar(30)= 'IS_S' ! sea ice mean salinity in the southern hemisphere (ppt) |
---|
474 | titvar(31)= 'IVeN' ! sea ice mean velocity in the northern hemisphere (m/s) |
---|
475 | titvar(32)= 'IVeS' ! sea ice mean velocity in the southern hemisphere (m/s) |
---|
476 | titvar(33)= 'DVDN' ! variation of sea ice volume due to dynamics in the northern hemisphere |
---|
477 | titvar(34)= 'DVDS' ! variation of sea ice volume due to dynamics in the southern hemisphere |
---|
478 | titvar(35)= 'DVTN' ! variation of sea ice volume due to thermo in the northern hemisphere |
---|
479 | titvar(36)= 'DVTS' ! variation of sea ice volume due to thermo in the southern hemisphere |
---|
480 | titvar(37)= 'TG1N' ! thermodynamic vertical growth rate in the northern hemisphere, cat 1 |
---|
481 | titvar(38)= 'TG1S' ! thermodynamic vertical growth rate in the souhtern hemisphere, cat 1 |
---|
482 | titvar(39)= 'TG2N' ! thermodynamic vertical growth rate in the northern hemisphere, cat 2 |
---|
483 | titvar(40)= 'TG2S' ! thermodynamic vertical growth rate in the souhtern hemisphere, cat 2 |
---|
484 | titvar(41)= 'TG3N' ! thermodynamic vertical growth rate in the northern hemisphere, cat 3 |
---|
485 | titvar(42)= 'TG3S' ! thermodynamic vertical growth rate in the souhtern hemisphere, cat 3 |
---|
486 | titvar(43)= 'TG4N' ! thermodynamic vertical growth rate in the northern hemisphere, cat 4 |
---|
487 | titvar(44)= 'TG4S' ! thermodynamic vertical growth rate in the souhtern hemisphere, cat 4 |
---|
488 | titvar(45)= 'TG5N' ! thermodynamic vertical growth rate in the northern hemisphere, cat 5 |
---|
489 | titvar(46)= 'TG5S' ! thermodynamic vertical growth rate in the souhtern hemisphere, cat 5 |
---|
490 | titvar(47)= 'LA_N' ! lateral accretion growth rate, northern hemisphere |
---|
491 | titvar(48)= 'LA_S' ! lateral accretion growth rate, southern hemisphere |
---|
492 | titvar(49)= 'SF_N' ! Salinity FY, NH |
---|
493 | titvar(50)= 'SF_S' ! Salinity FY, SH |
---|
494 | titvar(51)= 'SF_N' ! Salinity MY, NH |
---|
495 | titvar(52)= 'SF_S' ! Salinity MY, SH |
---|
496 | titvar(53)= 'Fs_N' ! Total salt flux NH |
---|
497 | titvar(54)= 'Fs_S' ! Total salt flux SH |
---|
498 | titvar(55)= 'FsbN' ! Salt - brine drainage flux NH |
---|
499 | titvar(56)= 'FsbS' ! Salt - brine drainage flux SH |
---|
500 | titvar(57)= 'FseN' ! Salt - Equivalent salt flux NH |
---|
501 | titvar(58)= 'FseS' ! Salt - Equivalent salt flux SH |
---|
502 | titvar(59)= 'SSTN' ! SST, NH |
---|
503 | titvar(60)= 'SSTS' ! SST, SH |
---|
504 | titvar(61)= 'SSSN' ! SSS, NH |
---|
505 | titvar(62)= 'SSSS' ! SSS, SH |
---|
506 | titvar(63)= 'TsuN' ! Tsu, NH |
---|
507 | titvar(64)= 'TsuS' ! Tsu, SH |
---|
508 | titvar(65)= 'TsnN' ! Tsn, NH |
---|
509 | titvar(66)= 'TsnS' ! Tsn, SH |
---|
510 | titvar(67)= 'ei_N' ! ei, NH |
---|
511 | titvar(68)= 'ei_S' ! ei, SH |
---|
512 | titvar(69)= 'vi1N' ! vi1, NH |
---|
513 | titvar(70)= 'vi1S' ! vi1, SH |
---|
514 | titvar(71)= 'vi2N' ! vi2, NH |
---|
515 | titvar(72)= 'vi2S' ! vi2, SH |
---|
516 | titvar(73)= 'vi3N' ! vi3, NH |
---|
517 | titvar(74)= 'vi3S' ! vi3, SH |
---|
518 | titvar(75)= 'vi4N' ! vi4, NH |
---|
519 | titvar(76)= 'vi4S' ! vi4, SH |
---|
520 | titvar(77)= 'vi5N' ! vi5, NH |
---|
521 | titvar(78)= 'vi5S' ! vi5, SH |
---|
522 | titvar(79)= 'vi6N' ! vi6, NH |
---|
523 | titvar(80)= 'vi6S' ! vi6, SH |
---|
524 | titvar(81)= 'fmaN' ! mass flux in the ocean, NH |
---|
525 | titvar(82)= 'fmaS' ! mass flux in the ocean, SH |
---|
526 | titvar(83)= 'AFSE' ! Fram Strait Area export |
---|
527 | titvar(84)= 'VFSE' ! Fram Strait Volume export |
---|
528 | nvinfo = 84 |
---|
529 | |
---|
530 | ! Definition et Ecriture de l'entete : nombre d'enregistrements |
---|
531 | ndeb = ( nstart - 1 ) / ninfo |
---|
532 | IF( nstart == 1 ) ndeb = -1 |
---|
533 | |
---|
534 | nferme = ( nstart - 1 + nitrun) / ninfo |
---|
535 | ntot = nferme - ndeb |
---|
536 | ndeb = ninfo * ( 1 + ndeb ) |
---|
537 | nferme = ninfo * nferme |
---|
538 | |
---|
539 | ! definition of formats |
---|
540 | WRITE( fmtw , '(A,I3,A2,I1,A)' ) '(', nfrinf, '(A', jpchsep, ','//fmtinf//'))' |
---|
541 | WRITE( fmtr , '(A,I3,A,I1,A)' ) '(', nfrinf, '(', jpchsep, 'X,'//fmtinf//'))' |
---|
542 | WRITE( fmtitr, '(A,I3,A,I1,A)' ) '(', nvinfo, 'A', jpchinf, ')' |
---|
543 | |
---|
544 | ! opening "ice_evolu" file |
---|
545 | IF( lk_mpp ) THEN ; WRITE(clname,FMT="('ice.evolu_',I4.4)") narea-1 |
---|
546 | ELSE ; clname = 'ice.evolu' |
---|
547 | END IF |
---|
548 | irecl = ( jpchinf + 1 ) * nvinfo |
---|
549 | CALL ctl_opn( numevo_ice, clname, 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', & |
---|
550 | & irecl, numout, lwp, narea ) |
---|
551 | |
---|
552 | !- ecriture de 2 lignes d''entete : |
---|
553 | WRITE(numevo_ice,1000) fmtr, fmtw, fmtitr, nvinfo, ntot, 0, nfrinf |
---|
554 | zxx0 = 0.001 * REAL(ninfo) |
---|
555 | zxx1 = 0.001 * REAL(ndeb) |
---|
556 | WRITE(numevo_ice,1111) REAL(jpchinf), 0., zxx1, zxx0, 0., 0., 0 |
---|
557 | |
---|
558 | !- ecriture de 2 lignes de titre : |
---|
559 | WRITE(numevo_ice,'(A,I8,A,I8,A,I5)') & |
---|
560 | 'Evolution chronologique - Experience '//cexper & |
---|
561 | //' de', ndeb, ' a', nferme, ' pas', ninfo |
---|
562 | WRITE(numevo_ice,fmtitr) ( titvar(jv), jv = 1, nvinfo ) |
---|
563 | |
---|
564 | !--preparation de "titvar" pour l''ecriture parmi les valeurs numeriques : |
---|
565 | DO jv = 2 , nvinfo |
---|
566 | titinf = titvar(jv)(:jpchinf) |
---|
567 | titvar(jv) = ' '//titinf |
---|
568 | END DO |
---|
569 | |
---|
570 | !--Initialisation of the arrays for the accumulation |
---|
571 | DO jv = 1, nvinfo |
---|
572 | vinfom(jv) = 0._wp |
---|
573 | END DO |
---|
574 | naveg = 0 |
---|
575 | |
---|
576 | 1000 FORMAT( 3(A20),4(1x,I6) ) |
---|
577 | 1111 FORMAT( 3(F7.1,1X,F7.3,1X),I3,A ) |
---|
578 | ! |
---|
579 | END SUBROUTINE lim_dia_init |
---|
580 | |
---|
581 | #else |
---|
582 | !!---------------------------------------------------------------------- |
---|
583 | !! Default option : NO LIM-3 sea-ice model |
---|
584 | !!---------------------------------------------------------------------- |
---|
585 | CONTAINS |
---|
586 | SUBROUTINE lim_dia ! Empty routine |
---|
587 | END SUBROUTINE lim_dia |
---|
588 | #endif |
---|
589 | |
---|
590 | !!====================================================================== |
---|
591 | END MODULE limdia |
---|