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 @ 8518

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

changes in style - part6 - commits of the day

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