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.
icectl.F90 in NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/ICE – NEMO

source: NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/ICE/icectl.F90 @ 11501

Last change on this file since 11501 was 11501, checked in by clem, 5 years ago

introduce a point-to-point conservation check, stop the model if it fails and write the issue in a file

  • Property svn:keywords set to Id
File size: 40.1 KB
Line 
1MODULE icectl
2   !!======================================================================
3   !!                     ***  MODULE  icectl  ***
4   !!   sea-ice : controls and prints
5   !!======================================================================
6   !! History :  3.5  !  2015-01  (M. Vancoppenolle) Original code
7   !!            3.7  !  2016-10  (C. Rousset)       Add routine ice_prt3D
8   !!            4.0  !  2018     (many people)      SI3 [aka Sea Ice cube]
9   !!----------------------------------------------------------------------
10#if defined key_si3
11   !!----------------------------------------------------------------------
12   !!   'key_si3'                                       SI3 sea-ice model
13   !!----------------------------------------------------------------------
14   !!    ice_cons_hsm     : conservation tests on heat, salt and mass during a  time step (global)
15   !!    ice_cons_final   : conservation tests on heat, salt and mass at end of time step (global)
16   !!    ice_cons2D       : conservation tests on heat, salt and mass at each gridcell
17   !!    ice_ctl          : control prints in case of crash
18   !!    ice_prt          : control prints at a given grid point
19   !!    ice_prt3D        : control prints of ice arrays
20   !!----------------------------------------------------------------------
21   USE phycst         ! physical constants
22   USE oce            ! ocean dynamics and tracers
23   USE dom_oce        ! ocean space and time domain
24   USE ice            ! sea-ice: variables
25   USE ice1D          ! sea-ice: thermodynamics variables
26   USE sbc_oce        ! Surface boundary condition: ocean fields
27   USE sbc_ice        ! Surface boundary condition: ice   fields
28   !
29   USE in_out_manager ! I/O manager
30   USE iom            ! I/O manager library
31   USE lib_mpp        ! MPP library
32   USE lib_fortran    ! fortran utilities (glob_sum + no signed zero)
33   USE timing         ! Timing
34   USE prtctl         ! Print control
35
36   IMPLICIT NONE
37   PRIVATE
38
39   PUBLIC   ice_cons_hsm
40   PUBLIC   ice_cons_final
41   PUBLIC   ice_cons2D
42   PUBLIC   ice_ctl
43   PUBLIC   ice_prt
44   PUBLIC   ice_prt3D
45
46   ! thresold values for conservation
47   !    these values are changed by the namelist parameter rn_icechk, so that threshold = zchk * rn_icechk
48   REAL(wp), PARAMETER ::   zchk_m   = 1.e-5   ! kg/m2/s <=> 1mm of ice per 1   year  spuriously gained/lost
49   REAL(wp), PARAMETER ::   zchk2D_m = 1.e-7   !                   --       100 years          --
50   REAL(wp), PARAMETER ::   zchk_s   = 1.e-4   ! g/m2/s  <=> 1mm of ice per 1   year  spuriously gained/lost (considering s=10g/kg)
51   REAL(wp), PARAMETER ::   zchk2D_s = 1.e-6   !                   --       100 years          --
52   REAL(wp), PARAMETER ::   zchk_t   = 3.      ! W/m2    <=> 1mm of ice per 1   year  spuriously gained/lost (considering Lf=3e5J/kg)
53   REAL(wp), PARAMETER ::   zchk2D_t = 0.03    !                   --       100 years          --
54   
55   !! * Substitutions
56#  include "vectopt_loop_substitute.h90"
57   !!----------------------------------------------------------------------
58   !! NEMO/ICE 4.0 , NEMO Consortium (2018)
59   !! $Id$
60   !! Software governed by the CeCILL license (see ./LICENSE)
61   !!----------------------------------------------------------------------
62CONTAINS
63
64   SUBROUTINE ice_cons_hsm( icount, cd_routine, pdiag_v, pdiag_s, pdiag_t, pdiag_fv, pdiag_fs, pdiag_ft )
65      !!-------------------------------------------------------------------
66      !!                       ***  ROUTINE ice_cons_hsm ***
67      !!
68      !! ** Purpose : Test the conservation of heat, salt and mass for each ice routine
69      !!                     + test if ice concentration and volume are > 0
70      !!
71      !! ** Method  : This is an online diagnostics which can be activated with ln_icediachk=true
72      !!              It prints in ocean.output if there is a violation of conservation at each time-step
73      !!              The thresholds (zchk_m, zchk_s, zchk_t) which determine violations are set to
74      !!              a minimum of 1 mm of ice (over the ice area) that is lost/gained spuriously during 100 years.
75      !!              For salt and heat thresholds, ice is considered to have a salinity of 10
76      !!              and a heat content of 3e5 J/kg (=latent heat of fusion)
77      !!-------------------------------------------------------------------
78      INTEGER         , INTENT(in)    ::   icount        ! called at: =0 the begining of the routine, =1  the end
79      CHARACTER(len=*), INTENT(in)    ::   cd_routine    ! name of the routine
80      REAL(wp)        , INTENT(inout) ::   pdiag_v, pdiag_s, pdiag_t, pdiag_fv, pdiag_fs, pdiag_ft
81      !!
82      REAL(wp) ::   zdiag_mass, zdiag_salt, zdiag_heat, &
83         &          zdiag_vmin, zdiag_amin, zdiag_amax, zdiag_eimin, zdiag_esmin, zdiag_smin
84      REAL(wp) ::   zvtrp, zetrp
85      REAL(wp) ::   zarea
86      !!-------------------------------------------------------------------
87      !
88      IF( icount == 0 ) THEN
89
90         pdiag_v = glob_sum( 'icectl',   SUM( v_i * rhoi + v_s * rhos, dim=3 ) * e1e2t )
91         pdiag_s = glob_sum( 'icectl',   SUM( sv_i * rhoi            , dim=3 ) * e1e2t )
92         pdiag_t = glob_sum( 'icectl', ( SUM( SUM( e_i, dim=4 ), dim=3 ) + SUM( SUM( e_s, dim=4 ), dim=3 ) ) * e1e2t )
93
94         ! mass flux
95         pdiag_fv = glob_sum( 'icectl',  &
96            &                         ( wfx_bog + wfx_bom + wfx_sum + wfx_sni + wfx_opw + wfx_res + wfx_dyn + wfx_lam + wfx_pnd + &
97            &                           wfx_snw_sni + wfx_snw_sum + wfx_snw_dyn + wfx_snw_sub + wfx_ice_sub + wfx_spr ) * e1e2t )
98         ! salt flux
99         pdiag_fs = glob_sum( 'icectl',  &
100            &                         ( sfx_bri + sfx_bog + sfx_bom + sfx_sum + sfx_sni + &
101            &                           sfx_opw + sfx_res + sfx_dyn + sfx_sub + sfx_lam ) * e1e2t )
102         ! heat flux
103         pdiag_ft = glob_sum( 'icectl',  &
104            &                         (   hfx_sum + hfx_bom + hfx_bog + hfx_dif + hfx_opw + hfx_snw  &
105            &                           - hfx_thd - hfx_dyn - hfx_res - hfx_sub - hfx_spr ) * e1e2t )
106
107      ELSEIF( icount == 1 ) THEN
108
109         ! -- mass diag -- !
110         zdiag_mass = ( glob_sum( 'icectl', SUM( v_i * rhoi + v_s * rhos, dim=3 ) * e1e2t ) - pdiag_v ) * r1_rdtice       &
111            &         + glob_sum( 'icectl', ( wfx_bog + wfx_bom + wfx_sum + wfx_sni + wfx_opw + wfx_res + wfx_dyn +       &
112            &                                 wfx_lam + wfx_pnd + wfx_snw_sni + wfx_snw_sum + wfx_snw_dyn + wfx_snw_sub + &
113            &                                 wfx_ice_sub + wfx_spr ) * e1e2t )                                           &
114            &         - pdiag_fv
115         !
116         ! -- salt diag -- !
117         zdiag_salt = ( glob_sum( 'icectl', SUM( sv_i * rhoi , dim=3 ) * e1e2t ) - pdiag_s ) * r1_rdtice  &
118            &         + glob_sum( 'icectl', ( sfx_bri + sfx_bog + sfx_bom + sfx_sum + sfx_sni +           &
119            &                                 sfx_opw + sfx_res + sfx_dyn + sfx_sub + sfx_lam ) * e1e2t ) &
120            &         - pdiag_fs
121         !
122         ! -- heat diag -- !
123         zdiag_heat = ( glob_sum( 'icectl', ( SUM(SUM(e_i, dim=4), dim=3) + SUM(SUM(e_s, dim=4), dim=3) ) * e1e2t ) - pdiag_t &
124            &         ) * r1_rdtice                                                                                           &
125            &         + glob_sum( 'icectl', (  hfx_sum + hfx_bom + hfx_bog + hfx_dif + hfx_opw + hfx_snw                      &
126            &                                - hfx_thd - hfx_dyn - hfx_res - hfx_sub - hfx_spr ) * e1e2t )                    &
127            &         - pdiag_ft
128
129         ! -- min/max diag -- !
130         zdiag_amax  = glob_max( 'icectl', SUM( a_i, dim=3 ) )
131         zdiag_vmin  = glob_min( 'icectl', v_i )
132         zdiag_amin  = glob_min( 'icectl', a_i )
133         zdiag_smin  = glob_min( 'icectl', sv_i )
134         zdiag_eimin = glob_min( 'icectl', SUM( e_i, dim=3 ) )
135         zdiag_esmin = glob_min( 'icectl', SUM( e_s, dim=3 ) )
136
137         ! -- advection scheme is conservative? -- !
138         zvtrp = glob_sum( 'icectl', ( diag_trp_vi * rhoi + diag_trp_vs * rhos ) * e1e2t ) ! must be close to 0
139         zetrp = glob_sum( 'icectl', ( diag_trp_ei        + diag_trp_es        ) * e1e2t ) ! must be close to 0
140
141         ! ice area (+epsi10 to set a threshold > 0 when there is no ice)
142         zarea = glob_sum( 'icectl', SUM( a_i + epsi10, dim=3 ) * e1e2t )
143
144         IF( lwp ) THEN
145            ! check conservation issues
146            IF( ABS(zdiag_mass) > zchk_m * rn_icechk * zarea ) &
147               &                   WRITE(numout,*)   cd_routine,' : violation mass cons. [kg] = ',zdiag_mass * rdt_ice
148            IF( ABS(zdiag_salt) > zchk_s * rn_icechk * zarea ) &
149               &                   WRITE(numout,*)   cd_routine,' : violation salt cons. [g]  = ',zdiag_salt * rdt_ice
150            IF( ABS(zdiag_heat) > zchk_t * rn_icechk * zarea ) &
151               &                   WRITE(numout,*)   cd_routine,' : violation heat cons. [J]  = ',zdiag_heat * rdt_ice
152            ! check negative values
153            IF( zdiag_vmin  < 0. ) WRITE(numout,*)   cd_routine,' : violation v_i < 0         = ',zdiag_vmin
154            IF( zdiag_amin  < 0. ) WRITE(numout,*)   cd_routine,' : violation a_i < 0         = ',zdiag_amin
155            IF( zdiag_smin  < 0. ) WRITE(numout,*)   cd_routine,' : violation s_i < 0         = ',zdiag_smin
156            IF( zdiag_eimin < 0. ) WRITE(numout,*)   cd_routine,' : violation e_i < 0         = ',zdiag_eimin
157            IF( zdiag_esmin < 0. ) WRITE(numout,*)   cd_routine,' : violation e_s < 0         = ',zdiag_esmin
158            ! check maximum ice concentration
159            IF( zdiag_amax > MAX(rn_amax_n,rn_amax_s)+epsi10 .AND. cd_routine /= 'icedyn_adv' .AND. cd_routine /= 'icedyn_rdgrft' ) &
160               &                   WRITE(numout,*)   cd_routine,' : violation a_i > amax      = ',zdiag_amax
161            ! check if advection scheme is conservative
162            IF( ABS(zvtrp) > zchk_m*rn_icechk*zarea .AND. cd_routine == 'icedyn_adv' ) &
163               &                   WRITE(numout,*)   cd_routine,' : violation adv scheme [kg] = ',zvtrp * rdt_ice
164         ENDIF
165         !
166      ENDIF
167
168   END SUBROUTINE ice_cons_hsm
169
170   SUBROUTINE ice_cons_final( cd_routine )
171      !!-------------------------------------------------------------------
172      !!                     ***  ROUTINE ice_cons_final ***
173      !!
174      !! ** Purpose : Test the conservation of heat, salt and mass at the end of each ice time-step
175      !!
176      !! ** Method  : This is an online diagnostics which can be activated with ln_icediachk=true
177      !!              It prints in ocean.output if there is a violation of conservation at each time-step
178      !!              The thresholds (zchk_m, zchk_s, zchk_t) which determine the violation are set to
179      !!              a minimum of 1 mm of ice (over the ice area) that is lost/gained spuriously during 100 years.
180      !!              For salt and heat thresholds, ice is considered to have a salinity of 10
181      !!              and a heat content of 3e5 J/kg (=latent heat of fusion)
182      !!-------------------------------------------------------------------
183      CHARACTER(len=*), INTENT(in) ::   cd_routine    ! name of the routine
184      REAL(wp) ::   zdiag_mass, zdiag_salt, zdiag_heat
185      REAL(wp) ::   zarea
186      !!-------------------------------------------------------------------
187
188      ! water flux
189      ! -- mass diag -- !
190      zdiag_mass = glob_sum( 'icectl', ( wfx_ice + wfx_snw + wfx_spr + wfx_sub + diag_vice + diag_vsnw ) * e1e2t )
191
192      ! -- salt diag -- !
193      zdiag_salt = glob_sum( 'icectl', ( sfx + diag_sice ) * e1e2t )
194
195      ! -- heat diag -- !
196      ! clem: not the good formulation
197      !!zdiag_heat  = glob_sum( 'icectl', ( qt_oce_ai - qt_atm_oi + diag_heat + hfx_thd + hfx_dyn + hfx_res + hfx_sub + hfx_spr  &
198      !!   &                              ) * e1e2t )
199
200      ! ice area (+epsi10 to set a threshold > 0 when there is no ice)
201      zarea = glob_sum( 'icectl', SUM( a_i + epsi10, dim=3 ) * e1e2t )
202
203      IF( lwp ) THEN
204         IF( ABS(zdiag_mass) > zchk_m * rn_icechk * zarea ) &
205            &                   WRITE(numout,*) cd_routine,' : violation mass cons. [kg] = ',zdiag_mass * rdt_ice
206         IF( ABS(zdiag_salt) > zchk_s * rn_icechk * zarea ) &
207            &                   WRITE(numout,*) cd_routine,' : violation salt cons. [g]  = ',zdiag_salt * rdt_ice
208         !!IF( ABS(zdiag_heat) > zchk_t * rn_icechk * zarea ) WRITE(numout,*) cd_routine,' : violation heat cons. [J]  = ',zdiag_heat * rdt_ice
209      ENDIF
210      !
211   END SUBROUTINE ice_cons_final
212
213   SUBROUTINE ice_cons2D( icount, cd_routine, pdiag_v, pdiag_s, pdiag_t, pdiag_fv, pdiag_fs, pdiag_ft )
214      !!-------------------------------------------------------------------
215      !!                       ***  ROUTINE ice_cons2D ***
216      !!
217      !! ** Purpose : Test the conservation of heat, salt and mass for each ice routine
218      !!                     + test if ice concentration and volume are > 0
219      !!
220      !! ** Method  : This is an online diagnostics which can be activated with ln_icediachk=true
221      !!              It stops the code if there is a violation of conservation at any gridcell
222      !!-------------------------------------------------------------------
223      INTEGER         , INTENT(in) ::   icount        ! called at: =0 the begining of the routine, =1  the end
224      CHARACTER(len=*), INTENT(in) ::   cd_routine    ! name of the routine
225      REAL(wp)        , DIMENSION(jpi,jpj), INTENT(inout) ::   pdiag_v, pdiag_s, pdiag_t, pdiag_fv, pdiag_fs, pdiag_ft
226      !!
227      REAL(wp), DIMENSION(jpi,jpj) ::   zdiag_mass, zdiag_salt, zdiag_heat, &
228         &                              zdiag_amin, zdiag_vmin, zdiag_smin, zdiag_emin !!, zdiag_amax 
229      INTEGER ::   jl, jk
230      LOGICAL ::   ll_stop_m = .FALSE.
231      LOGICAL ::   ll_stop_s = .FALSE.
232      LOGICAL ::   ll_stop_t = .FALSE.
233      CHARACTER(len=120) ::   clnam   ! filename for the output
234      !!-------------------------------------------------------------------
235      !
236      IF( icount == 0 ) THEN
237
238         pdiag_v = SUM( v_i  * rhoi + v_s * rhos, dim=3 )
239         pdiag_s = SUM( sv_i * rhoi             , dim=3 )
240         pdiag_t = SUM( SUM( e_i, dim=4 ), dim=3 ) + SUM( SUM( e_s, dim=4 ), dim=3 )
241
242         ! mass flux
243         pdiag_fv = wfx_bog + wfx_bom + wfx_sum + wfx_sni + wfx_opw + wfx_res + wfx_dyn + wfx_lam + wfx_pnd  +  &
244            &       wfx_snw_sni + wfx_snw_sum + wfx_snw_dyn + wfx_snw_sub + wfx_ice_sub + wfx_spr
245         ! salt flux
246         pdiag_fs = sfx_bri + sfx_bog + sfx_bom + sfx_sum + sfx_sni + sfx_opw + sfx_res + sfx_dyn + sfx_sub + sfx_lam 
247         ! heat flux
248         pdiag_ft =   hfx_sum + hfx_bom + hfx_bog + hfx_dif + hfx_opw + hfx_snw  & 
249            &       - hfx_thd - hfx_dyn - hfx_res - hfx_sub - hfx_spr
250
251      ELSEIF( icount == 1 ) THEN
252
253         ! -- mass diag -- !
254         zdiag_mass =   ( SUM( v_i * rhoi + v_s * rhos, dim=3 ) - pdiag_v ) * r1_rdtice                             &
255            &         + ( wfx_bog + wfx_bom + wfx_sum + wfx_sni + wfx_opw + wfx_res + wfx_dyn + wfx_lam + wfx_pnd + &
256            &             wfx_snw_sni + wfx_snw_sum + wfx_snw_dyn + wfx_snw_sub + wfx_ice_sub + wfx_spr )           &
257            &         - pdiag_fv
258         IF( MAXVAL( ABS(zdiag_mass) ) > zchk2D_m * rn_icechk )   ll_stop_m = .TRUE.
259         !
260         ! -- salt diag -- !
261         zdiag_salt =   ( SUM( sv_i * rhoi , dim=3 ) - pdiag_s ) * r1_rdtice                                                  &
262            &         + ( sfx_bri + sfx_bog + sfx_bom + sfx_sum + sfx_sni + sfx_opw + sfx_res + sfx_dyn + sfx_sub + sfx_lam ) &
263            &         - pdiag_fs
264         IF( MAXVAL( ABS(zdiag_salt) ) > zchk2D_s * rn_icechk )   ll_stop_s = .TRUE.
265         !
266         ! -- heat diag -- !
267         zdiag_heat =   ( SUM( SUM( e_i, dim=4 ), dim=3 ) + SUM( SUM( e_s, dim=4 ), dim=3 ) - pdiag_t ) * r1_rdtice &
268            &         + (  hfx_sum + hfx_bom + hfx_bog + hfx_dif + hfx_opw + hfx_snw                                & 
269            &            - hfx_thd - hfx_dyn - hfx_res - hfx_sub - hfx_spr )                                        &
270            &         - pdiag_ft
271         IF( MAXVAL( ABS(zdiag_heat) ) > zchk2D_t * rn_icechk )   ll_stop_t = .TRUE.
272         !
273         ! -- other diags -- !
274         ! a_i < 0
275         zdiag_amin(:,:) = 0._wp
276         DO jl = 1, jpl
277            WHERE( a_i(:,:,jl) < 0._wp )   zdiag_amin(:,:) = 1._wp
278         ENDDO
279         ! v_i < 0
280         zdiag_vmin(:,:) = 0._wp
281         DO jl = 1, jpl
282            WHERE( v_i(:,:,jl) < 0._wp )   zdiag_vmin(:,:) = 1._wp
283         ENDDO
284         ! s_i < 0
285         zdiag_smin(:,:) = 0._wp
286         DO jl = 1, jpl
287            WHERE( s_i(:,:,jl) < 0._wp )   zdiag_smin(:,:) = 1._wp
288         ENDDO
289         ! e_i < 0
290         zdiag_emin(:,:) = 0._wp
291         DO jl = 1, jpl
292            DO jk = 1, nlay_i
293               WHERE( e_i(:,:,jk,jl) < 0._wp )   zdiag_emin(:,:) = 1._wp
294            ENDDO
295         ENDDO
296         ! a_i > amax
297         !WHERE( SUM( a_i, dim=3 ) > ( MAX( rn_amax_n, rn_amax_s ) + epsi10 )   ;   zdiag_amax(:,:) = 1._wp
298         !ELSEWHERE                                                             ;   zdiag_amax(:,:) = 0._wp
299         !END WHERE
300
301         IF( ll_stop_m .OR. ll_stop_s .OR. ll_stop_t ) THEN
302            clnam = 'diag_ice_conservation_'//cd_routine
303            CALL ice_cons_wri( clnam, zdiag_mass, zdiag_salt, zdiag_heat, zdiag_amin, zdiag_vmin, zdiag_smin, zdiag_emin )
304         ENDIF
305
306         IF( ll_stop_m )   CALL ctl_stop( 'STOP', cd_routine//': ice mass conservation issue' )
307         IF( ll_stop_s )   CALL ctl_stop( 'STOP', cd_routine//': ice salt conservation issue' )
308         IF( ll_stop_t )   CALL ctl_stop( 'STOP', cd_routine//': ice heat conservation issue' )
309         
310      ENDIF
311
312   END SUBROUTINE ice_cons2D
313
314   SUBROUTINE ice_cons_wri( cdfile_name, pdiag_mass, pdiag_salt, pdiag_heat, pdiag_amin, pdiag_vmin, pdiag_smin, pdiag_emin )
315      !!---------------------------------------------------------------------
316      !!                 ***  ROUTINE ice_cons_wri  ***
317      !!       
318      !! ** Purpose :   create a NetCDF file named cdfile_name which contains
319      !!                the instantaneous fields when conservation issue occurs
320      !!
321      !! ** Method  :   NetCDF files using ioipsl
322      !!----------------------------------------------------------------------
323      CHARACTER(len=*), INTENT( in ) ::   cdfile_name      ! name of the file created
324      REAL(wp), DIMENSION(:,:), INTENT( in ) ::   pdiag_mass, pdiag_salt, pdiag_heat, &
325         &                                        pdiag_amin, pdiag_vmin, pdiag_smin, pdiag_emin !!, pdiag_amax 
326      !!
327      INTEGER ::   inum
328      !!----------------------------------------------------------------------
329      !
330      IF(lwp) WRITE(numout,*)
331      IF(lwp) WRITE(numout,*) 'ice_cons_wri : single instantaneous ice state'
332      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~  named :', cdfile_name, '...nc'
333      IF(lwp) WRITE(numout,*)               
334
335      CALL iom_open( TRIM(cdfile_name), inum, ldwrt = .TRUE., kdlev = jpl )
336     
337      CALL iom_rstput( 0, 0, inum, 'cons_mass', pdiag_mass(:,:) , ktype = jp_r8 )    ! ice mass spurious lost/gain
338      CALL iom_rstput( 0, 0, inum, 'cons_salt', pdiag_salt(:,:) , ktype = jp_r8 )    ! ice salt spurious lost/gain
339      CALL iom_rstput( 0, 0, inum, 'cons_heat', pdiag_heat(:,:) , ktype = jp_r8 )    ! ice heat spurious lost/gain
340      ! other diags
341      CALL iom_rstput( 0, 0, inum, 'aneg_count', pdiag_amin(:,:) , ktype = jp_r8 )    !
342      CALL iom_rstput( 0, 0, inum, 'vneg_count', pdiag_vmin(:,:) , ktype = jp_r8 )    !
343      CALL iom_rstput( 0, 0, inum, 'sneg_count', pdiag_smin(:,:) , ktype = jp_r8 )    !
344      CALL iom_rstput( 0, 0, inum, 'eneg_count', pdiag_emin(:,:) , ktype = jp_r8 )    !
345     
346      CALL iom_close( inum )
347
348   END SUBROUTINE ice_cons_wri
349   
350   SUBROUTINE ice_ctl( kt )
351      !!-------------------------------------------------------------------
352      !!                   ***  ROUTINE ice_ctl ***
353      !!                 
354      !! ** Purpose :   Alerts in case of model crash
355      !!-------------------------------------------------------------------
356      INTEGER, INTENT(in) ::   kt      ! ocean time step
357      INTEGER  ::   ji, jj, jk,  jl   ! dummy loop indices
358      INTEGER  ::   inb_altests       ! number of alert tests (max 20)
359      INTEGER  ::   ialert_id         ! number of the current alert
360      REAL(wp) ::   ztmelts           ! ice layer melting point
361      CHARACTER (len=30), DIMENSION(20) ::   cl_alname   ! name of alert
362      INTEGER           , DIMENSION(20) ::   inb_alp     ! number of alerts positive
363      !!-------------------------------------------------------------------
364
365      inb_altests = 10
366      inb_alp(:)  =  0
367
368      ! Alert if incompatible volume and concentration
369      ialert_id = 2 ! reference number of this alert
370      cl_alname(ialert_id) = ' Incompat vol and con         '    ! name of the alert
371      DO jl = 1, jpl
372         DO jj = 1, jpj
373            DO ji = 1, jpi
374               IF(  v_i(ji,jj,jl) /= 0._wp   .AND.   a_i(ji,jj,jl) == 0._wp   ) THEN
375                  WRITE(numout,*) ' ALERTE 2 :   Incompatible volume and concentration '
376                  inb_alp(ialert_id) = inb_alp(ialert_id) + 1
377               ENDIF
378            END DO
379         END DO
380      END DO
381
382      ! Alerte if very thick ice
383      ialert_id = 3 ! reference number of this alert
384      cl_alname(ialert_id) = ' Very thick ice               ' ! name of the alert
385      jl = jpl 
386      DO jj = 1, jpj
387         DO ji = 1, jpi
388            IF(   h_i(ji,jj,jl)  >  50._wp   ) THEN
389               WRITE(numout,*) ' ALERTE 3 :   Very thick ice'
390               !CALL ice_prt( kt, ji, jj, 2, ' ALERTE 3 :   Very thick ice ' )
391               inb_alp(ialert_id) = inb_alp(ialert_id) + 1
392            ENDIF
393         END DO
394      END DO
395
396      ! Alert if very fast ice
397      ialert_id = 4 ! reference number of this alert
398      cl_alname(ialert_id) = ' Very fast ice               ' ! name of the alert
399      DO jj = 1, jpj
400         DO ji = 1, jpi
401            IF(   MAX( ABS( u_ice(ji,jj) ), ABS( v_ice(ji,jj) ) ) > 2.  .AND.  &
402               &  at_i(ji,jj) > 0._wp   ) THEN
403               WRITE(numout,*) ' ALERTE 4 :   Very fast ice'
404               !CALL ice_prt( kt, ji, jj, 1, ' ALERTE 4 :   Very fast ice ' )
405               inb_alp(ialert_id) = inb_alp(ialert_id) + 1
406            ENDIF
407         END DO
408      END DO
409
410      ! Alert on salt flux
411      ialert_id = 5 ! reference number of this alert
412      cl_alname(ialert_id) = ' High salt flux               ' ! name of the alert
413      DO jj = 1, jpj
414         DO ji = 1, jpi
415            IF( ABS( sfx (ji,jj) ) > 1.0e-2 ) THEN  ! = 1 psu/day for 1m ocean depth
416               WRITE(numout,*) ' ALERTE 5 :   High salt flux'
417               !CALL ice_prt( kt, ji, jj, 3, ' ALERTE 5 :   High salt flux ' )
418               inb_alp(ialert_id) = inb_alp(ialert_id) + 1
419            ENDIF
420         END DO
421      END DO
422
423      ! Alert if there is ice on continents
424      ialert_id = 6 ! reference number of this alert
425      cl_alname(ialert_id) = ' Ice on continents           ' ! name of the alert
426      DO jj = 1, jpj
427         DO ji = 1, jpi
428            IF(   tmask(ji,jj,1) <= 0._wp   .AND.   at_i(ji,jj) > 0._wp   ) THEN
429               WRITE(numout,*) ' ALERTE 6 :   Ice on continents'
430               !CALL ice_prt( kt, ji, jj, 1, ' ALERTE 6 :   Ice on continents ' )
431               inb_alp(ialert_id) = inb_alp(ialert_id) + 1
432            ENDIF
433         END DO
434      END DO
435
436!
437!     ! Alert if very fresh ice
438      ialert_id = 7 ! reference number of this alert
439      cl_alname(ialert_id) = ' Very fresh ice               ' ! name of the alert
440      DO jl = 1, jpl
441         DO jj = 1, jpj
442            DO ji = 1, jpi
443               IF( s_i(ji,jj,jl) < 0.1 .AND. a_i(ji,jj,jl) > 0._wp ) THEN
444                  WRITE(numout,*) ' ALERTE 7 :   Very fresh ice'
445!                 CALL ice_prt(kt,ji,jj,1, ' ALERTE 7 :   Very fresh ice ' )
446                  inb_alp(ialert_id) = inb_alp(ialert_id) + 1
447               ENDIF
448            END DO
449         END DO
450      END DO
451!
452      ! Alert if qns very big
453      ialert_id = 8 ! reference number of this alert
454      cl_alname(ialert_id) = ' fnsolar very big             ' ! name of the alert
455      DO jj = 1, jpj
456         DO ji = 1, jpi
457            IF( ABS( qns(ji,jj) ) > 1500._wp .AND. at_i(ji,jj) > 0._wp ) THEN
458               !
459               WRITE(numout,*) ' ALERTE 8 :   Very high non-solar heat flux'
460               !CALL ice_prt( kt, ji, jj, 2, '   ')
461               inb_alp(ialert_id) = inb_alp(ialert_id) + 1
462               !
463            ENDIF
464         END DO
465      END DO
466      !+++++
467
468!     ! Alert if too old ice
469      ialert_id = 9 ! reference number of this alert
470      cl_alname(ialert_id) = ' Very old   ice               ' ! name of the alert
471      DO jl = 1, jpl
472         DO jj = 1, jpj
473            DO ji = 1, jpi
474               IF ( ( ( ABS( o_i(ji,jj,jl) ) > rdt_ice ) .OR. &
475                      ( ABS( o_i(ji,jj,jl) ) < 0._wp) ) .AND. &
476                             ( a_i(ji,jj,jl) > 0._wp ) ) THEN
477                  WRITE(numout,*) ' ALERTE 9 :   Wrong ice age'
478                  !CALL ice_prt( kt, ji, jj, 1, ' ALERTE 9 :   Wrong ice age ')
479                  inb_alp(ialert_id) = inb_alp(ialert_id) + 1
480               ENDIF
481            END DO
482         END DO
483      END DO
484 
485      ! Alert if very warm ice
486      ialert_id = 10 ! reference number of this alert
487      cl_alname(ialert_id) = ' Very warm ice                ' ! name of the alert
488      inb_alp(ialert_id) = 0
489      DO jl = 1, jpl
490         DO jk = 1, nlay_i
491            DO jj = 1, jpj
492               DO ji = 1, jpi
493                  ztmelts    =  -rTmlt * sz_i(ji,jj,jk,jl) + rt0
494                  IF( t_i(ji,jj,jk,jl) > ztmelts  .AND.  v_i(ji,jj,jl) > 1.e-10   &
495                     &                            .AND.  a_i(ji,jj,jl) > 0._wp   ) THEN
496                     WRITE(numout,*) ' ALERTE 10 :   Very warm ice'
497                    inb_alp(ialert_id) = inb_alp(ialert_id) + 1
498                  ENDIF
499               END DO
500            END DO
501         END DO
502      END DO
503
504      ! sum of the alerts on all processors
505      IF( lk_mpp ) THEN
506         DO ialert_id = 1, inb_altests
507            CALL mpp_sum('icectl', inb_alp(ialert_id))
508         END DO
509      ENDIF
510
511      ! print alerts
512      IF( lwp ) THEN
513         ialert_id = 1                                 ! reference number of this alert
514         cl_alname(ialert_id) = ' NO alerte 1      '   ! name of the alert
515         WRITE(numout,*) ' time step ',kt
516         WRITE(numout,*) ' All alerts at the end of ice model '
517         DO ialert_id = 1, inb_altests
518            WRITE(numout,*) ialert_id, cl_alname(ialert_id)//' : ', inb_alp(ialert_id), ' times ! '
519         END DO
520      ENDIF
521     !
522   END SUBROUTINE ice_ctl
523 
524   SUBROUTINE ice_prt( kt, ki, kj, kn, cd1 )
525      !!-------------------------------------------------------------------
526      !!                   ***  ROUTINE ice_prt ***
527      !!                 
528      !! ** Purpose :   Writes global ice state on the (i,j) point
529      !!                in ocean.ouput
530      !!                3 possibilities exist
531      !!                n = 1/-1 -> simple ice state
532      !!                n = 2    -> exhaustive state
533      !!                n = 3    -> ice/ocean salt fluxes
534      !!
535      !! ** input   :   point coordinates (i,j)
536      !!                n : number of the option
537      !!-------------------------------------------------------------------
538      INTEGER         , INTENT(in) ::   kt            ! ocean time step
539      INTEGER         , INTENT(in) ::   ki, kj, kn    ! ocean gridpoint indices
540      CHARACTER(len=*), INTENT(in) ::   cd1           !
541      !!
542      INTEGER :: jl, ji, jj
543      !!-------------------------------------------------------------------
544
545      DO ji = mi0(ki), mi1(ki)
546         DO jj = mj0(kj), mj1(kj)
547
548            WRITE(numout,*) ' time step ',kt,' ',cd1             ! print title
549
550            !----------------
551            !  Simple state
552            !----------------
553           
554            IF ( kn == 1 .OR. kn == -1 ) THEN
555               WRITE(numout,*) ' ice_prt - Point : ',ji,jj
556               WRITE(numout,*) ' ~~~~~~~~~~~~~~ '
557               WRITE(numout,*) ' Simple state '
558               WRITE(numout,*) ' masks s,u,v   : ', tmask(ji,jj,1), umask(ji,jj,1), vmask(ji,jj,1)
559               WRITE(numout,*) ' lat - long    : ', gphit(ji,jj), glamt(ji,jj)
560               WRITE(numout,*) ' - Ice drift   '
561               WRITE(numout,*) '   ~~~~~~~~~~~ '
562               WRITE(numout,*) ' u_ice(i-1,j)  : ', u_ice(ji-1,jj)
563               WRITE(numout,*) ' u_ice(i  ,j)  : ', u_ice(ji,jj)
564               WRITE(numout,*) ' v_ice(i  ,j-1): ', v_ice(ji,jj-1)
565               WRITE(numout,*) ' v_ice(i  ,j)  : ', v_ice(ji,jj)
566               WRITE(numout,*) ' strength      : ', strength(ji,jj)
567               WRITE(numout,*)
568               WRITE(numout,*) ' - Cell values '
569               WRITE(numout,*) '   ~~~~~~~~~~~ '
570               WRITE(numout,*) ' at_i          : ', at_i(ji,jj)       
571               WRITE(numout,*) ' ato_i         : ', ato_i(ji,jj)       
572               WRITE(numout,*) ' vt_i          : ', vt_i(ji,jj)       
573               WRITE(numout,*) ' vt_s          : ', vt_s(ji,jj)       
574               DO jl = 1, jpl
575                  WRITE(numout,*) ' - Category (', jl,')'
576                  WRITE(numout,*) ' a_i           : ', a_i(ji,jj,jl)
577                  WRITE(numout,*) ' h_i           : ', h_i(ji,jj,jl)
578                  WRITE(numout,*) ' h_s           : ', h_s(ji,jj,jl)
579                  WRITE(numout,*) ' v_i           : ', v_i(ji,jj,jl)
580                  WRITE(numout,*) ' v_s           : ', v_s(ji,jj,jl)
581                  WRITE(numout,*) ' e_s           : ', e_s(ji,jj,1:nlay_s,jl)
582                  WRITE(numout,*) ' e_i           : ', e_i(ji,jj,1:nlay_i,jl)
583                  WRITE(numout,*) ' t_su          : ', t_su(ji,jj,jl)
584                  WRITE(numout,*) ' t_snow        : ', t_s(ji,jj,1:nlay_s,jl)
585                  WRITE(numout,*) ' t_i           : ', t_i(ji,jj,1:nlay_i,jl)
586                  WRITE(numout,*) ' s_i           : ', s_i(ji,jj,jl)
587                  WRITE(numout,*) ' sv_i          : ', sv_i(ji,jj,jl)
588                  WRITE(numout,*)
589               END DO
590            ENDIF
591
592            !--------------------
593            !  Exhaustive state
594            !--------------------
595           
596            IF ( kn .EQ. 2 ) THEN
597               WRITE(numout,*) ' ice_prt - Point : ',ji,jj
598               WRITE(numout,*) ' ~~~~~~~~~~~~~~ '
599               WRITE(numout,*) ' Exhaustive state '
600               WRITE(numout,*) ' lat - long ', gphit(ji,jj), glamt(ji,jj)
601               WRITE(numout,*) 
602               WRITE(numout,*) ' - Cell values '
603               WRITE(numout,*) '   ~~~~~~~~~~~ '
604               WRITE(numout,*) ' at_i          : ', at_i(ji,jj)       
605               WRITE(numout,*) ' vt_i          : ', vt_i(ji,jj)       
606               WRITE(numout,*) ' vt_s          : ', vt_s(ji,jj)       
607               WRITE(numout,*) ' u_ice(i-1,j)  : ', u_ice(ji-1,jj)
608               WRITE(numout,*) ' u_ice(i  ,j)  : ', u_ice(ji,jj)
609               WRITE(numout,*) ' v_ice(i  ,j-1): ', v_ice(ji,jj-1)
610               WRITE(numout,*) ' v_ice(i  ,j)  : ', v_ice(ji,jj)
611               WRITE(numout,*) ' strength      : ', strength(ji,jj)
612               WRITE(numout,*) ' u_ice_b       : ', u_ice_b(ji,jj)    , ' v_ice_b       : ', v_ice_b(ji,jj) 
613               WRITE(numout,*)
614               
615               DO jl = 1, jpl
616                  WRITE(numout,*) ' - Category (',jl,')'
617                  WRITE(numout,*) '   ~~~~~~~~         ' 
618                  WRITE(numout,*) ' h_i        : ', h_i(ji,jj,jl)              , ' h_s        : ', h_s(ji,jj,jl)
619                  WRITE(numout,*) ' t_i        : ', t_i(ji,jj,1:nlay_i,jl)
620                  WRITE(numout,*) ' t_su       : ', t_su(ji,jj,jl)             , ' t_s        : ', t_s(ji,jj,1:nlay_s,jl)
621                  WRITE(numout,*) ' s_i        : ', s_i(ji,jj,jl)              , ' o_i        : ', o_i(ji,jj,jl)
622                  WRITE(numout,*) ' a_i        : ', a_i(ji,jj,jl)              , ' a_i_b      : ', a_i_b(ji,jj,jl)   
623                  WRITE(numout,*) ' v_i        : ', v_i(ji,jj,jl)              , ' v_i_b      : ', v_i_b(ji,jj,jl)   
624                  WRITE(numout,*) ' v_s        : ', v_s(ji,jj,jl)              , ' v_s_b      : ', v_s_b(ji,jj,jl) 
625                  WRITE(numout,*) ' e_i1       : ', e_i(ji,jj,1,jl)            , ' ei1        : ', e_i_b(ji,jj,1,jl) 
626                  WRITE(numout,*) ' e_i2       : ', e_i(ji,jj,2,jl)            , ' ei2_b      : ', e_i_b(ji,jj,2,jl) 
627                  WRITE(numout,*) ' e_snow     : ', e_s(ji,jj,1,jl)            , ' e_snow_b   : ', e_s_b(ji,jj,1,jl) 
628                  WRITE(numout,*) ' sv_i       : ', sv_i(ji,jj,jl)             , ' sv_i_b     : ', sv_i_b(ji,jj,jl)   
629                  WRITE(numout,*) ' oa_i       : ', oa_i(ji,jj,jl)             , ' oa_i_b     : ', oa_i_b(ji,jj,jl)
630               END DO !jl
631               
632               WRITE(numout,*)
633               WRITE(numout,*) ' - Heat / FW fluxes '
634               WRITE(numout,*) '   ~~~~~~~~~~~~~~~~ '
635               WRITE(numout,*) ' - Heat fluxes in and out the ice ***'
636               WRITE(numout,*) ' qsr_ini       : ', (1._wp-at_i_b(ji,jj)) * qsr(ji,jj) + SUM( a_i_b(ji,jj,:) * qsr_ice(ji,jj,:) )
637               WRITE(numout,*) ' qns_ini       : ', (1._wp-at_i_b(ji,jj)) * qns(ji,jj) + SUM( a_i_b(ji,jj,:) * qns_ice(ji,jj,:) )
638               WRITE(numout,*)
639               WRITE(numout,*) 
640               WRITE(numout,*) ' sst        : ', sst_m(ji,jj) 
641               WRITE(numout,*) ' sss        : ', sss_m(ji,jj) 
642               WRITE(numout,*) 
643               WRITE(numout,*) ' - Stresses '
644               WRITE(numout,*) '   ~~~~~~~~ '
645               WRITE(numout,*) ' utau_ice   : ', utau_ice(ji,jj) 
646               WRITE(numout,*) ' vtau_ice   : ', vtau_ice(ji,jj)
647               WRITE(numout,*) ' utau       : ', utau    (ji,jj) 
648               WRITE(numout,*) ' vtau       : ', vtau    (ji,jj)
649            ENDIF
650           
651            !---------------------
652            ! Salt / heat fluxes
653            !---------------------
654           
655            IF ( kn .EQ. 3 ) THEN
656               WRITE(numout,*) ' ice_prt - Point : ',ji,jj
657               WRITE(numout,*) ' ~~~~~~~~~~~~~~ '
658               WRITE(numout,*) ' - Salt / Heat Fluxes '
659               WRITE(numout,*) '   ~~~~~~~~~~~~~~~~ '
660               WRITE(numout,*) ' lat - long ', gphit(ji,jj), glamt(ji,jj)
661               WRITE(numout,*)
662               WRITE(numout,*) ' - Heat fluxes at bottom interface ***'
663               WRITE(numout,*) ' qsr       : ', qsr(ji,jj)
664               WRITE(numout,*) ' qns       : ', qns(ji,jj)
665               WRITE(numout,*)
666               WRITE(numout,*) ' hfx_mass     : ', hfx_thd(ji,jj) + hfx_dyn(ji,jj) + hfx_snw(ji,jj) + hfx_res(ji,jj)
667               WRITE(numout,*) ' qt_atm_oi    : ', qt_atm_oi(ji,jj)
668               WRITE(numout,*) ' qt_oce_ai    : ', qt_oce_ai(ji,jj)
669               WRITE(numout,*) ' dhc          : ', diag_heat(ji,jj)             
670               WRITE(numout,*)
671               WRITE(numout,*) ' hfx_dyn      : ', hfx_dyn(ji,jj)
672               WRITE(numout,*) ' hfx_thd      : ', hfx_thd(ji,jj)
673               WRITE(numout,*) ' hfx_res      : ', hfx_res(ji,jj)
674               WRITE(numout,*) ' qsb_ice_bot  : ', qsb_ice_bot(ji,jj) 
675               WRITE(numout,*) ' qlead        : ', qlead(ji,jj) * r1_rdtice
676               WRITE(numout,*)
677               WRITE(numout,*) ' - Salt fluxes at bottom interface ***'
678               WRITE(numout,*) ' emp       : ', emp    (ji,jj)
679               WRITE(numout,*) ' sfx       : ', sfx    (ji,jj)
680               WRITE(numout,*) ' sfx_res   : ', sfx_res(ji,jj)
681               WRITE(numout,*) ' sfx_bri   : ', sfx_bri(ji,jj)
682               WRITE(numout,*) ' sfx_dyn   : ', sfx_dyn(ji,jj)
683               WRITE(numout,*)
684               WRITE(numout,*) ' - Momentum fluxes '
685               WRITE(numout,*) ' utau      : ', utau(ji,jj) 
686               WRITE(numout,*) ' vtau      : ', vtau(ji,jj)
687            ENDIF
688            WRITE(numout,*) ' '
689            !
690         END DO
691      END DO
692      !
693   END SUBROUTINE ice_prt
694
695   SUBROUTINE ice_prt3D( cd_routine )
696      !!-------------------------------------------------------------------
697      !!                  ***  ROUTINE ice_prt3D ***
698      !!
699      !! ** Purpose : CTL prints of ice arrays in case ln_ctl is activated
700      !!
701      !!-------------------------------------------------------------------
702      CHARACTER(len=*), INTENT(in) ::   cd_routine    ! name of the routine
703      INTEGER                      ::   jk, jl        ! dummy loop indices
704     
705      CALL prt_ctl_info(' ========== ')
706      CALL prt_ctl_info( cd_routine )
707      CALL prt_ctl_info(' ========== ')
708      CALL prt_ctl_info(' - Cell values : ')
709      CALL prt_ctl_info('   ~~~~~~~~~~~~~ ')
710      CALL prt_ctl(tab2d_1=e1e2t      , clinfo1=' cell area   :')
711      CALL prt_ctl(tab2d_1=at_i       , clinfo1=' at_i        :')
712      CALL prt_ctl(tab2d_1=ato_i      , clinfo1=' ato_i       :')
713      CALL prt_ctl(tab2d_1=vt_i       , clinfo1=' vt_i        :')
714      CALL prt_ctl(tab2d_1=vt_s       , clinfo1=' vt_s        :')
715      CALL prt_ctl(tab2d_1=divu_i     , clinfo1=' divu_i      :')
716      CALL prt_ctl(tab2d_1=delta_i    , clinfo1=' delta_i     :')
717      CALL prt_ctl(tab2d_1=stress1_i  , clinfo1=' stress1_i   :')
718      CALL prt_ctl(tab2d_1=stress2_i  , clinfo1=' stress2_i   :')
719      CALL prt_ctl(tab2d_1=stress12_i , clinfo1=' stress12_i  :')
720      CALL prt_ctl(tab2d_1=strength   , clinfo1=' strength    :')
721      CALL prt_ctl(tab2d_1=delta_i    , clinfo1=' delta_i     :')
722      CALL prt_ctl(tab2d_1=u_ice      , clinfo1=' u_ice       :', tab2d_2=v_ice      , clinfo2=' v_ice       :')
723       
724      DO jl = 1, jpl
725         CALL prt_ctl_info(' ')
726         CALL prt_ctl_info(' - Category : ', ivar1=jl)
727         CALL prt_ctl_info('   ~~~~~~~~~~')
728         CALL prt_ctl(tab2d_1=h_i        (:,:,jl)        , clinfo1= ' h_i         : ')
729         CALL prt_ctl(tab2d_1=h_s        (:,:,jl)        , clinfo1= ' h_s         : ')
730         CALL prt_ctl(tab2d_1=t_su       (:,:,jl)        , clinfo1= ' t_su        : ')
731         CALL prt_ctl(tab2d_1=t_s        (:,:,1,jl)      , clinfo1= ' t_snow      : ')
732         CALL prt_ctl(tab2d_1=s_i        (:,:,jl)        , clinfo1= ' s_i         : ')
733         CALL prt_ctl(tab2d_1=o_i        (:,:,jl)        , clinfo1= ' o_i         : ')
734         CALL prt_ctl(tab2d_1=a_i        (:,:,jl)        , clinfo1= ' a_i         : ')
735         CALL prt_ctl(tab2d_1=v_i        (:,:,jl)        , clinfo1= ' v_i         : ')
736         CALL prt_ctl(tab2d_1=v_s        (:,:,jl)        , clinfo1= ' v_s         : ')
737         CALL prt_ctl(tab2d_1=e_i        (:,:,1,jl)      , clinfo1= ' e_i1        : ')
738         CALL prt_ctl(tab2d_1=e_s        (:,:,1,jl)      , clinfo1= ' e_snow      : ')
739         CALL prt_ctl(tab2d_1=sv_i       (:,:,jl)        , clinfo1= ' sv_i        : ')
740         CALL prt_ctl(tab2d_1=oa_i       (:,:,jl)        , clinfo1= ' oa_i        : ')
741         
742         DO jk = 1, nlay_i
743            CALL prt_ctl_info(' - Layer : ', ivar1=jk)
744            CALL prt_ctl(tab2d_1=t_i(:,:,jk,jl) , clinfo1= ' t_i       : ')
745         END DO
746      END DO
747     
748      CALL prt_ctl_info(' ')
749      CALL prt_ctl_info(' - Heat / FW fluxes : ')
750      CALL prt_ctl_info('   ~~~~~~~~~~~~~~~~~~ ')
751      CALL prt_ctl(tab2d_1=sst_m  , clinfo1= ' sst   : ', tab2d_2=sss_m     , clinfo2= ' sss       : ')
752      CALL prt_ctl(tab2d_1=qsr    , clinfo1= ' qsr   : ', tab2d_2=qns       , clinfo2= ' qns       : ')
753      CALL prt_ctl(tab2d_1=emp    , clinfo1= ' emp   : ', tab2d_2=sfx       , clinfo2= ' sfx       : ')
754     
755      CALL prt_ctl_info(' ')
756      CALL prt_ctl_info(' - Stresses : ')
757      CALL prt_ctl_info('   ~~~~~~~~~~ ')
758      CALL prt_ctl(tab2d_1=utau       , clinfo1= ' utau      : ', tab2d_2=vtau       , clinfo2= ' vtau      : ')
759      CALL prt_ctl(tab2d_1=utau_ice   , clinfo1= ' utau_ice  : ', tab2d_2=vtau_ice   , clinfo2= ' vtau_ice  : ')
760     
761   END SUBROUTINE ice_prt3D
762     
763#else
764   !!----------------------------------------------------------------------
765   !!   Default option         Empty Module           No SI3 sea-ice model
766   !!----------------------------------------------------------------------
767#endif
768
769   !!======================================================================
770END MODULE icectl
Note: See TracBrowser for help on using the repository browser.