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 branches/2017/dev_r7881_ENHANCE09_RK3/NEMOGCM/NEMO/LIM_SRC_3 – NEMO

source: branches/2017/dev_r7881_ENHANCE09_RK3/NEMOGCM/NEMO/LIM_SRC_3/icedyn_rhg.F90 @ 8586

Last change on this file since 8586 was 8586, checked in by gm, 6 years ago

#1911 (ENHANCE-09): PART I.3 - phasing with branch dev_r8183_ICEMODEL revision 8575

File size: 7.4 KB
Line 
1MODULE icedyn_rhg
2   !!======================================================================
3   !!                     ***  MODULE  icedyn_rhg  ***
4   !!   Sea-Ice dynamics : master routine for rheology
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'                                       ESIM sea-ice model
13   !!----------------------------------------------------------------------
14   !!    ice_dyn_rhg      : computes ice velocities
15   !!    ice_dyn_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 icedyn_rhg_evp ! sea-ice: EVP 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
39   ! ** namelist (namrhg) **
40   LOGICAL ::   ln_rhg_EVP       ! EVP rheology
41   !
42   !! * Substitutions
43#  include "vectopt_loop_substitute.h90"
44   !!----------------------------------------------------------------------
45   !! NEMO/ICE 4.0 , NEMO Consortium (2017)
46   !! $Id: icedyn_rhg.F90 8378 2017-07-26 13:55:59Z clem $
47   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
48   !!----------------------------------------------------------------------
49CONTAINS
50
51   SUBROUTINE ice_dyn_rhg( kt )
52      !!-------------------------------------------------------------------
53      !!               ***  ROUTINE ice_dyn_rhg  ***
54      !!               
55      !! ** Purpose :   compute ice velocity
56      !!
57      !! ** Action  : comupte - ice velocity (u_ice, v_ice)
58      !!                      - 3 components of the stress tensor (stress1_i, stress2_i, stress12_i)
59      !!                      - shear, divergence and delta (shear_i, divu_i, delta_i)
60      !!--------------------------------------------------------------------
61      INTEGER, INTENT(in) ::   kt     ! ice time step
62      !!--------------------------------------------------------------------
63      ! controls
64      IF( nn_timing == 1 )   CALL timing_start('icedyn_rhg')                                                             ! timing
65      IF( ln_icediachk   )   CALL ice_cons_hsm(0, 'icedyn_rhg', rdiag_v, rdiag_s, rdiag_t, rdiag_fv, rdiag_fs, rdiag_ft) ! conservation
66      !
67      IF( kt == nit000 .AND. lwp ) THEN
68         WRITE(numout,*)
69         WRITE(numout,*)'ice_dyn_rhg: sea-ice rheology'
70         WRITE(numout,*)'~~~~~~~~~~~'
71      ENDIF
72
73      ! --------
74      ! Rheology
75      ! --------   
76      SELECT CASE( nice_rhg )
77      !                                !------------------------!
78      CASE( np_rhgEVP )                ! Elasto-Viscous-Plastic !
79         !                             !------------------------!
80         CALL ice_dyn_rhg_evp( kt, stress1_i, stress2_i, stress12_i, u_ice, v_ice, shear_i, divu_i, delta_i )
81         !         
82      END SELECT
83      !
84      IF( lrst_ice ) THEN                       !* write EVP fields in the restart file
85         IF( ln_rhg_EVP )   CALL rhg_evp_rst( 'WRITE', kt )
86      ENDIF
87      !
88      ! controls
89      IF( ln_icediachk   )   CALL ice_cons_hsm(1, 'icedyn_rhg', rdiag_v, rdiag_s, rdiag_t, rdiag_fv, rdiag_fs, rdiag_ft) ! conservation
90      IF( ln_ctl         )   CALL ice_prt3D   ('icedyn_rhg')                                                             ! prints
91      IF( nn_timing == 1 )   CALL timing_stop ('icedyn_rhg')                                                             ! timing
92      !
93   END SUBROUTINE ice_dyn_rhg
94
95   SUBROUTINE ice_dyn_rhg_init
96      !!-------------------------------------------------------------------
97      !!                  ***  ROUTINE ice_dyn_rhg_init  ***
98      !!
99      !! ** Purpose : Physical constants and parameters linked to the ice
100      !!      dynamics
101      !!
102      !! ** Method  :  Read the namdyn_rhg namelist and check the ice-dynamic
103      !!       parameter values called at the first timestep (nit000)
104      !!
105      !! ** input   :   Namelist namdyn_rhg
106      !!-------------------------------------------------------------------
107      INTEGER ::   ios, ioptio   ! Local integer output status for namelist read
108      !!
109      NAMELIST/namdyn_rhg/  ln_rhg_EVP, rn_creepl, rn_ecc , nn_nevp, rn_relast
110      !!-------------------------------------------------------------------
111      !
112      REWIND( numnam_ice_ref )         ! Namelist namdyn_rhg in reference namelist : Ice dynamics
113      READ  ( numnam_ice_ref, namdyn_rhg, IOSTAT = ios, ERR = 901)
114901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdyn_rhg in reference namelist', lwp )
115      !
116      REWIND( numnam_ice_cfg )         ! Namelist namdyn_rhg in configuration namelist : Ice dynamics
117      READ  ( numnam_ice_cfg, namdyn_rhg, IOSTAT = ios, ERR = 902 )
118902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdyn_rhg in configuration namelist', lwp )
119      IF(lwm) WRITE ( numoni, namdyn_rhg )
120      !
121      IF(lwp) THEN                     ! control print
122         WRITE(numout,*)
123         WRITE(numout,*) 'ice_dyn_rhg_init: ice parameters for ice dynamics '
124         WRITE(numout,*) '~~~~~~~~~~~~~~~'
125         WRITE(numout,*) '   Namelist namdyn_rhg:'
126         WRITE(numout,*) '      rheology EVP (icedyn_rhg_evp)                        ln_rhg_EVP = ', ln_rhg_EVP
127         WRITE(numout,*) '         creep limit                                       rn_creepl  = ', rn_creepl
128         WRITE(numout,*) '         eccentricity of the elliptical yield curve        rn_ecc     = ', rn_ecc
129         WRITE(numout,*) '         number of iterations for subcycling               nn_nevp    = ', nn_nevp
130         WRITE(numout,*) '         ratio of elastic timescale over ice time step     rn_relast  = ', rn_relast
131      ENDIF
132      !
133      !                             !== set the choice of ice advection ==!
134      ioptio = 0 
135      IF( ln_rhg_EVP ) THEN   ;   ioptio = ioptio + 1   ;   nice_rhg = np_rhgEVP    ;   ENDIF
136!!    IF( ln_rhg_EAP ) THEN   ;   ioptio = ioptio + 1   ;   nice_rhg = np_rhgEAP    ;   ENDIF
137      IF( ioptio /= 1 )   CALL ctl_stop( 'ice_dyn_rhg_init: choose one and only one ice rheology' )
138      !
139      IF( ln_rhg_EVP )   CALL rhg_evp_rst( 'READ' )  !* read or initialize all required files
140      !
141   END SUBROUTINE ice_dyn_rhg_init
142
143#else
144   !!----------------------------------------------------------------------
145   !!   Default option         Empty module           NO ESIM sea-ice model
146   !!----------------------------------------------------------------------
147#endif 
148
149   !!======================================================================
150END MODULE icedyn_rhg
Note: See TracBrowser for help on using the repository browser.