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.
icerhg.F90 in branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3 – NEMO

source: branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/icerhg.F90 @ 8506

Last change on this file since 8506 was 8491, checked in by clem, 7 years ago

debug icevar.F90

File size: 9.5 KB
Line 
1MODULE icerhg
2   !!======================================================================
3   !!                     ***  MODULE  icerhg  ***
4   !!   Sea-Ice dynamics : 
5   !!======================================================================
6   !! history :  1.0  ! 2002-08  (C. Ethe, G. Madec)  original VP code
7   !!            3.0  ! 2007-03  (MA Morales Maqueda, S. Bouillon, M. Vancoppenolle)  LIM3: EVP-Cgrid
8   !!            3.5  ! 2011-02  (G. Madec) dynamical allocation
9   !!----------------------------------------------------------------------
10#if defined key_lim3
11   !!----------------------------------------------------------------------
12   !!   'key_lim3'                                       LIM3 sea-ice model
13   !!----------------------------------------------------------------------
14   !!    ice_rhg      : computes ice velocities
15   !!    ice_rhg_init : initialization and namelist read
16   !!----------------------------------------------------------------------
17   USE phycst         ! physical constants
18   USE dom_oce        ! ocean space and time domain
19   USE ice            ! sea-ice: variables
20   USE icerhg_evp     ! sea-ice: EVP rheology
21   USE icectl         ! sea-ice: control prints
22   USE icevar         ! sea-ice: operations
23   !
24   USE lbclnk         ! lateral boundary conditions - MPP exchanges
25   USE lib_mpp        ! MPP library
26   USE in_out_manager ! I/O manager
27   USE lib_fortran    ! glob_sum
28   USE timing         ! Timing
29
30   IMPLICIT NONE
31   PRIVATE
32
33   PUBLIC   ice_rhg        ! routine called by icestp.F90
34   PUBLIC   ice_rhg_init   ! routine called by icestp.F90
35
36   !! * Substitutions
37#  include "vectopt_loop_substitute.h90"
38   !!----------------------------------------------------------------------
39   !! NEMO/ICE 4.0 , NEMO Consortium (2017)
40   !! $Id: icerhg.F90 8378 2017-07-26 13:55:59Z clem $
41   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
42   !!----------------------------------------------------------------------
43CONTAINS
44
45   SUBROUTINE ice_rhg( kt )
46      !!-------------------------------------------------------------------
47      !!               ***  ROUTINE ice_rhg  ***
48      !!               
49      !! ** Purpose :   compute ice velocity
50      !!
51      !! ** Action  : comupte - ice velocity (u_ice, v_ice)
52      !!                      - 3 components of the stress tensor (stress1_i, stress2_i, stress12_i)
53      !!                      - shear, divergence and delta (shear_i, divu_i, delta_i)
54      !!--------------------------------------------------------------------
55      INTEGER, INTENT(in) ::   kt     ! ice time step
56      !!
57      INTEGER  ::   jl   ! dummy loop indices
58      REAL(wp) :: zvi_b, zsmv_b, zei_b, zfs_b, zfw_b, zft_b 
59      !!--------------------------------------------------------------------
60      !
61      IF( nn_timing == 1 )  CALL timing_start('icerhg')
62      !
63      IF( kt == nit000 .AND. lwp ) THEN
64         WRITE(numout,*)
65         WRITE(numout,*)'ice_rhg : sea-ice rheology'
66         WRITE(numout,*)'~~~~~~~~'
67      ENDIF
68
69      CALL ice_var_agg(1)           ! -- aggregate ice categories
70      !
71      !                             ! -- conservation test
72      IF( ln_limdiachk )   CALL ice_cons_hsm(0, 'icerhg', zvi_b, zsmv_b, zei_b, zfw_b, zfs_b, zft_b)
73      !                     
74      IF( ln_landfast ) THEN        ! -- Landfast ice parameterization: define max bottom friction
75         tau_icebfr(:,:) = 0._wp
76         DO jl = 1, jpl
77            WHERE( ht_i(:,:,jl) > ht_n(:,:) * rn_gamma )   tau_icebfr(:,:) = tau_icebfr(:,:) + a_i(:,:,jl) * rn_icebfr
78         END DO
79      ENDIF
80     
81      ! -----------------------
82      ! Rheology (ice dynamics)
83      ! -----------------------   
84      IF( nn_limdyn /= 0 ) THEN     ! -- Ice dynamics
85         !
86         CALL ice_rhg_evp( stress1_i, stress2_i, stress12_i, u_ice, v_ice, shear_i, divu_i, delta_i )
87         !
88      ELSE                          ! -- prescribed uniform velocity
89         !
90         u_ice(:,:) = rn_uice * umask(:,:,1)
91         v_ice(:,:) = rn_vice * vmask(:,:,1)
92         !!CALL RANDOM_NUMBER(u_ice(:,:))
93         !!CALL RANDOM_NUMBER(v_ice(:,:))
94         !
95      ENDIF
96      !
97      !                                                   !- conservation test
98      IF( ln_limdiachk   )   CALL ice_cons_hsm(1, 'icerhg', zvi_b, zsmv_b, zei_b, zfw_b, zfs_b, zft_b)
99      IF( ln_ctl         )   CALL ice_prt3D  ('icerhg')   !- Control prints
100      IF( nn_timing == 1 )   CALL timing_stop('icerhg')   !- timing
101      !
102   END SUBROUTINE ice_rhg
103
104
105   SUBROUTINE ice_rhg_init
106      !!-------------------------------------------------------------------
107      !!                  ***  ROUTINE ice_rhg_init  ***
108      !!
109      !! ** Purpose : Physical constants and parameters linked to the ice
110      !!      dynamics
111      !!
112      !! ** Method  :  Read the namicedyn namelist and check the ice-dynamic
113      !!       parameter values called at the first timestep (nit000)
114      !!
115      !! ** input   :   Namelist namicedyn
116      !!-------------------------------------------------------------------
117      INTEGER ::   ios   ! Local integer output status for namelist read
118      !!
119      NAMELIST/namicedyn/ nn_limadv  , nn_limadv_ord,                                       &
120         &                nn_icestr  , rn_pe_rdg, rn_pstar , rn_crhg, ln_icestr_bvf     ,   &
121         &                rn_ishlat  , rn_cio   , rn_creepl, rn_ecc , nn_nevp, rn_relast,   &
122         &                ln_landfast, rn_gamma , rn_icebfr, rn_lfrelax
123      !!-------------------------------------------------------------------
124      !
125      REWIND( numnam_ice_ref )         ! Namelist namicedyn in reference namelist : Ice dynamics
126      READ  ( numnam_ice_ref, namicedyn, IOSTAT = ios, ERR = 901)
127901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namicedyn in reference namelist', lwp )
128      !
129      REWIND( numnam_ice_cfg )         ! Namelist namicedyn in configuration namelist : Ice dynamics
130      READ  ( numnam_ice_cfg, namicedyn, IOSTAT = ios, ERR = 902 )
131902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namicedyn in configuration namelist', lwp )
132      IF(lwm) WRITE ( numoni, namicedyn )
133      !
134      IF(lwp) THEN                     ! control print
135         WRITE(numout,*)
136         WRITE(numout,*) 'ice_rhg_init : ice parameters for ice dynamics '
137         WRITE(numout,*) '~~~~~~~~~~~~'
138         WRITE(numout,*) '   Namelist namicedyn'
139         WRITE(numout,*) '      advection scheme for ice transport (limtrp)'
140         WRITE(numout,*) '         type of advection scheme (-1=Prather, 0=Ulimate-Macho)   nn_limadv     = ', nn_limadv 
141         WRITE(numout,*) '         order of the scheme for Ultimate-Macho case              nn_limadv_ord = ', nn_limadv_ord
142         WRITE(numout,*) '      ridging/rafting (icerdgrft)'
143         WRITE(numout,*) '         ice strength parameterization (0=Hibler 1=Rothrock)      nn_icestr     = ', nn_icestr 
144         WRITE(numout,*) '         Ratio of ridging work to PotEner change in ridging       rn_pe_rdg     = ', rn_pe_rdg 
145         WRITE(numout,*) '         1st bulk-rheology parameter                              rn_pstar      = ', rn_pstar
146         WRITE(numout,*) '         2nd bulk-rhelogy parameter                               rn_crhg       = ', rn_crhg
147         WRITE(numout,*) '         brine volume included in ice strength computation        ln_icestr_bvf = ', ln_icestr_bvf
148         WRITE(numout,*) '      rheology EVP (icerhg_evp)'
149         WRITE(numout,*) '         lateral boundary condition for sea ice dynamics          rn_ishlat     = ', rn_ishlat
150         WRITE(numout,*) '         drag coefficient for oceanic stress                      rn_cio        = ', rn_cio
151         WRITE(numout,*) '         creep limit                                              rn_creepl     = ', rn_creepl
152         WRITE(numout,*) '         eccentricity of the elliptical yield curve               rn_ecc        = ', rn_ecc
153         WRITE(numout,*) '         number of iterations for subcycling                      nn_nevp       = ', nn_nevp
154         WRITE(numout,*) '         ratio of elastic timescale over ice time step            rn_relast     = ', rn_relast
155         WRITE(numout,*) '      Landfast: param (T or F)                                    ln_landfast   = ', ln_landfast
156         WRITE(numout,*) '         fraction of ocean depth that ice must reach              rn_gamma      = ', rn_gamma
157         WRITE(numout,*) '         maximum bottom stress per unit area of contact           rn_icebfr     = ', rn_icebfr
158         WRITE(numout,*) '         relax time scale (s-1) to reach static friction          rn_lfrelax    = ', rn_lfrelax
159      ENDIF
160      !
161      IF     (      rn_ishlat == 0.                ) THEN   ;   IF(lwp) WRITE(numout,*) '   ===>>>   ice lateral  free-slip'
162      ELSEIF (      rn_ishlat == 2.                ) THEN   ;   IF(lwp) WRITE(numout,*) '   ===>>>   ice lateral  no-slip'
163      ELSEIF ( 0. < rn_ishlat .AND. rn_ishlat < 2. ) THEN   ;   IF(lwp) WRITE(numout,*) '   ===>>>   ice lateral  partial-slip'
164      ELSEIF ( 2. < rn_ishlat                      ) THEN   ;   IF(lwp) WRITE(numout,*) '   ===>>>   ice lateral  strong-slip'
165      ENDIF
166      !
167      IF( .NOT. ln_landfast )   tau_icebfr(:,:) = 0._wp     ! NO Landfast ice : set to zero one for all
168      !
169   END SUBROUTINE ice_rhg_init
170
171#else
172   !!----------------------------------------------------------------------
173   !!   Default option         Empty module          NO LIM-3 sea-ice model
174   !!----------------------------------------------------------------------
175#endif 
176
177   !!======================================================================
178END MODULE icerhg
Note: See TracBrowser for help on using the repository browser.