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.
icedyn_rhg.F90 in NEMO/branches/2020/dev_r13648_ASINTER-04_laurent_bulk_ice/src/ICE – NEMO

source: NEMO/branches/2020/dev_r13648_ASINTER-04_laurent_bulk_ice/src/ICE/icedyn_rhg.F90 @ 14021

Last change on this file since 14021 was 14021, checked in by laurent, 3 years ago

Caught up with trunk rev 14020...

  • Property svn:keywords set to Id
File size: 9.8 KB
Line 
1MODULE icedyn_rhg
2   !!======================================================================
3   !!                     ***  MODULE  icedyn_rhg  ***
4   !!   Sea-Ice dynamics : master routine for rheology
5   !!======================================================================
6   !! history :  4.0  !  2018     (C. Rousset)      Original code
7   !!----------------------------------------------------------------------
8#if defined key_si3
9   !!----------------------------------------------------------------------
10   !!   'key_si3'                                       SI3 sea-ice model
11   !!----------------------------------------------------------------------
12   !!    ice_dyn_rhg      : computes ice velocities
13   !!    ice_dyn_rhg_init : initialization and namelist read
14   !!----------------------------------------------------------------------
15   USE phycst         ! physical constants
16   USE dom_oce        ! ocean space and time domain
17   USE ice            ! sea-ice: variables
18   USE icedyn_rhg_evp ! sea-ice: EVP rheology
19   USE icedyn_rhg_eap ! sea-ice: EAP rheology
20   USE icedyn_rhg_vp  ! sea-ice: VP  rheology
21   USE icectl         ! sea-ice: control prints
22   !
23   USE in_out_manager ! I/O manager
24   USE lib_mpp        ! MPP library
25   USE lib_fortran    ! fortran utilities (glob_sum + no signed zero)
26   USE timing         ! Timing
27
28   IMPLICIT NONE
29   PRIVATE
30
31   PUBLIC   ice_dyn_rhg        ! called by icestp.F90
32   PUBLIC   ice_dyn_rhg_init   ! called by icestp.F90
33
34   INTEGER ::              nice_rhg   ! choice of the type of rheology
35   !                                        ! associated indices:
36   INTEGER, PARAMETER ::   np_rhgEVP = 1   ! EVP rheology
37   INTEGER, PARAMETER ::   np_rhgEAP = 2   ! EAP rheology
38   INTEGER, PARAMETER ::   np_rhgVP  = 3   ! VP rheology
39
40   !
41   !!----------------------------------------------------------------------
42   !! NEMO/ICE 4.0 , NEMO Consortium (2018)
43   !! $Id$
44   !! Software governed by the CeCILL licence     (./LICENSE)
45   !!----------------------------------------------------------------------
46CONTAINS
47
48   SUBROUTINE ice_dyn_rhg( kt, Kmm )
49      !!-------------------------------------------------------------------
50      !!               ***  ROUTINE ice_dyn_rhg  ***
51      !!
52      !! ** Purpose :   compute ice velocity
53      !!
54      !! ** Action  : comupte - ice velocity (u_ice, v_ice)
55      !!                      - 3 components of the stress tensor (stress1_i, stress2_i, stress12_i)
56      !!                      - shear, divergence and delta (shear_i, divu_i, delta_i)
57      !!--------------------------------------------------------------------
58      INTEGER, INTENT(in) ::   kt     ! ice time step
59      INTEGER, INTENT(in) ::   Kmm    ! ocean time level index
60      !!--------------------------------------------------------------------
61      ! controls
62      IF( ln_timing    )   CALL timing_start('icedyn_rhg')                                                             ! timing
63      IF( ln_icediachk )   CALL ice_cons_hsm(0, 'icedyn_rhg', rdiag_v, rdiag_s, rdiag_t, rdiag_fv, rdiag_fs, rdiag_ft) ! conservation
64      IF( ln_icediachk )   CALL ice_cons2D  (0, 'icedyn_rhg',  diag_v,  diag_s,  diag_t,  diag_fv,  diag_fs,  diag_ft) ! conservation
65      !
66      IF( kt == nit000 .AND. lwp ) THEN
67         WRITE(numout,*)
68         WRITE(numout,*)'ice_dyn_rhg: sea-ice rheology'
69         WRITE(numout,*)'~~~~~~~~~~~'
70      ENDIF
71      !
72      !--------------!
73      !== Rheology ==!
74      !--------------!
75      SELECT CASE( nice_rhg )
76      !                                !------------------------!
77      CASE( np_rhgEVP )                ! Elasto-Viscous-Plastic !
78         !                             !------------------------!
79         CALL ice_dyn_rhg_evp( kt, Kmm, stress1_i, stress2_i, stress12_i, shear_i, divu_i, delta_i )
80         !
81         !                             !------------------------!
82      CASE( np_rhgVP  )                ! Viscous-Plastic        !
83         !                             !------------------------!
84         CALL ice_dyn_rhg_vp ( kt, shear_i, divu_i, delta_i )
85         !
86         !                             !----------------------------!
87      CASE( np_rhgEAP )                ! Elasto-Anisotropic-Plastic !
88         !                             !----------------------------!
89         CALL ice_dyn_rhg_eap( kt, Kmm, stress1_i, stress2_i, stress12_i, shear_i, divu_i, delta_i, aniso_11, aniso_12, rdg_conv )
90      END SELECT
91      !
92      IF( lrst_ice ) THEN
93         IF( ln_rhg_EVP )   CALL rhg_evp_rst( 'WRITE', kt ) !* write EVP fields in the restart file
94         IF( ln_rhg_EAP )   CALL rhg_eap_rst( 'WRITE', kt ) !* write EAP fields in the restart file
95         ! MV note: no restart needed for VP as there is no time equation for stress tensor
96      ENDIF
97      !
98      ! controls
99      IF( sn_cfctl%l_prtctl ) &
100         &                 CALL ice_prt3D   ('icedyn_rhg')                                                             ! prints
101      IF( ln_icediachk )   CALL ice_cons_hsm(1, 'icedyn_rhg', rdiag_v, rdiag_s, rdiag_t, rdiag_fv, rdiag_fs, rdiag_ft) ! conservation
102      IF( ln_icediachk )   CALL ice_cons2D  (1, 'icedyn_rhg',  diag_v,  diag_s,  diag_t,  diag_fv,  diag_fs,  diag_ft) ! conservation
103      IF( ln_timing    )   CALL timing_stop ('icedyn_rhg')                                                             ! timing
104      !
105   END SUBROUTINE ice_dyn_rhg
106
107
108   SUBROUTINE ice_dyn_rhg_init
109      !!-------------------------------------------------------------------
110      !!                  ***  ROUTINE ice_dyn_rhg_init  ***
111      !!
112      !! ** Purpose : Physical constants and parameters linked to the ice
113      !!      dynamics
114      !!
115      !! ** Method  :  Read the namdyn_rhg namelist and check the ice-dynamic
116      !!       parameter values called at the first timestep (nit000)
117      !!
118      !! ** input   :   Namelist namdyn_rhg
119      !!-------------------------------------------------------------------
120      INTEGER ::   ios, ioptio   ! Local integer output status for namelist read
121      !!
122      NAMELIST/namdyn_rhg/  ln_rhg_EVP, ln_aEVP, ln_rhg_EAP, rn_creepl, rn_ecc , nn_nevp, rn_relast, nn_rhg_chkcvg, &  !-- evp
123         &                  ln_rhg_VP, nn_vp_nout, nn_vp_ninn, nn_vp_chkcvg                                            !-- vp
124      !!-------------------------------------------------------------------
125      !
126      READ  ( numnam_ice_ref, namdyn_rhg, IOSTAT = ios, ERR = 901)
127901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdyn_rhg in reference namelist' )
128      READ  ( numnam_ice_cfg, namdyn_rhg, IOSTAT = ios, ERR = 902 )
129902   IF( ios >  0 ) CALL ctl_nam ( ios , 'namdyn_rhg in configuration namelist' )
130      IF(lwm) WRITE ( numoni, namdyn_rhg )
131      !
132      IF(lwp) THEN                     ! control print
133         WRITE(numout,*)
134         WRITE(numout,*) 'ice_dyn_rhg_init: ice parameters for ice dynamics '
135         WRITE(numout,*) '~~~~~~~~~~~~~~~'
136         WRITE(numout,*) '   Namelist : namdyn_rhg:'
137         WRITE(numout,*) '      rheology EVP (icedyn_rhg_evp)                        ln_rhg_EVP    = ', ln_rhg_EVP
138         WRITE(numout,*) '         use adaptive EVP (aEVP)                           ln_aEVP       = ', ln_aEVP
139         WRITE(numout,*) '         creep limit                                       rn_creepl     = ', rn_creepl ! also used by vp
140         WRITE(numout,*) '         eccentricity of the elliptical yield curve        rn_ecc        = ', rn_ecc    ! also used by vp
141         WRITE(numout,*) '         number of iterations for subcycling               nn_nevp       = ', nn_nevp
142         WRITE(numout,*) '         ratio of elastic timescale over ice time step     rn_relast     = ', rn_relast
143         WRITE(numout,*) '         check convergence of rheology                     nn_rhg_chkcvg = ', nn_rhg_chkcvg
144         WRITE(numout,*) '      rheology VP   (icedyn_rhg_VP)                        ln_rhg_VP     = ', ln_rhg_VP
145         WRITE(numout,*) '         number of outer iterations                        nn_vp_nout    = ', nn_vp_nout
146         WRITE(numout,*) '         number of inner iterations                        nn_vp_ninn    = ', nn_vp_ninn
147         WRITE(numout,*) '         iteration step for convergence check              nn_vp_chkcvg  = ', nn_vp_chkcvg
148         IF( ln_rhg_EVP ) THEN
149            IF    ( nn_rhg_chkcvg == 0 ) THEN   ;   WRITE(numout,*) '         no check cvg'
150            ELSEIF( nn_rhg_chkcvg == 1 ) THEN   ;   WRITE(numout,*) '         check cvg at the main time step'
151            ELSEIF( nn_rhg_chkcvg == 2 ) THEN   ;   WRITE(numout,*) '         check cvg at both main and rheology time steps'
152            ENDIF
153         ENDIF
154         WRITE(numout,*) '      rheology EAP (icedyn_rhg_eap)                        ln_rhg_EAP = ', ln_rhg_EAP
155      ENDIF
156      !
157      !                             !== set the choice of ice advection ==!
158      ioptio = 0
159      IF( ln_rhg_EVP ) THEN   ;   ioptio = ioptio + 1   ;   nice_rhg = np_rhgEVP    ;   ENDIF
160      IF( ln_rhg_EAP ) THEN   ;   ioptio = ioptio + 1   ;   nice_rhg = np_rhgEAP    ;   ENDIF
161      IF( ln_rhg_VP  ) THEN   ;   ioptio = ioptio + 1   ;   nice_rhg = np_rhgVP     ;   ENDIF
162      IF( ioptio /= 1 )   CALL ctl_stop( 'ice_dyn_rhg_init: choose one and only one ice rheology' )
163      !
164      IF( ln_rhg_EVP  )   CALL rhg_evp_rst( 'READ' )  !* read or initialize all required files
165      IF( ln_rhg_EAP  )   CALL rhg_eap_rst( 'READ' )  !* read or initialize all required files
166      ! no restart for VP as there is no explicit time dependency in the equation
167      !
168   END SUBROUTINE ice_dyn_rhg_init
169
170#else
171   !!----------------------------------------------------------------------
172   !!   Default option         Empty module           NO SI3 sea-ice model
173   !!----------------------------------------------------------------------
174#endif
175
176   !!======================================================================
177END MODULE icedyn_rhg
Note: See TracBrowser for help on using the repository browser.