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 2528 for trunk/NEMOGCM/NEMO/LIM_SRC_3/limrhg.F90 – NEMO

Ignore:
Timestamp:
2010-12-27T18:33:53+01:00 (13 years ago)
Author:
rblod
Message:

Update NEMOGCM from branch nemo_v3_3_beta

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/NEMO/LIM_SRC_3/limrhg.F90

    r2477 r2528  
    77   !!            3.0  !  2008-03  (M. Vancoppenolle) LIM3 
    88   !!             -   !  2008-11  (M. Vancoppenolle, S. Bouillon, Y. Aksenov) add surface tilt in ice rheolohy  
     9   !!            3.3  !  2009-05  (G.Garric) addition of the lim2_evp cas 
    910   !!---------------------------------------------------------------------- 
    10 #if defined key_lim3 
     11#if defined key_lim3 || (  defined key_lim2 && ! defined key_lim2_vp ) 
    1112   !!---------------------------------------------------------------------- 
    12    !!   'key_lim3'                                      LIM3 sea-ice model 
     13   !!   'key_lim3'               OR                     LIM-3 sea-ice model 
     14   !!   'key_lim2' AND NOT 'key_lim2_vp'             VP LIM-2 sea-ice model 
    1315   !!---------------------------------------------------------------------- 
    1416   !!   lim_rhg   : computes ice velocities 
    1517   !!---------------------------------------------------------------------- 
    16    !! * Modules used 
    17    USE phycst 
    18    USE par_oce 
    19    USE dom_oce 
    20    USE dom_ice 
    21    USE sbc_oce         ! Surface boundary condition: ocean fields 
    22    USE sbc_ice         ! Surface boundary condition: ice fields 
    23    USE ice 
    24    USE lbclnk 
    25    USE lib_mpp 
    26    USE in_out_manager  ! I/O manager 
    27    USE limitd_me 
    28    USE prtctl          ! Print control 
    29  
     18   USE phycst           ! Physical constant 
     19   USE par_oce          ! Ocean parameters 
     20   USE dom_oce          ! Ocean domain 
     21   USE sbc_oce          ! Surface boundary condition: ocean fields 
     22   USE sbc_ice          ! Surface boundary condition: ice fields 
     23   USE lbclnk           ! Lateral Boundary Condition / MPP link 
     24   USE lib_mpp          ! MPP library 
     25   USE in_out_manager   ! I/O manager 
     26   USE prtctl           ! Print control 
     27#if defined key_lim3 
     28   USE ice              ! LIM-3: ice variables 
     29   USE dom_ice          ! LIM-3: ice domain 
     30   USE limitd_me        ! LIM-3:  
     31#else 
     32   USE ice_2            ! LIM2: ice variables 
     33   USE dom_ice_2        ! LIM2: ice domain 
     34#endif 
    3035 
    3136   IMPLICIT NONE 
    3237   PRIVATE 
    3338 
    34    !! * Routine accessibility 
    35    PUBLIC lim_rhg  ! routine called by lim_dyn 
    36  
     39   PUBLIC   lim_rhg   ! routine called by lim_dyn (or lim_dyn_2) 
     40 
     41   REAL(wp) ::   rzero   = 0._wp   ! constant values 
     42   REAL(wp) ::   rone    = 1._wp   ! constant values 
     43       
    3744   !! * Substitutions 
    3845#  include "vectopt_loop_substitute.h90" 
    39  
    40    !! * Module variables 
    41    REAL(wp)  ::           &  ! constant values 
    42       rzero   = 0.e0   ,  & 
    43       rone    = 1.e0 
    4446   !!---------------------------------------------------------------------- 
    45    !!   LIM 3.0,  UCL-LOCEAN-IPSL (2008)  
     47   !! NEMO/LIM3 3.3 , UCL - NEMO Consortium (2010) 
    4648   !! $Id$ 
    47    !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 
     49   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
    4850   !!---------------------------------------------------------------------- 
    49  
    5051CONTAINS 
    5152 
    5253   SUBROUTINE lim_rhg( k_j1, k_jpj ) 
    53  
    5454      !!------------------------------------------------------------------- 
    5555      !!                 ***  SUBROUTINE lim_rhg  *** 
     
    9898      !!                 e.g. in the Canadian Archipelago 
    9999      !! 
    100       !! ** References : Hunke and Dukowicz, JPO97 
    101       !!                 Bouillon et al., 08, in prep (update this when 
    102       !!                 published) 
    103       !!                 Vancoppenolle et al., OM08 
     100      !! References : Hunke and Dukowicz, JPO97 
     101      !!              Bouillon et al., Ocean Modelling 2009 
     102      !!              Vancoppenolle et al., Ocean Modelling 2008 
     103      !!------------------------------------------------------------------- 
     104      INTEGER, INTENT(in) ::   k_j1    ! southern j-index for ice computation 
     105      INTEGER, INTENT(in) ::   k_jpj   ! northern j-index for ice computation 
    104106      !! 
    105       !!------------------------------------------------------------------- 
    106       ! * Arguments 
    107       ! 
    108       INTEGER, INTENT(in) :: & 
    109          k_j1 ,                      & !: southern j-index for ice computation 
    110          k_jpj                         !: northern j-index for ice computation 
    111  
    112       ! * Local variables 
    113       INTEGER ::   ji, jj              !: dummy loop indices 
    114  
    115       INTEGER  :: & 
    116          jter                          !: temporary integers 
    117  
     107      INTEGER ::   ji, jj   ! dummy loop indices 
     108      INTEGER ::   jter     ! local integers 
    118109      CHARACTER (len=50) ::   charout 
    119  
    120       REAL(wp) :: & 
    121          zt11, zt12, zt21, zt22,     & !: temporary scalars 
    122          ztagnx, ztagny,             & !: wind stress on U/V points                        
    123          delta                         ! 
    124  
    125       REAL(wp) :: & 
    126          za,                         & !: 
    127          zstms,                      & !: temporary scalar for ice strength 
    128          zsang,                      & !: temporary scalar for coriolis term 
    129          zmask                         !: mask for the computation of ice mass 
     110      REAL(wp) ::   zt11, zt12, zt21, zt22, ztagnx, ztagny, delta                         ! 
     111      REAL(wp) ::   za, zstms, zsang, zmask   ! local scalars 
    130112 
    131113      REAL(wp),DIMENSION(jpi,jpj) :: & 
     
    145127 
    146128      REAL(wp) :: & 
    147          dtevp,                      & !: time step for subcycling 
    148          dtotel,                     & !: 
    149          ecc2,                       & !: square of yield ellipse eccenticity 
    150          z0,                         & !: temporary scalar 
    151          zr,                         & !: temporary scalar 
    152          zcca, zccb,                 & !: temporary scalars 
    153          zu_ice2,                    & !:  
    154          zv_ice1,                    & !: 
    155          zddc, zdtc,                 & !: temporary array for delta on corners 
    156          zdst,                       & !: temporary array for delta on centre 
    157          zdsshx, zdsshy,             & !: term for the gradient of ocean surface 
    158          sigma1, sigma2                !: internal ice stress 
     129         dtevp,                      & ! time step for subcycling 
     130         dtotel,                     & ! 
     131         ecc2,                       & ! square of yield ellipse eccenticity 
     132         z0,                         & ! temporary scalar 
     133         zr,                         & ! temporary scalar 
     134         zcca, zccb,                 & ! temporary scalars 
     135         zu_ice2,                    & !  
     136         zv_ice1,                    & ! 
     137         zddc, zdtc,                 & ! temporary array for delta on corners 
     138         zdst,                       & ! temporary array for delta on centre 
     139         zdsshx, zdsshy,             & ! term for the gradient of ocean surface 
     140         sigma1, sigma2                ! internal ice stress 
     141 
     142      REAL(wp),DIMENSION(jpi,jpj) ::   zf1, zf2   ! arrays for internal stresses 
    159143 
    160144      REAL(wp),DIMENSION(jpi,jpj) :: & 
    161          zf1, zf2                      !: arrays for internal stresses 
    162  
    163       REAL(wp),DIMENSION(jpi,jpj) :: & 
    164          zdd, zdt,                   & !: Divergence and tension at centre of grid cells 
    165          zds,                        & !: Shear on northeast corner of grid cells 
    166          deltat,                     & !: Delta at centre of grid cells 
    167          deltac,                     & !: Delta on corners 
    168          zs1, zs2,                   & !: Diagonal stress tensor components zs1 and zs2  
    169          zs12                          !: Non-diagonal stress tensor component zs12 
     145         zdd, zdt,                   & ! Divergence and tension at centre of grid cells 
     146         zds,                        & ! Shear on northeast corner of grid cells 
     147         deltat,                     & ! Delta at centre of grid cells 
     148         deltac,                     & ! Delta on corners 
     149         zs1, zs2,                   & ! Diagonal stress tensor components zs1 and zs2  
     150         zs12                          ! Non-diagonal stress tensor component zs12 
    170151 
    171152      REAL(wp) :: & 
    172          zresm            ,          & !: Maximal error on ice velocity 
    173          zindb            ,          & !: ice (1) or not (0)       
    174          zdummy                        !: dummy argument 
    175  
    176       REAL(wp),DIMENSION(jpi,jpj) :: & 
    177          zu_ice           ,          & !: Ice velocity on previous time step 
    178          zv_ice           ,          & 
    179          zresr                         !: Local error on velocity 
    180  
     153         zresm            ,          & ! Maximal error on ice velocity 
     154         zindb            ,          & ! ice (1) or not (0)       
     155         zdummy                        ! dummy argument 
     156 
     157      REAL(wp),DIMENSION(jpi,jpj) ::   zu_ice, zv_ice, zresr   ! Local error on velocity 
     158      !!------------------------------------------------------------------- 
     159#if  defined key_lim2 && ! defined key_lim2_vp 
     160# if defined key_agrif 
     161     USE ice_2, vt_s => hsnm 
     162     USE ice_2, vt_i => hicm 
     163# else 
     164     vt_s => hsnm 
     165     vt_i => hicm 
     166# endif 
     167     at_i(:,:) = 1. - frld(:,:) 
     168#endif 
    181169      ! 
    182170      !------------------------------------------------------------------------------! 
     
    185173      ! 
    186174      ! Put every vector to 0 
    187       zpresh(:,:) = 0.0 ; zc1(:,:) = 0.0 
    188       zpreshc(:,:) = 0.0 
    189       u_ice2(:,:)  = 0.0 ; v_ice1(:,:)  = 0.0 
    190       zdd(:,:)     = 0.0 ; zdt(:,:)     = 0.0 ; zds(:,:)     = 0.0 
    191  
    192       ! Ice strength on T-points 
    193       CALL lim_itd_me_icestrength(ridge_scheme_swi) 
    194  
    195       ! Ice mass and temp variables 
    196 !CDIR NOVERRCHK 
    197       DO jj = k_j1 , k_jpj 
     175      zpresh (:,:) = 0._wp   ;   zc1   (:,:) = 0._wp 
     176      zpreshc(:,:) = 0._wp 
     177      u_ice2 (:,:) = 0._wp   ;   v_ice1(:,:) = 0._wp 
     178      zdd    (:,:) = 0._wp   ;   zdt   (:,:) = 0._wp   ;   zds(:,:) = 0._wp 
     179 
     180#if defined key_lim3 
     181      CALL lim_itd_me_icestrength( ridge_scheme_swi )      ! LIM-3: Ice strength on T-points 
     182#endif 
     183 
     184!CDIR NOVERRCHK 
     185      DO jj = k_j1 , k_jpj       ! Ice mass and temp variables 
    198186!CDIR NOVERRCHK 
    199187         DO ji = 1 , jpi 
    200188            zc1(ji,jj)    = tms(ji,jj) * ( rhosn * vt_s(ji,jj) + rhoic * vt_i(ji,jj) ) 
    201             zpresh(ji,jj) = tms(ji,jj) *  strength(ji,jj) / 2. 
     189#if defined key_lim3 
     190            zpresh(ji,jj) = tms(ji,jj) *  strength(ji,jj) * 0.5_wp 
     191#endif 
    202192            ! tmi = 1 where there is ice or on land 
    203             tmi(ji,jj)    = 1.0 - ( 1.0 - MAX( 0.0 , SIGN ( 1.0 , vt_i(ji,jj) - & 
    204                epsd ) ) ) * tms(ji,jj) 
     193            tmi(ji,jj)    = 1._wp - ( 1._wp - MAX( 0._wp , SIGN ( 1._wp , vt_i(ji,jj) - epsd ) ) ) * tms(ji,jj) 
    205194         END DO 
    206195      END DO 
     
    247236         DO ji = fs_2, fs_jpim1 
    248237 
    249             zt11 = tms(ji,jj)*e1t(ji,jj) 
    250             zt12 = tms(ji+1,jj)*e1t(ji+1,jj) 
    251             zt21 = tms(ji,jj)*e2t(ji,jj) 
    252             zt22 = tms(ji,jj+1)*e2t(ji,jj+1) 
     238            zt11 = tms(ji  ,jj) * e1t(ji  ,jj) 
     239            zt12 = tms(ji+1,jj) * e1t(ji+1,jj) 
     240            zt21 = tms(ji,jj  ) * e2t(ji,jj  ) 
     241            zt22 = tms(ji,jj+1) * e2t(ji,jj+1) 
    253242 
    254243            ! Leads area. 
    255             zfrld1(ji,jj) = ( zt12 * ( 1.0 - at_i(ji,jj) ) + & 
    256                &                        zt11 * ( 1.0 - at_i(ji+1,jj) ) ) / ( zt11 + zt12 + epsd ) 
    257             zfrld2(ji,jj) = ( zt22 * ( 1.0 - at_i(ji,jj) ) + & 
    258                &                        zt21 * ( 1.0 - at_i(ji,jj+1) ) ) / ( zt21 + zt22 + epsd ) 
     244            zfrld1(ji,jj) = ( zt12 * ( 1.0 - at_i(ji,jj) ) + zt11 * ( 1.0 - at_i(ji+1,jj) ) ) / ( zt11 + zt12 + epsd ) 
     245            zfrld2(ji,jj) = ( zt22 * ( 1.0 - at_i(ji,jj) ) + zt21 * ( 1.0 - at_i(ji,jj+1) ) ) / ( zt21 + zt22 + epsd ) 
    259246 
    260247            ! Mass, coriolis coeff. and currents 
    261248            zmass1(ji,jj) = ( zt12*zc1(ji,jj) + zt11*zc1(ji+1,jj) ) / (zt11+zt12+epsd) 
    262249            zmass2(ji,jj) = ( zt22*zc1(ji,jj) + zt21*zc1(ji,jj+1) ) / (zt21+zt22+epsd) 
    263             zcorl1(ji,jj) = zmass1(ji,jj) * ( e1t(ji+1,jj)*fcor(ji,jj) + & 
    264                e1t(ji,jj)*fcor(ji+1,jj) ) & 
    265                / (e1t(ji,jj) + e1t(ji+1,jj) + epsd ) 
    266             zcorl2(ji,jj) = zmass2(ji,jj) * ( e2t(ji,jj+1)*fcor(ji,jj) + & 
    267                e2t(ji,jj)*fcor(ji,jj+1) ) & 
    268                / ( e2t(ji,jj+1) + e2t(ji,jj) + epsd ) 
     250            zcorl1(ji,jj) = zmass1(ji,jj) * ( e1t(ji+1,jj)*fcor(ji,jj) + e1t(ji,jj)*fcor(ji+1,jj) )   & 
     251               &                          / ( e1t(ji,jj) + e1t(ji+1,jj) + epsd ) 
     252            zcorl2(ji,jj) = zmass2(ji,jj) * ( e2t(ji,jj+1)*fcor(ji,jj) + e2t(ji,jj)*fcor(ji,jj+1) )   & 
     253               &                          / ( e2t(ji,jj+1) + e2t(ji,jj) + epsd ) 
    269254            ! 
    270255            u_oce1(ji,jj)  = u_oce(ji,jj) 
     
    290275            ! include it later 
    291276 
    292             zdsshx =  (ssh_m(ji+1,jj) - ssh_m(ji,jj))/e1u(ji,jj) 
    293             zdsshy =  (ssh_m(ji,jj+1) - ssh_m(ji,jj))/e2v(ji,jj) 
     277            zdsshx =  ( ssh_m(ji+1,jj) - ssh_m(ji,jj) ) / e1u(ji,jj) 
     278            zdsshy =  ( ssh_m(ji,jj+1) - ssh_m(ji,jj) ) / e2v(ji,jj) 
    294279 
    295280            za1ct(ji,jj) = ztagnx - zmass1(ji,jj) * grav * zdsshx 
     
    306291      ! Time step for subcycling 
    307292      dtevp  = rdt_ice / nevp 
    308       dtotel = dtevp / ( 2.0 * telast ) 
     293      dtotel = dtevp / ( 2._wp * telast ) 
    309294 
    310295      !-ecc2: square of yield ellipse eccenticrity (reminder: must become a namelist parameter) 
    311       ecc2 = ecc*ecc 
     296      ecc2 = ecc * ecc 
    312297 
    313298      !-Initialise stress tensor  
    314       zs1(:,:)  = stress1_i(:,:)  
    315       zs2(:,:)  = stress2_i(:,:) 
     299      zs1 (:,:) = stress1_i (:,:)  
     300      zs2 (:,:) = stress2_i (:,:) 
    316301      zs12(:,:) = stress12_i(:,:) 
    317302 
    318       !----------------------! 
     303      !                                               !----------------------! 
    319304      DO jter = 1 , nevp                              !    loop over jter    ! 
    320          !----------------------!         
     305         !                                            !----------------------!         
    321306         DO jj = k_j1, k_jpj-1 
    322             zu_ice(:,jj) = u_ice(:,jj) ! velocity at previous time step 
     307            zu_ice(:,jj) = u_ice(:,jj)    ! velocity at previous time step 
    323308            zv_ice(:,jj) = v_ice(:,jj) 
    324309         END DO 
     
    385370            END DO 
    386371         END DO 
    387          CALL lbc_lnk( v_ice1(:,:), 'U', -1. ) 
    388          CALL lbc_lnk( u_ice2(:,:), 'V', -1. ) 
     372         CALL lbc_lnk( v_ice1, 'U', -1. )   ;   CALL lbc_lnk( u_ice2, 'V', -1. )      ! lateral boundary cond. 
    389373 
    390374!CDIR NOVERRCHK 
     
    394378 
    395379               !- Calculate Delta at centre of grid cells 
    396                zdst       = (  e2u( ji  , jj   ) * v_ice1(ji,jj)            & 
    397                   &          - e2u( ji-1, jj   ) * v_ice1(ji-1,jj)          & 
    398                   &          + e1v( ji  , jj   ) * u_ice2(ji,jj)            & 
    399                   &          - e1v( ji  , jj-1 ) * u_ice2(ji,jj-1)          & 
    400                   &          )                                              & 
     380               zdst       = (  e2u(ji  , jj) * v_ice1(ji  ,jj)          & 
     381                  &          - e2u(ji-1, jj) * v_ice1(ji-1,jj)          & 
     382                  &          + e1v(ji, jj  ) * u_ice2(ji,jj  )          & 
     383                  &          - e1v(ji, jj-1) * u_ice2(ji,jj-1)          & 
     384                  &          )                                          & 
    401385                  &         / area(ji,jj) 
    402386 
    403                delta = SQRT( zdd(ji,jj)*zdd(ji,jj) +                        &  
    404                   &                       ( zdt(ji,jj)*zdt(ji,jj) + zdst*zdst ) * usecc2 )   
    405                deltat(ji,jj) = MAX( SQRT(zdd(ji,jj)**2 +                    & 
    406                   (zdt(ji,jj)**2 + zdst**2)*usecc2), creepl ) 
     387               delta = SQRT( zdd(ji,jj)*zdd(ji,jj) + ( zdt(ji,jj)*zdt(ji,jj) + zdst*zdst ) * usecc2 )   
     388               deltat(ji,jj) = MAX( SQRT(zdd(ji,jj)**2 + (zdt(ji,jj)**2 + zdst**2)*usecc2), creepl ) 
    407389 
    408390               !-Calculate stress tensor components zs1 and zs2  
Note: See TracChangeset for help on using the changeset viewer.