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/SI3-03_VP_rheology/src/ICE – NEMO

source: NEMO/branches/2020/SI3-03_VP_rheology/src/ICE/icedyn_rhg.F90 @ 13522

Last change on this file since 13522 was 13522, checked in by vancop, 4 years ago

Close to compiling VP

  • Property svn:keywords set to Id
File size: 10.1 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 icectl         ! sea-ice: control prints
20   !
21   USE in_out_manager ! I/O manager
22   USE lib_mpp        ! MPP library
23   USE lib_fortran    ! fortran utilities (glob_sum + no signed zero)
24   USE timing         ! Timing
25
26   IMPLICIT NONE
27   PRIVATE
28
29   PUBLIC   ice_dyn_rhg        ! called by icestp.F90
30   PUBLIC   ice_dyn_rhg_init   ! called by icestp.F90
31
32   INTEGER ::              nice_rhg   ! choice of the type of rheology
33   !                                        ! associated indices:
34   INTEGER, PARAMETER ::   np_rhgEVP = 1   ! EVP rheology
35!! INTEGER, PARAMETER ::   np_rhgEAP = 2   ! EAP rheology
36   INTEGER, PARAMETER ::   np_rhgVP  = 3   ! VP rheology
37
38   ! ** namelist (namrhg) **
39   LOGICAL ::   ln_rhg_EVP       ! EVP rheology ! MV: why is it declared here while all other parameters are declared in ice.F90
40   LOGICAL ::   ln_rhg_VP        ! EVP rheology
41   !
42   !! * Substitutions
43#  include "vectopt_loop_substitute.h90"
44   !!----------------------------------------------------------------------
45   !! NEMO/ICE 4.0 , NEMO Consortium (2018)
46   !! $Id$
47   !! Software governed by the CeCILL licence     (./LICENSE)
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      INTEGER  ::   jl   ! dummy loop indices
64      !!--------------------------------------------------------------------
65      ! controls
66      IF( ln_timing    )   CALL timing_start('icedyn_rhg')                                                             ! timing
67      IF( ln_icediachk )   CALL ice_cons_hsm(0, 'icedyn_rhg', rdiag_v, rdiag_s, rdiag_t, rdiag_fv, rdiag_fs, rdiag_ft) ! conservation
68      IF( ln_icediachk )   CALL ice_cons2D  (0, 'icedyn_rhg',  diag_v,  diag_s,  diag_t,  diag_fv,  diag_fs,  diag_ft) ! conservation
69      !
70      IF( kt == nit000 .AND. lwp ) THEN
71         WRITE(numout,*)
72         WRITE(numout,*)'ice_dyn_rhg: sea-ice rheology'
73         WRITE(numout,*)'~~~~~~~~~~~'
74      ENDIF
75      !
76      !--------------!
77      !== Rheology ==!
78      !--------------!   
79      SELECT CASE( nice_rhg )
80      !                                !---------------------------------!
81      CASE( np_rhgEVP )                ! Elasto-Viscous-Plastic rheology !
82         !                             !---------------------------------!
83         CALL ice_dyn_rhg_evp( kt, stress1_i, stress2_i, stress12_i, shear_i, divu_i, delta_i )
84         !         
85      END SELECT
86
87      !                                !---------------------------------------------!
88      CASE( np_rhgVP  )                ! Viscous-Plastic rheology                    !
89         !                             !---------------------------------------------!
90         CALL ice_dyn_rhg_vp ( kt, stress1_i, stress2_i, stress12_i, shear_i, divu_i, delta_i )
91         !         
92      END SELECT
93      !
94      IF( lrst_ice ) THEN                       !* write EVP fields in the restart file
95         IF( ln_rhg_EVP )   CALL rhg_evp_rst( 'WRITE', kt )
96         IF( ln_rhg_VP  )   CALL rhg_lsr_rst( 'WRITE', kt )
97      ENDIF
98      !
99      ! controls
100      IF( ln_ctl       )   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, rn_creepl, rn_ecc , nn_nevp, rn_relast, ln_rhg_chkcvg, &           !- evp
123    &                       ln_rhg_VP, nn_nout_vp, nn_ninn_vp, ln_smooth_vp, ln_zebra_vp, rn_relaxu_vp, rn_relaxv_vp, rn_uerr_max_vp, rn_uerr_min_vp, nn_cvgchk_vp  !-vp
124      !!-------------------------------------------------------------------
125     
126      !
127      REWIND( numnam_ice_ref )         ! Namelist namdyn_rhg in reference namelist : Ice dynamics
128      READ  ( numnam_ice_ref, namdyn_rhg, IOSTAT = ios, ERR = 901)
129901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdyn_rhg in reference namelist' )
130      REWIND( numnam_ice_cfg )         ! Namelist namdyn_rhg in configuration namelist : Ice dynamics
131      READ  ( numnam_ice_cfg, namdyn_rhg, IOSTAT = ios, ERR = 902 )
132902   IF( ios >  0 ) CALL ctl_nam ( ios , 'namdyn_rhg in configuration namelist' )
133      IF(lwm) WRITE ( numoni, namdyn_rhg )
134      !
135      IF(lwp) THEN                     ! control print
136         WRITE(numout,*)
137         WRITE(numout,*) 'ice_dyn_rhg_init: ice parameters for ice dynamics '
138         WRITE(numout,*) '~~~~~~~~~~~~~~~'
139         WRITE(numout,*) '   Namelist : namdyn_rhg:'
140         WRITE(numout,*) '      rheology EVP (icedyn_rhg_evp)                        ln_rhg_EVP    = ', ln_rhg_EVP
141         WRITE(numout,*) '         use adaptive EVP (aEVP)                           ln_aEVP       = ', ln_aEVP
142         WRITE(numout,*) '         creep limit                                       rn_creepl     = ', rn_creepl     ! common with VP
143         WRITE(numout,*) '         eccentricity of the elliptical yield curve        rn_ecc        = ', rn_ecc        ! common with VP
144         WRITE(numout,*) '         number of iterations for subcycling               nn_nevp       = ', nn_nevp
145         WRITE(numout,*) '         ratio of elastic timescale over ice time step     rn_relast     = ', rn_relast
146         WRITE(numout,*) '      check convergence of rheology                        ln_rhg_chkcvg = ', ln_rhg_chkcvg ! common with VP
147         WRITE(numout,*) ''   
148         WRITE(numout,*) '      rheology VP     (icedyn_rhg_VP)                      ln_rhg_VP     = ', ln_rhg_VP
149         WRITE(numout,*) '         number of outer iterations                        nn_nout_vp    = ', nn_nout_vp
150         WRITE(numout,*) '         number of inner iterations                        nn_ninn_vp    = ', nn_ninn_vp
151         WRITE(numout,*) '         tanh viscosity smooothing                         ln_smooth_vp  = ', ln_smooth_vp
152         WRITE(numout,*) '         activate zebra solver                             ln_zebra_vp   = ', ln_zebra_vp
153         WRITE(numout,*) '         relaxation factor for u                           rn_relaxu_vp  = ', rn_relaxu_vp
154         WRITE(numout,*) '         relaxation factor for v                           rn_relaxv_vp  = ', rn_relaxv_vp
155         WRITE(numout,*) '         maximum error on velocity                         rn_uerr_max_vp = ', rn_uerr_max_vp
156         WRITE(numout,*) '         velocity to decide convergence                    rn_uerr_min_vp = ', rn_uerr_min_vp
157         WRITE(numout,*) '         iteration step for convergence check              nn_cvgchk_vp   = ', nn_cvgchk_vp
158                           
159      ENDIF
160      !
161      !                             !== set the choice of ice advection ==!
162      ioptio = 0 
163      IF( ln_rhg_EVP ) THEN   ;   ioptio = ioptio + 1   ;   nice_rhg = np_rhgEVP    ;   ENDIF
164!!    IF( ln_rhg_EAP ) THEN   ;   ioptio = ioptio + 1   ;   nice_rhg = np_rhgEAP    ;   ENDIF
165      IF( ln_rhg_VP  ) THEN   ;   ioptio = ioptio + 1   ;   nice_rhg = np_rhgVP     ;   ENDIF
166      IF( ioptio /= 1 )   CALL ctl_stop( 'ice_dyn_rhg_init: choose one and only one ice rheology' )
167      !
168      IF( ln_rhg_EVP  )   CALL rhg_evp_rst( 'READ' )  !* read or initialize all required files
169      IF( ln_rhg_VP   )   CALL rhg_lsr_rst( 'READ' )  !* read or initialize all required files
170      !
171   END SUBROUTINE ice_dyn_rhg_init
172
173#else
174   !!----------------------------------------------------------------------
175   !!   Default option         Empty module           NO SI3 sea-ice model
176   !!----------------------------------------------------------------------
177#endif 
178
179   !!======================================================================
180END MODULE icedyn_rhg
Note: See TracBrowser for help on using the repository browser.