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_2.F90 in branches/DEV_r1837_mass_heat_salt_fluxes/NEMO/LIM_SRC_2 – NEMO

source: branches/DEV_r1837_mass_heat_salt_fluxes/NEMO/LIM_SRC_2/limdyn_2.F90 @ 1855

Last change on this file since 1855 was 1855, checked in by gm, 14 years ago

ticket:#665 style change only, with the suppression of thd_ice_2 (merged in ice_2)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 11.5 KB
Line 
1MODULE limdyn_2
2   !!======================================================================
3   !!                     ***  MODULE  limdyn_2  ***
4   !!   Sea-Ice dynamics : 
5   !!======================================================================
6   !! History :   1.0  !  01-04  (LIM)  Original code
7   !!             2.0  !  02-08  (C. Ethe, G. Madec)  F90, mpp
8   !!             2.0  !  03-08  (C. Ethe) add lim_dyn_init
9   !!             2.0  !  06-07  (G. Madec)  Surface module
10   !!---------------------------------------------------------------------
11#if defined key_lim2
12   !!----------------------------------------------------------------------
13   !!   'key_lim2' :                                  LIM 2.0 sea-ice model
14   !!----------------------------------------------------------------------
15   !!    lim_dyn_2      : computes ice velocities
16   !!    lim_dyn_init_2 : initialization and namelist read
17   !!----------------------------------------------------------------------
18   USE dom_oce        ! ocean space and time domain
19   USE sbc_oce        ! surface boundary condition : ocean
20   USE phycst         ! physical constants
21   USE ice_2          ! LIM-2 sea-ice variables
22   USE dom_ice_2      ! LIM-2 domain
23   USE limistate_2    ! LIM-2 initial state
24   USE limrhg_2       ! LIM-2 rheology
25
26   USE lbclnk         !
27   USE lib_mpp        !
28   USE in_out_manager ! I/O manager
29   USE prtctl         ! Print control
30
31   IMPLICIT NONE
32   PRIVATE
33
34   PUBLIC   lim_dyn_2 ! routine called by sbc_ice_lim
35
36   REAL(wp)  ::  rone    = 1.e0   ! constant value
37
38#  include "vectopt_loop_substitute.h90"
39   !!----------------------------------------------------------------------
40   !! NEMO/LIM 3.3,  UCL-LOCEAN-IPSL (2010)
41   !! $Id$
42   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
43   !!----------------------------------------------------------------------
44
45CONTAINS
46
47   SUBROUTINE lim_dyn_2( kt )
48      !!-------------------------------------------------------------------
49      !!               ***  ROUTINE lim_dyn_2  ***
50      !!               
51      !! ** Purpose :   compute ice velocity and ocean-ice friction velocity
52      !!               
53      !! ** Method  :
54      !!
55      !! ** Action  : - Initialisation
56      !!              - Call of the dynamic routine for each hemisphere
57      !!              - computation of the friction velocity at the sea-ice base
58      !!              - treatment of the case if no ice dynamic
59      !!---------------------------------------------------------------------
60      INTEGER, INTENT(in) ::   kt   ! number of iteration
61      !!
62      INTEGER  ::   ji, jj        ! dummy loop indices
63      INTEGER  ::   i_j1, i_jpj   ! Starting/ending j-indices for rheology
64      REAL(wp) ::   zcoef         ! temporary scalar
65      REAL(wp), DIMENSION(jpj)     ::   zind           ! i-averaged indicator of sea-ice
66      REAL(wp), DIMENSION(jpj)     ::   zmsk           ! i-averaged of tmask
67      REAL(wp), DIMENSION(jpi,jpj) ::   zu_io, zv_io   ! ice-ocean velocity
68      !!---------------------------------------------------------------------
69
70      IF( kt == nit000 )   CALL lim_dyn_init_2   ! Initialization (first time-step only)
71     
72      IF( ln_limdyn ) THEN
73         !
74         ! Mean ice and snow thicknesses.         
75         hsnm(:,:)  = ( 1.0 - frld(:,:) ) * hsnif(:,:)
76         hicm(:,:)  = ( 1.0 - frld(:,:) ) * hicif(:,:)
77         !
78         !                                     ! Rheology (ice dynamics)
79         !                                     ! ========
80         
81         !  Define the j-limits where ice rheology is computed
82         ! ---------------------------------------------------
83         
84         IF( lk_mpp .OR. nbit_cmp == 1 ) THEN                    ! mpp: compute over the whole domain
85            i_j1 = 1   
86            i_jpj = jpj
87            IF(ln_ctl)   CALL prt_ctl_info( 'lim_dyn  :    i_j1 = ', ivar1=i_j1, clinfo2=' ij_jpj = ', ivar2=i_jpj )
88            CALL lim_rhg_2( i_j1, i_jpj )
89            !
90         ELSE                                 ! optimization of the computational area
91            !
92            DO jj = 1, jpj
93               zind(jj) = SUM( frld (:,jj  ) )   ! = FLOAT(jpj) if ocean everywhere on a j-line
94               zmsk(jj) = SUM( tmask(:,jj,1) )   ! = 0          if land  everywhere on a j-line
95            END DO
96            !
97            IF( l_jeq ) THEN                     ! local domain include both hemisphere
98               !                                 ! Rheology is computed in each hemisphere
99               !                                 ! only over the ice cover latitude strip
100               ! Northern hemisphere
101               i_j1  = njeq
102               i_jpj = jpj
103               DO WHILE ( i_j1 <= jpj .AND. zind(i_j1) == FLOAT(jpi) .AND. zmsk(i_j1) /=0 )
104                  i_j1 = i_j1 + 1
105               END DO
106               i_j1 = MAX( 1, i_j1-1 )
107               IF(ln_ctl)   WRITE(numout,*) 'lim_dyn : NH i_j1 = ', i_j1, ' ij_jpj = ', i_jpj
108               !
109               CALL lim_rhg_2( i_j1, i_jpj )
110               !
111               ! Southern hemisphere
112               i_j1  =  1 
113               i_jpj = njeq
114               DO WHILE ( i_jpj >= 1 .AND. zind(i_jpj) == FLOAT(jpi) .AND. zmsk(i_jpj) /=0 )
115                  i_jpj = i_jpj - 1
116               END DO
117               i_jpj = MIN( jpj, i_jpj+2 )
118               IF(ln_ctl)   WRITE(numout,*) 'lim_dyn : SH i_j1 = ', i_j1, ' ij_jpj = ', i_jpj
119               !
120               CALL lim_rhg_2( i_j1, i_jpj )
121               !
122            ELSE                                 ! local domain extends over one hemisphere only
123               !                                 ! Rheology is computed only over the ice cover
124               !                                 ! latitude strip
125               i_j1  = 1
126               DO WHILE ( i_j1 <= jpj .AND. zind(i_j1) == FLOAT(jpi) .AND. zmsk(i_j1) /=0 )
127                  i_j1 = i_j1 + 1
128               END DO
129               i_j1 = MAX( 1, i_j1-1 )
130   
131               i_jpj  = jpj
132               DO WHILE ( i_jpj >= 1  .AND. zind(i_jpj) == FLOAT(jpi) .AND. zmsk(i_jpj) /=0 )
133                  i_jpj = i_jpj - 1
134               END DO
135               i_jpj = MIN( jpj, i_jpj+2)
136   
137               IF(ln_ctl)   WRITE(numout,*) 'lim_dyn : one hemisphere: i_j1 = ', i_j1, ' ij_jpj = ', i_jpj
138               !
139               CALL lim_rhg_2( i_j1, i_jpj )
140               !
141            ENDIF
142            !
143         ENDIF
144
145         IF(ln_ctl)   CALL prt_ctl( tab2d_1=u_ice, clinfo1=' lim_dyn  : u_ice :', tab2d_2=v_ice, clinfo2=' v_ice :' )
146         
147         ! computation of friction velocity
148         ! --------------------------------
149         ! ice-ocean velocity at U & V-points (u_ice v_ice at I-point ; ssu_m, ssv_m at U- & V-points)
150         
151         DO jj = 1, jpjm1
152            DO ji = 1, jpim1   ! NO vector opt.
153               zu_io(ji,jj) = 0.5 * ( u_ice(ji+1,jj+1) + u_ice(ji+1,jj  ) ) - ssu_m(ji,jj)
154               zv_io(ji,jj) = 0.5 * ( v_ice(ji+1,jj+1) + v_ice(ji  ,jj+1) ) - ssv_m(ji,jj)
155            END DO
156         END DO
157         ! frictional velocity at T-point
158         DO jj = 2, jpjm1
159            DO ji = 2, jpim1   ! NO vector opt. because of zu_io
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)   CALL prt_ctl( tab2d_1=ust2s, clinfo1=' lim_dyn  : ust2s :' )
181
182   END SUBROUTINE lim_dyn_2
183
184
185   SUBROUTINE lim_dyn_init_2
186      !!-------------------------------------------------------------------
187      !!                  ***  ROUTINE lim_dyn_init_2  ***
188      !!
189      !! ** Purpose :   Physical constants and parameters linked to the ice
190      !!              dynamics
191      !!
192      !! ** Method  :   Read the namicedyn namelist and check the ice-dynamic
193      !!              parameter values
194      !!
195      !! ** input   :   Namelist namicedyn
196      !!-------------------------------------------------------------------
197      NAMELIST/namicedyn/ epsd, alpha,     &
198         &                dm, nbiter, nbitdr, om, resl, cw, angvg, pstar,   &
199         &                c_rhg, etamn, creepl, ecc, ahi0
200      !!-------------------------------------------------------------------
201
202      REWIND ( numnam_ice )                       ! Read Namelist namicedyn
203      READ   ( numnam_ice  , namicedyn )
204
205      IF(lwp) THEN                                ! Control print
206         WRITE(numout,*)
207         WRITE(numout,*) 'lim_dyn_init_2: ice parameters for ice dynamics '
208         WRITE(numout,*) '~~~~~~~~~~~~~~'
209         WRITE(numout,*) '       tolerance parameter                              epsd   = ', epsd
210         WRITE(numout,*) '       coefficient for semi-implicit coriolis           alpha  = ', alpha
211         WRITE(numout,*) '       diffusion constant for dynamics                  dm     = ', dm
212         WRITE(numout,*) '       number of sub-time steps for relaxation          nbiter = ', nbiter
213         WRITE(numout,*) '       maximum number of iterations for relaxation      nbitdr = ', nbitdr
214         WRITE(numout,*) '       relaxation constant                              om     = ', om
215         WRITE(numout,*) '       maximum value for the residual of relaxation     resl   = ', resl
216         WRITE(numout,*) '       drag coefficient for oceanic stress              cw     = ', cw
217         WRITE(numout,*) '       turning angle for oceanic stress                 angvg  = ', angvg, ' degrees'
218         WRITE(numout,*) '       first bulk-rheology parameter                    pstar  = ', pstar
219         WRITE(numout,*) '       second bulk-rhelogy parameter                    c_rhg  = ', c_rhg
220         WRITE(numout,*) '       minimun value for viscosity                      etamn  = ', etamn
221         WRITE(numout,*) '       creep limit                                      creepl = ', creepl
222         WRITE(numout,*) '       eccentricity of the elliptical yield curve       ecc    = ', ecc
223         WRITE(numout,*) '       horizontal diffusivity coeff. for sea-ice        ahi0   = ', ahi0
224      ENDIF
225
226      !  Initialization
227      usecc2 = 1.0 / ( ecc * ecc )
228      rhoco  = rau0 * cw
229      angvg  = angvg * rad      ! convert angvg from degree to radian
230      sangvg = SIN( angvg )
231      cangvg = COS( angvg )
232      pstarh = pstar / 2.0
233      !
234      ahiu(:,:) = ahi0 * umask(:,:,1)            ! Ice eddy Diffusivity coefficients.
235      ahiv(:,:) = ahi0 * vmask(:,:,1)
236      !
237   END SUBROUTINE lim_dyn_init_2
238
239#else
240   !!----------------------------------------------------------------------
241   !!   Default option          Empty module       NO LIM 2.0 sea-ice model
242   !!----------------------------------------------------------------------
243CONTAINS
244   SUBROUTINE lim_dyn_2         ! Empty routine
245   END SUBROUTINE lim_dyn_2
246#endif 
247
248   !!======================================================================
249END MODULE limdyn_2
Note: See TracBrowser for help on using the repository browser.