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 trunk/NEMO/LIM_SRC_2 – NEMO

source: trunk/NEMO/LIM_SRC_2/limdyn_2.F90 @ 1146

Last change on this file since 1146 was 1146, checked in by rblod, 16 years ago

Add svn Id (first try), see ticket #210

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