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.
Changeset 8486 for branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/icerhg.F90 – NEMO

Ignore:
Timestamp:
2017-09-01T15:49:35+02:00 (7 years ago)
Author:
clem
Message:

changes in style - part1 - (now the code looks better txs to Gurvan's comments)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/icerhg.F90

    r8426 r8486  
    1010#if defined key_lim3 
    1111   !!---------------------------------------------------------------------- 
    12    !!   'key_lim3' :                                 LIM3 sea-ice model 
     12   !!   'key_lim3'                                       LIM3 sea-ice model 
    1313   !!---------------------------------------------------------------------- 
    1414   !!    ice_rhg      : computes ice velocities 
    1515   !!    ice_rhg_init : initialization and namelist read 
    1616   !!---------------------------------------------------------------------- 
    17    USE phycst           ! physical constants 
    18    USE dom_oce          ! ocean space and time domain 
    19    USE ice              ! LIM-3 variables 
    20    USE icerhg_evp       ! EVP rheology 
    21    USE icectl           ! control prints 
    22    USE icevar 
     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   USE icevar         ! sea-ice: operations 
    2323   ! 
    24    USE lbclnk           ! lateral boundary conditions - MPP exchanges 
    25    USE lib_mpp          ! MPP library 
    26    USE in_out_manager   ! I/O manager 
    27    USE lib_fortran      ! glob_sum 
    28    USE timing           ! Timing 
     24   USE lbclnk         ! lateral boundary conditions - MPP exchanges 
     25   USE lib_mpp        ! MPP library 
     26   USE in_out_manager ! I/O manager 
     27   USE lib_fortran    ! glob_sum 
     28   USE timing         ! Timing 
    2929 
    3030   IMPLICIT NONE 
     
    3737#  include "vectopt_loop_substitute.h90" 
    3838   !!---------------------------------------------------------------------- 
    39    !! NEMO/LIM3 4.0 , UCL - NEMO Consortium (2011) 
     39   !! NEMO/ICE 4.0 , NEMO Consortium (2017) 
    4040   !! $Id: icerhg.F90 8378 2017-07-26 13:55:59Z clem $ 
    4141   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
     
    5353      !!                      - shear, divergence and delta (shear_i, divu_i, delta_i) 
    5454      !!-------------------------------------------------------------------- 
    55       INTEGER, INTENT(in) ::   kt     ! number of iteration 
     55      INTEGER, INTENT(in) ::   kt     ! ice time step 
    5656      !! 
    57       INTEGER  :: jl ! dummy loop indices 
     57      INTEGER  ::   jl  ! dummy loop indices 
    5858      REAL(wp) :: zvi_b, zsmv_b, zei_b, zfs_b, zfw_b, zft_b  
    5959      !!-------------------------------------------------------------------- 
    60  
     60      ! 
    6161      IF( nn_timing == 1 )  CALL timing_start('icerhg') 
    62  
     62      ! 
    6363      IF( kt == nit000 .AND. lwp ) THEN 
    6464         WRITE(numout,*) 
    65          WRITE(numout,*)'icerhg' 
    66          WRITE(numout,*)'~~~~~~' 
     65         WRITE(numout,*)'ice_rhg : sea-ice rheology' 
     66         WRITE(numout,*)'~~~~~~~~' 
    6767      ENDIF 
    6868 
    69       CALL ice_var_agg(1)   ! aggregate ice categories 
     69      CALL ice_var_agg(1)           ! -- aggregate ice categories 
    7070      ! 
    71       ! conservation test 
    72       IF( ln_limdiachk ) CALL ice_cons_hsm(0, 'icerhg', zvi_b, zsmv_b, zei_b, zfw_b, zfs_b, zft_b) 
    73        
    74       ! Landfast ice parameterization: define max bottom friction 
    75       tau_icebfr(:,:) = 0._wp 
    76       IF( ln_landfast ) THEN 
     71      !                             ! -- conservation test 
     72      IF( ln_limdiachk )   CALL ice_cons_hsm(0, 'icerhg', zvi_b, zsmv_b, zei_b, zfw_b, zfs_b, zft_b) 
     73      !                       
     74      IF( ln_landfast ) THEN        ! -- Landfast ice parameterization: define max bottom friction 
    7775         DO jl = 1, jpl 
    78             WHERE( ht_i(:,:,jl) > ht_n(:,:) * rn_gamma )  tau_icebfr(:,:) = tau_icebfr(:,:) + a_i(:,:,jl) * rn_icebfr 
     76            WHERE( ht_i(:,:,jl) > ht_n(:,:) * rn_gamma )   ;   tau_icebfr(:,:) = tau_icebfr(:,:) + a_i(:,:,jl) * rn_icebfr 
     77            ELSEWHERE                                      ;   tau_icebfr(:,:) = 0._wp 
     78            END WHERE 
    7979         END DO 
    8080      ENDIF 
     
    8383      ! Rheology (ice dynamics) 
    8484      ! -----------------------    
    85       IF( nn_limdyn /= 0 ) THEN                          ! -- Ice dynamics 
    86  
     85      IF( nn_limdyn /= 0 ) THEN     ! -- Ice dynamics 
     86         ! 
    8787         CALL ice_rhg_evp( stress1_i, stress2_i, stress12_i, u_ice, v_ice, shear_i, divu_i, delta_i ) 
    88  
    89       ELSE 
    90  
    91          u_ice(:,:) = rn_uice * umask(:,:,1)             !     or prescribed velocity 
     88         ! 
     89      ELSE                          ! -- prescribed uniform velocity 
     90         ! 
     91         u_ice(:,:) = rn_uice * umask(:,:,1) 
    9292         v_ice(:,:) = rn_vice * vmask(:,:,1) 
    9393         !!CALL RANDOM_NUMBER(u_ice(:,:)) 
    9494         !!CALL RANDOM_NUMBER(v_ice(:,:)) 
    95  
     95         ! 
    9696      ENDIF 
    9797      ! 
    98       ! conservation test 
    99       IF( ln_limdiachk ) CALL ice_cons_hsm(1, 'icerhg', zvi_b, zsmv_b, zei_b, zfw_b, zfs_b, zft_b) 
    100  
    101       ! Control prints 
    102       IF( ln_ctl )       CALL ice_prt3D( 'icerhg' ) 
     98      !                                                   !- conservation test 
     99      IF( ln_limdiachk   )   CALL ice_cons_hsm(1, 'icerhg', zvi_b, zsmv_b, zei_b, zfw_b, zfs_b, zft_b) 
     100      IF( ln_ctl         )   CALL ice_prt3D  ('icerhg')   !- Control prints 
     101      IF( nn_timing == 1 )   CALL timing_stop('icerhg')   !- timing 
    103102      ! 
    104       IF( nn_timing == 1 )  CALL timing_stop('icerhg') 
    105  
    106103   END SUBROUTINE ice_rhg 
    107104 
     
    119116      !! ** input   :   Namelist namicedyn 
    120117      !!------------------------------------------------------------------- 
    121       INTEGER  ::   ios                 ! Local integer output status for namelist read 
    122       NAMELIST/namicedyn/ nn_limadv, nn_limadv_ord,                                & 
    123          &                nn_icestr, rn_pe_rdg, rn_pstar, rn_crhg, ln_icestr_bvf,  & 
    124          &                rn_ishlat, rn_cio, rn_creepl, rn_ecc,                    & 
    125          &                nn_nevp, rn_relast, ln_landfast, rn_gamma, rn_icebfr, rn_lfrelax 
     118      INTEGER ::   ios   ! Local integer output status for namelist read 
     119      !! 
     120      NAMELIST/namicedyn/ nn_limadv  , nn_limadv_ord,                                       & 
     121         &                nn_icestr  , rn_pe_rdg, rn_pstar , rn_crhg, ln_icestr_bvf     ,   & 
     122         &                rn_ishlat  , rn_cio   , rn_creepl, rn_ecc , nn_nevp, rn_relast,   & 
     123         &                ln_landfast, rn_gamma , rn_icebfr, rn_lfrelax 
    126124      !!------------------------------------------------------------------- 
    127  
    128       REWIND( numnam_ice_ref )              ! Namelist namicedyn in reference namelist : Ice dynamics 
     125      ! 
     126      REWIND( numnam_ice_ref )         ! Namelist namicedyn in reference namelist : Ice dynamics 
    129127      READ  ( numnam_ice_ref, namicedyn, IOSTAT = ios, ERR = 901) 
    130128901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namicedyn in reference namelist', lwp ) 
    131  
    132       REWIND( numnam_ice_cfg )              ! Namelist namicedyn in configuration namelist : Ice dynamics 
     129      ! 
     130      REWIND( numnam_ice_cfg )         ! Namelist namicedyn in configuration namelist : Ice dynamics 
    133131      READ  ( numnam_ice_cfg, namicedyn, IOSTAT = ios, ERR = 902 ) 
    134132902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namicedyn in configuration namelist', lwp ) 
    135133      IF(lwm) WRITE ( numoni, namicedyn ) 
    136        
    137       IF(lwp) THEN                        ! control print 
     134      ! 
     135      IF(lwp) THEN                     ! control print 
    138136         WRITE(numout,*) 
    139137         WRITE(numout,*) 'ice_rhg_init : ice parameters for ice dynamics ' 
    140138         WRITE(numout,*) '~~~~~~~~~~~~' 
    141          ! limtrp 
    142          WRITE(numout,*)'    choose the advection scheme (-1=Prather, 0=Ulimate-Macho)   nn_limadv     = ', nn_limadv  
    143          WRITE(numout,*)'    choose the order of the scheme (if ultimate)                nn_limadv_ord = ', nn_limadv_ord   
    144          ! icerdgrft 
    145          WRITE(numout,*)'    ice strength parameterization (0=Hibler 1=Rothrock)         nn_icestr     = ', nn_icestr  
    146          WRITE(numout,*)'    Ratio of ridging work to PotEner change in ridging          rn_pe_rdg     = ', rn_pe_rdg  
    147          WRITE(numout,*) '   first bulk-rheology parameter                               rn_pstar      = ', rn_pstar 
    148          WRITE(numout,*) '   second bulk-rhelogy parameter                               rn_crhg       = ', rn_crhg 
    149          WRITE(numout,*)'    Including brine volume in ice strength comp.                ln_icestr_bvf = ', ln_icestr_bvf 
    150          ! icerhg_evp 
    151          WRITE(numout,*) '   lateral boundary condition for sea ice dynamics             rn_ishlat     = ', rn_ishlat 
    152          WRITE(numout,*) '   drag coefficient for oceanic stress                         rn_cio        = ', rn_cio 
    153          WRITE(numout,*) '   creep limit                                                 rn_creepl     = ', rn_creepl 
    154          WRITE(numout,*) '   eccentricity of the elliptical yield curve                  rn_ecc        = ', rn_ecc 
    155          WRITE(numout,*) '   number of iterations for subcycling                         nn_nevp       = ', nn_nevp 
    156          WRITE(numout,*) '   ratio of elastic timescale over ice time step               rn_relast     = ', rn_relast 
    157          WRITE(numout,*) '   Landfast: param (T or F)                                    ln_landfast   = ', ln_landfast 
    158          WRITE(numout,*) '      T: fraction of ocean depth that ice must reach           rn_gamma      = ', rn_gamma 
    159          WRITE(numout,*) '      T: maximum bottom stress per unit area of contact        rn_icebfr     = ', rn_icebfr 
    160          WRITE(numout,*) '      T: relax time scale (s-1) to reach static friction       rn_lfrelax    = ', rn_lfrelax 
     139         WRITE(numout,*) '   Namelist namicedyn' 
     140         WRITE(numout,*) '      advection scheme for ice transport (limtrp)' 
     141         WRITE(numout,*) '         type of advection scheme (-1=Prather, 0=Ulimate-Macho)   nn_limadv     = ', nn_limadv  
     142         WRITE(numout,*) '         order of the scheme for Ultimate-Macho case              nn_limadv_ord = ', nn_limadv_ord 
     143         WRITE(numout,*) '      ridging/rafting (icerdgrft)' 
     144         WRITE(numout,*) '         ice strength parameterization (0=Hibler 1=Rothrock)      nn_icestr     = ', nn_icestr  
     145         WRITE(numout,*) '         Ratio of ridging work to PotEner change in ridging       rn_pe_rdg     = ', rn_pe_rdg  
     146         WRITE(numout,*) '         1st bulk-rheology parameter                              rn_pstar      = ', rn_pstar 
     147         WRITE(numout,*) '         2nd bulk-rhelogy parameter                               rn_crhg       = ', rn_crhg 
     148         WRITE(numout,*) '         brine volume included in ice strength computation        ln_icestr_bvf = ', ln_icestr_bvf 
     149         WRITE(numout,*) '      rheology EVP (icerhg_evp)' 
     150         WRITE(numout,*) '         lateral boundary condition for sea ice dynamics          rn_ishlat     = ', rn_ishlat 
     151         WRITE(numout,*) '         drag coefficient for oceanic stress                      rn_cio        = ', rn_cio 
     152         WRITE(numout,*) '         creep limit                                              rn_creepl     = ', rn_creepl 
     153         WRITE(numout,*) '         eccentricity of the elliptical yield curve               rn_ecc        = ', rn_ecc 
     154         WRITE(numout,*) '         number of iterations for subcycling                      nn_nevp       = ', nn_nevp 
     155         WRITE(numout,*) '         ratio of elastic timescale over ice time step            rn_relast     = ', rn_relast 
     156         WRITE(numout,*) '      Landfast: param (T or F)                                    ln_landfast   = ', ln_landfast 
     157         WRITE(numout,*) '         fraction of ocean depth that ice must reach              rn_gamma      = ', rn_gamma 
     158         WRITE(numout,*) '         maximum bottom stress per unit area of contact           rn_icebfr     = ', rn_icebfr 
     159         WRITE(numout,*) '         relax time scale (s-1) to reach static friction          rn_lfrelax    = ', rn_lfrelax 
    161160      ENDIF 
    162161      ! 
    163       IF     (      rn_ishlat == 0.                ) THEN   ;   IF(lwp) WRITE(numout,*) '   ice lateral  free-slip ' 
    164       ELSEIF (      rn_ishlat == 2.                ) THEN   ;   IF(lwp) WRITE(numout,*) '   ice lateral  no-slip ' 
    165       ELSEIF ( 0. < rn_ishlat .AND. rn_ishlat < 2. ) THEN   ;   IF(lwp) WRITE(numout,*) '   ice lateral  partial-slip ' 
    166       ELSEIF ( 2. < rn_ishlat                      ) THEN   ;   IF(lwp) WRITE(numout,*) '   ice lateral  strong-slip ' 
     162      IF     (      rn_ishlat == 0.                ) THEN   ;   IF(lwp) WRITE(numout,*) '   ===>>>   ice lateral  free-slip' 
     163      ELSEIF (      rn_ishlat == 2.                ) THEN   ;   IF(lwp) WRITE(numout,*) '   ===>>>   ice lateral  no-slip' 
     164      ELSEIF ( 0. < rn_ishlat .AND. rn_ishlat < 2. ) THEN   ;   IF(lwp) WRITE(numout,*) '   ===>>>   ice lateral  partial-slip' 
     165      ELSEIF ( 2. < rn_ishlat                      ) THEN   ;   IF(lwp) WRITE(numout,*) '   ===>>>   ice lateral  strong-slip' 
    167166      ENDIF 
     167      ! 
     168      IF( .NOT. ln_landfast )   tau_icebfr(:,:) = 0._wp     ! NO Landfast ice : set to zero one for all 
    168169      ! 
    169170   END SUBROUTINE ice_rhg_init 
    170171 
     172#else 
     173   !!---------------------------------------------------------------------- 
     174   !!   Default option         Empty module          NO LIM-3 sea-ice model 
     175   !!---------------------------------------------------------------------- 
    171176#endif  
    172177 
Note: See TracChangeset for help on using the changeset viewer.