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.
limdyn.F90 in trunk/NEMO/LIM_SRC_3 – NEMO

source: trunk/NEMO/LIM_SRC_3/limdyn.F90 @ 915

Last change on this file since 915 was 913, checked in by ctlod, 16 years ago

Manage wind stress at the sea-ice (LIM 3.0)/ocean interface in a proper way, see ticket: #128

File size: 13.6 KB
Line 
1MODULE limdyn
2   !!======================================================================
3   !!                     ***  MODULE  limdyn  ***
4   !!   Sea-Ice dynamics : 
5   !!======================================================================
6#if defined key_lim3
7   !!----------------------------------------------------------------------
8   !!   'key_lim3' :                                 LIM3 sea-ice model
9   !!----------------------------------------------------------------------
10   !!    lim_dyn      : computes ice velocities
11   !!    lim_dyn_init : initialization and namelist read
12   !!----------------------------------------------------------------------
13   !! * Modules used
14   USE phycst
15   USE in_out_manager  ! I/O manager
16   USE dom_ice
17   USE dom_oce         ! ocean space and time domain
18   USE ice
19   USE par_ice
20   USE sbc_oce         ! Surface boundary condition: ocean fields
21   USE sbc_ice         ! Surface boundary condition: ice fields
22   USE ice_oce
23   USE iceini
24   USE limistate
25   USE limrhg          ! ice rheology
26   USE lbclnk
27   USE lib_mpp
28   USE prtctl          ! Print control
29
30   IMPLICIT NONE
31   PRIVATE
32
33   !! * Accessibility
34   PUBLIC lim_dyn  ! routine called by ice_step
35
36   !! * Substitutions
37#  include "vectopt_loop_substitute.h90"
38
39   !! * Module variables
40   REAL(wp)  ::  rone    = 1.e0   ! constant value
41
42   !!----------------------------------------------------------------------
43   !!   LIM 3.0,  UCL-ASTR-LOCEAN-IPSL (2008)
44   !! $ Id: $
45   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
46   !!----------------------------------------------------------------------
47
48CONTAINS
49
50   SUBROUTINE lim_dyn
51      !!-------------------------------------------------------------------
52      !!               ***  ROUTINE lim_dyn  ***
53      !!               
54      !! ** Purpose :   compute ice velocity and ocean-ice stress
55      !!               
56      !! ** Method  :
57      !!
58      !! ** Action  : - Initialisation
59      !!              - Call of the dynamic routine for each hemisphere
60      !!              - computation of the stress at the ocean surface         
61      !!              - treatment of the case if no ice dynamic
62      !! History :
63      !!   1.0  !  01-04   (LIM)  Original code
64      !!   2.0  !  02-08   (C. Ethe, G. Madec)  F90, mpp
65      !!   3.0  !  2007-03 (M.A. Morales Maqueda, S. Bouillon, M. Vancoppenolle)
66      !!                   LIM3, EVP, C-grid
67      !!------------------------------------------------------------------------------------
68      !! * Local variables
69      INTEGER  ::   ji, jj, jl, ja    ! dummy loop indices
70      INTEGER  ::   i_j1, i_jpj       ! Starting/ending j-indices for rheology
71      REAL(wp) ::   zcoef             ! temporary scalar
72      REAL(wp), DIMENSION(jpj)     ::   zind           ! i-averaged indicator of sea-ice
73      REAL(wp), DIMENSION(jpj)     ::   zmsk           ! i-averaged of tmask
74      REAL(wp), DIMENSION(jpi,jpj) ::   zu_io, zv_io   ! ice-ocean velocity
75      !!---------------------------------------------------------------------
76
77      WRITE(numout,*) ' lim_dyn : Ice dynamics '
78      WRITE(numout,*) ' ~~~~~~~ '
79
80      IF( numit == nstart  )   CALL lim_dyn_init   ! Initialization (first time-step only)
81     
82      IF ( ln_limdyn ) THEN
83
84         old_u_ice(:,:) = u_ice(:,:) * tmu(:,:)
85         old_v_ice(:,:) = v_ice(:,:) * tmv(:,:)
86
87         ! Rheology (ice dynamics)
88         ! ========
89
90         !  Define the j-limits where ice rheology is computed
91         ! ---------------------------------------------------
92
93         IF( lk_mpp .OR. nbit_cmp == 1 ) THEN                    ! mpp: compute over the whole domain
94            i_j1 = 1
95            i_jpj = jpj
96            IF(ln_ctl) CALL prt_ctl_info( 'lim_dyn  :    i_j1 = ', ivar1=i_j1, clinfo2=' ij_jpj = ', ivar2=i_jpj )
97            CALL lim_rhg( i_j1, i_jpj )
98         ELSE                                 ! optimization of the computational area
99
100            DO jj = 1, jpj
101               zind(jj) = SUM( 1.0 - at_i (:,jj  ) )   ! = FLOAT(jpj) if ocean everywhere on a j-line
102               zmsk(jj) = SUM( tmask(:,jj,1) )   ! = 0          if land  everywhere on a j-line
103            END DO
104
105            IF( l_jeq ) THEN                     ! local domain include both hemisphere
106               !                                 ! Rheology is computed in each hemisphere
107               !                                 ! only over the ice cover latitude strip
108               ! Northern hemisphere
109               i_j1  = njeq
110               i_jpj = jpj
111               DO WHILE ( i_j1 <= jpj .AND. zind(i_j1) == FLOAT(jpi) .AND. zmsk(i_j1) /=0 )
112                  i_j1 = i_j1 + 1
113               END DO
114               i_j1 = MAX( 1, i_j1-1 )
115               IF(ln_ctl) CALL prt_ctl_info( 'lim_dyn  : NH  i_j1 = ', ivar1=i_j1, clinfo2=' ij_jpj = ', ivar2=i_jpj )
116               CALL lim_rhg( i_j1, i_jpj )
117
118               ! Southern hemisphere
119               i_j1  =  1
120               i_jpj = njeq
121               DO WHILE ( i_jpj >= 1 .AND. zind(i_jpj) == FLOAT(jpi) .AND. zmsk(i_jpj) /=0 )
122                  i_jpj = i_jpj - 1
123               END DO
124               i_jpj = MIN( jpj, i_jpj+2 )
125               IF(ln_ctl) CALL prt_ctl_info( 'lim_dyn  : SH  i_j1 = ', ivar1=i_j1, clinfo2=' ij_jpj = ', ivar2=i_jpj )
126
127               CALL lim_rhg( i_j1, i_jpj )
128
129            ELSE                                 ! local domain extends over one hemisphere only
130               !                                 ! Rheology is computed only over the ice cover
131               !                                 ! latitude strip
132               i_j1  = 1
133               DO WHILE ( i_j1 <= jpj .AND. zind(i_j1) == FLOAT(jpi) .AND. zmsk(i_j1) /=0 )
134                  i_j1 = i_j1 + 1
135               END DO
136               i_j1 = MAX( 1, i_j1-1 )
137
138               i_jpj  = jpj
139               DO WHILE ( i_jpj >= 1  .AND. zind(i_jpj) == FLOAT(jpi) .AND. zmsk(i_jpj) /=0 )
140                  i_jpj = i_jpj - 1
141               END DO
142               i_jpj = MIN( jpj, i_jpj+2)
143
144               IF(ln_ctl) CALL prt_ctl_info( 'lim_dyn  : one hemisphere:  i_j1 = ', ivar1=i_j1, clinfo2=' ij_jpj = ', ivar2=i_jpj )
145
146               CALL lim_rhg( i_j1, i_jpj )
147
148            ENDIF
149
150         ENDIF
151
152         ! computation of friction velocity
153         ! --------------------------------
154         ! ice-ocean velocity at U & V-points (u_ice vi_ice at U- & V-points ; ssu_m, ssv_m at U- & V-points)
155         zu_io(:,:) = u_ice(:,:) - ssu_m(:,:)
156         zv_io(:,:) = v_ice(:,:) - ssv_m(:,:)
157         ! frictional velocity at T-point
158         DO jj = 2, jpjm1 
159            DO ji = fs_2, fs_jpim1   ! vector opt.
160               ust2s(ji,jj) = 0.5 * cw                                                          &
161                  &         * (  zu_io(ji,jj) * zu_io(ji,jj) + zu_io(ji-1,jj) * zu_io(ji-1,jj)   &
162                  &            + zv_io(ji,jj) * zv_io(ji,jj) + zv_io(ji,jj-1) * zv_io(ji,jj-1)   ) * tms(ji,jj)
163            END DO
164         END DO
165         !
166      ELSE      ! no ice dynamics : transmit directly the atmospheric stress to the ocean
167         !
168         zcoef = SQRT( 0.5 ) / rau0
169         DO jj = 2, jpjm1
170            DO ji = fs_2, fs_jpim1   ! vector opt.
171               ust2s(ji,jj) = zcoef * tms(ji,jj) * SQRT(  utau(ji,jj) * utau(ji,jj) + utau(ji-1,jj) * utau(ji-1,jj)   &
172                  &                                     + vtau(ji,jj) * vtau(ji,jj) + vtau(ji,jj-1) * vtau(ji,jj-1) )
173            END DO
174         END DO
175         !
176      ENDIF
177
178      CALL lbc_lnk( ust2s, 'T',  1. )   ! T-point
179
180      IF(ln_ctl) THEN   ! Control print
181         CALL prt_ctl_info(' ')
182         CALL prt_ctl_info(' - Cell values : ')
183         CALL prt_ctl_info('   ~~~~~~~~~~~~~ ')
184         CALL prt_ctl(tab2d_1=ust2s     , clinfo1=' lim_dyn  : ust2s     :')
185         CALL prt_ctl(tab2d_1=divu_i    , clinfo1=' lim_dyn  : divu_i    :')
186         CALL prt_ctl(tab2d_1=delta_i   , clinfo1=' lim_dyn  : delta_i   :')
187         CALL prt_ctl(tab2d_1=strength  , clinfo1=' lim_dyn  : strength  :')
188         CALL prt_ctl(tab2d_1=area      , clinfo1=' lim_dyn  : cell area :')
189         CALL prt_ctl(tab2d_1=at_i      , clinfo1=' lim_dyn  : at_i      :')
190         CALL prt_ctl(tab2d_1=vt_i      , clinfo1=' lim_dyn  : vt_i      :')
191         CALL prt_ctl(tab2d_1=vt_s      , clinfo1=' lim_dyn  : vt_s      :')
192         CALL prt_ctl(tab2d_1=stress1_i , clinfo1=' lim_dyn  : stress1_i :')
193         CALL prt_ctl(tab2d_1=stress2_i , clinfo1=' lim_dyn  : stress2_i :')
194         CALL prt_ctl(tab2d_1=stress12_i, clinfo1=' lim_dyn  : stress12_i:')
195         DO jl = 1, jpl
196            CALL prt_ctl_info(' ')
197            CALL prt_ctl_info(' - Category : ', ivar1=jl)
198            CALL prt_ctl_info('   ~~~~~~~~~~')
199            CALL prt_ctl(tab2d_1=a_i   (:,:,jl)   , clinfo1= ' lim_dyn  : a_i      : ')
200            CALL prt_ctl(tab2d_1=ht_i  (:,:,jl)   , clinfo1= ' lim_dyn  : ht_i     : ')
201            CALL prt_ctl(tab2d_1=ht_s  (:,:,jl)   , clinfo1= ' lim_dyn  : ht_s     : ')
202            CALL prt_ctl(tab2d_1=v_i   (:,:,jl)   , clinfo1= ' lim_dyn  : v_i      : ')
203            CALL prt_ctl(tab2d_1=v_s   (:,:,jl)   , clinfo1= ' lim_dyn  : v_s      : ')
204            CALL prt_ctl(tab2d_1=e_s   (:,:,1,jl) , clinfo1= ' lim_dyn  : e_s      : ')
205            CALL prt_ctl(tab2d_1=t_su  (:,:,jl)   , clinfo1= ' lim_dyn  : t_su     : ')
206            CALL prt_ctl(tab2d_1=t_s   (:,:,1,jl) , clinfo1= ' lim_dyn  : t_snow   : ')
207            CALL prt_ctl(tab2d_1=sm_i  (:,:,jl)   , clinfo1= ' lim_dyn  : sm_i     : ')
208            CALL prt_ctl(tab2d_1=smv_i (:,:,jl)   , clinfo1= ' lim_dyn  : smv_i    : ')
209            DO ja = 1, nlay_i
210               CALL prt_ctl_info(' ')
211               CALL prt_ctl_info(' - Layer : ', ivar1=ja)
212               CALL prt_ctl_info('   ~~~~~~~')
213               CALL prt_ctl(tab2d_1=t_i(:,:,ja,jl) , clinfo1= ' lim_dyn  : t_i      : ')
214               CALL prt_ctl(tab2d_1=e_i(:,:,ja,jl) , clinfo1= ' lim_dyn  : e_i      : ')
215            END DO
216         END DO
217      ENDIF
218
219   END SUBROUTINE lim_dyn
220
221    SUBROUTINE lim_dyn_init
222      !!-------------------------------------------------------------------
223      !!                  ***  ROUTINE lim_dyn_init  ***
224      !!
225      !! ** Purpose : Physical constants and parameters linked to the ice
226      !!      dynamics
227      !!
228      !! ** Method  :  Read the namicedyn namelist and check the ice-dynamic
229      !!       parameter values called at the first timestep (nit000)
230      !!
231      !! ** input   :   Namelist namicedyn
232      !!
233      !! history :
234      !!  8.5  ! 03-08 (C. Ethe) original code
235      !!  9.0  ! 07-03 (MA Morales Maqueda, S. Bouillon, M. Vancoppenolle)
236      !!               EVP-Cgrid-LIM3
237      !!-------------------------------------------------------------------
238      NAMELIST/namicedyn/ epsd, alpha,     &
239         &                dm, nbiter, nbitdr, om, resl, cw, angvg, pstar,   &
240         &                c_rhg, etamn, creepl, ecc, ahi0, &
241         &                nevp, telast, alphaevp
242      !!-------------------------------------------------------------------
243
244      ! Define the initial parameters
245      ! -------------------------
246
247      ! Read Namelist namicedyn
248      REWIND ( numnam_ice )
249      READ   ( numnam_ice  , namicedyn )
250      IF(lwp) THEN
251         WRITE(numout,*)
252         WRITE(numout,*) 'lim_dyn_init : ice parameters for ice dynamics '
253         WRITE(numout,*) '~~~~~~~~~~~~'
254         WRITE(numout,*) '   tolerance parameter                              epsd   = ', epsd
255         WRITE(numout,*) '   coefficient for semi-implicit coriolis           alpha  = ', alpha
256         WRITE(numout,*) '   diffusion constant for dynamics                  dm     = ', dm
257         WRITE(numout,*) '   number of sub-time steps for relaxation          nbiter = ', nbiter
258         WRITE(numout,*) '   maximum number of iterations for relaxation      nbitdr = ', nbitdr
259         WRITE(numout,*) '   relaxation constant                              om     = ', om
260         WRITE(numout,*) '   maximum value for the residual of relaxation     resl   = ', resl
261         WRITE(numout,*) '   drag coefficient for oceanic stress              cw     = ', cw
262         WRITE(numout,*) '   turning angle for oceanic stress                 angvg  = ', angvg
263         WRITE(numout,*) '   first bulk-rheology parameter                    pstar  = ', pstar
264         WRITE(numout,*) '   second bulk-rhelogy parameter                    c_rhg  = ', c_rhg
265         WRITE(numout,*) '   minimun value for viscosity                      etamn  = ', etamn
266         WRITE(numout,*) '   creep limit                                      creepl = ', creepl
267         WRITE(numout,*) '   eccentricity of the elliptical yield curve       ecc    = ', ecc
268         WRITE(numout,*) '   horizontal diffusivity coeff. for sea-ice        ahi0   = ', ahi0
269         WRITE(numout,*) '   number of iterations for subcycling              nevp   = ', nevp
270         WRITE(numout,*) '   timescale for elastic waves                      telast = ', telast
271         WRITE(numout,*) '   coefficient for the solution of int. stresses  alphaevp = ', alphaevp
272
273      ENDIF
274
275      usecc2 = 1.0 / ( ecc * ecc )
276      rhoco  = rau0 * cw
277      angvg  = angvg * rad
278      sangvg = SIN( angvg )
279      cangvg = COS( angvg )
280      pstarh = pstar / 2.0
281
282      !  Diffusion coefficients.
283      ahiu(:,:) = ahi0 * umask(:,:,1)
284      ahiv(:,:) = ahi0 * vmask(:,:,1)
285
286   END SUBROUTINE lim_dyn_init
287
288#else
289   !!----------------------------------------------------------------------
290   !!   Default option          Empty module           NO LIM sea-ice model
291   !!----------------------------------------------------------------------
292CONTAINS
293   SUBROUTINE lim_dyn         ! Empty routine
294   END SUBROUTINE lim_dyn
295#endif 
296
297   !!======================================================================
298END MODULE limdyn
Note: See TracBrowser for help on using the repository browser.