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/2019/fix_sn_cfctl_ticket2328/src/ICE – NEMO

source: NEMO/branches/2019/fix_sn_cfctl_ticket2328/src/ICE/icedyn_rhg.F90 @ 11872

Last change on this file since 11872 was 11872, checked in by acc, 4 years ago

Branch 2019/fix_sn_cfctl_ticket2328. See #2328. Replacement of ln_ctl and activation of full functionality with
sn_cfctl structure. These changes rename structure components l_mppout and l_mpptop as l_prtctl and l_prttrc
and introduce l_glochk to activate former ln_ctl code in stpctl.F90 to perform global location of min and max
checks. Also added is l_allon which can be used to activate all output (much like the former ln_ctl). If l_allon
is .false. then l_config decides whether or not the suboptions are used.

   sn_cfctl%l_glochk = .FALSE.    ! Range sanity checks are local (F) or global (T). Set T for debugging only
   sn_cfctl%l_allon  = .FALSE.    ! IF T activate all options. If F deactivate all unless l_config is T
   sn_cfctl%l_config = .TRUE.     ! IF .true. then control which reports are written with the remaining options

Note, these changes pass SETTE tests but all references to ln_ctl need to be removed from the sette scripts.

  • Property svn:keywords set to Id
File size: 7.6 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
37   ! ** namelist (namrhg) **
38   LOGICAL ::   ln_rhg_EVP       ! EVP rheology
39   !
40   !! * Substitutions
41#  include "vectopt_loop_substitute.h90"
42   !!----------------------------------------------------------------------
43   !! NEMO/ICE 4.0 , NEMO Consortium (2018)
44   !! $Id$
45   !! Software governed by the CeCILL licence     (./LICENSE)
46   !!----------------------------------------------------------------------
47CONTAINS
48
49   SUBROUTINE ice_dyn_rhg( kt )
50      !!-------------------------------------------------------------------
51      !!               ***  ROUTINE ice_dyn_rhg  ***
52      !!               
53      !! ** Purpose :   compute ice velocity
54      !!
55      !! ** Action  : comupte - ice velocity (u_ice, v_ice)
56      !!                      - 3 components of the stress tensor (stress1_i, stress2_i, stress12_i)
57      !!                      - shear, divergence and delta (shear_i, divu_i, delta_i)
58      !!--------------------------------------------------------------------
59      INTEGER, INTENT(in) ::   kt     ! ice time step
60      !
61      INTEGER  ::   jl   ! dummy loop indices
62      !!--------------------------------------------------------------------
63      ! controls
64      IF( ln_timing    )   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      IF( ln_icediachk )   CALL ice_cons2D  (0, 'icedyn_rhg',  diag_v,  diag_s,  diag_t,  diag_fv,  diag_fs,  diag_ft) ! conservation
67      !
68      IF( kt == nit000 .AND. lwp ) THEN
69         WRITE(numout,*)
70         WRITE(numout,*)'ice_dyn_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_dyn_rhg_evp( kt, stress1_i, stress2_i, stress12_i, 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( sn_cfctl%l_prtctl ) &
91         &                 CALL ice_prt3D   ('icedyn_rhg')                                                             ! prints
92      IF( ln_icediachk )   CALL ice_cons_hsm(1, 'icedyn_rhg', rdiag_v, rdiag_s, rdiag_t, rdiag_fv, rdiag_fs, rdiag_ft) ! conservation
93      IF( ln_icediachk )   CALL ice_cons2D  (1, 'icedyn_rhg',  diag_v,  diag_s,  diag_t,  diag_fv,  diag_fs,  diag_ft) ! conservation
94      IF( ln_timing    )   CALL timing_stop ('icedyn_rhg')                                                             ! timing
95      !
96   END SUBROUTINE ice_dyn_rhg
97
98
99   SUBROUTINE ice_dyn_rhg_init
100      !!-------------------------------------------------------------------
101      !!                  ***  ROUTINE ice_dyn_rhg_init  ***
102      !!
103      !! ** Purpose : Physical constants and parameters linked to the ice
104      !!      dynamics
105      !!
106      !! ** Method  :  Read the namdyn_rhg namelist and check the ice-dynamic
107      !!       parameter values called at the first timestep (nit000)
108      !!
109      !! ** input   :   Namelist namdyn_rhg
110      !!-------------------------------------------------------------------
111      INTEGER ::   ios, ioptio   ! Local integer output status for namelist read
112      !!
113      NAMELIST/namdyn_rhg/  ln_rhg_EVP, ln_aEVP, rn_creepl, rn_ecc , nn_nevp, rn_relast
114      !!-------------------------------------------------------------------
115      !
116      REWIND( numnam_ice_ref )         ! Namelist namdyn_rhg in reference namelist : Ice dynamics
117      READ  ( numnam_ice_ref, namdyn_rhg, IOSTAT = ios, ERR = 901)
118901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdyn_rhg in reference namelist' )
119      REWIND( numnam_ice_cfg )         ! Namelist namdyn_rhg in configuration namelist : Ice dynamics
120      READ  ( numnam_ice_cfg, namdyn_rhg, IOSTAT = ios, ERR = 902 )
121902   IF( ios >  0 ) CALL ctl_nam ( ios , 'namdyn_rhg in configuration namelist' )
122      IF(lwm) WRITE ( numoni, namdyn_rhg )
123      !
124      IF(lwp) THEN                     ! control print
125         WRITE(numout,*)
126         WRITE(numout,*) 'ice_dyn_rhg_init: ice parameters for ice dynamics '
127         WRITE(numout,*) '~~~~~~~~~~~~~~~'
128         WRITE(numout,*) '   Namelist : namdyn_rhg:'
129         WRITE(numout,*) '      rheology EVP (icedyn_rhg_evp)                        ln_rhg_EVP = ', ln_rhg_EVP
130         WRITE(numout,*) '         use adaptive EVP (aEVP)                           ln_aEVP    = ', ln_aEVP
131         WRITE(numout,*) '         creep limit                                       rn_creepl  = ', rn_creepl
132         WRITE(numout,*) '         eccentricity of the elliptical yield curve        rn_ecc     = ', rn_ecc
133         WRITE(numout,*) '         number of iterations for subcycling               nn_nevp    = ', nn_nevp
134         WRITE(numout,*) '         ratio of elastic timescale over ice time step     rn_relast  = ', rn_relast
135      ENDIF
136      !
137      !                             !== set the choice of ice advection ==!
138      ioptio = 0 
139      IF( ln_rhg_EVP ) THEN   ;   ioptio = ioptio + 1   ;   nice_rhg = np_rhgEVP    ;   ENDIF
140!!    IF( ln_rhg_EAP ) THEN   ;   ioptio = ioptio + 1   ;   nice_rhg = np_rhgEAP    ;   ENDIF
141      IF( ioptio /= 1 )   CALL ctl_stop( 'ice_dyn_rhg_init: choose one and only one ice rheology' )
142      !
143      IF( ln_rhg_EVP  )   CALL rhg_evp_rst( 'READ' )  !* read or initialize all required files
144      !
145   END SUBROUTINE ice_dyn_rhg_init
146
147#else
148   !!----------------------------------------------------------------------
149   !!   Default option         Empty module           NO SI3 sea-ice model
150   !!----------------------------------------------------------------------
151#endif 
152
153   !!======================================================================
154END MODULE icedyn_rhg
Note: See TracBrowser for help on using the repository browser.