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 3789 for branches/2012 – NEMO

Changeset 3789 for branches/2012


Ignore:
Timestamp:
2013-02-10T14:11:44+01:00 (11 years ago)
Author:
gm
Message:

dev_v3_4_STABLE_2012: #1041 : corrected diagnostic for the ice shear rate

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2012/dev_v3_4_STABLE_2012/NEMOGCM/NEMO/LIM_SRC_3/limrhg.F90

    r3558 r3789  
    88   !!             -   !  2008-11  (M. Vancoppenolle, S. Bouillon, Y. Aksenov) add surface tilt in ice rheolohy  
    99   !!            3.3  !  2009-05  (G.Garric) addition of the lim2_evp cas 
    10    !!            4.0  !  2011-01  (A Porter)  dynamical allocation  
     10   !!            3.4  !  2011-01  (A Porter)  dynamical allocation  
    1111   !!---------------------------------------------------------------------- 
    1212#if defined key_lim3 || (  defined key_lim2 && ! defined key_lim2_vp ) 
     
    4848#  include "vectopt_loop_substitute.h90" 
    4949   !!---------------------------------------------------------------------- 
    50    !! NEMO/LIM3 4.0 , UCL - NEMO Consortium (2011) 
     50   !! NEMO/LIM3 3.4 , UCL - NEMO Consortium (2011) 
    5151   !! $Id$ 
    5252   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
     
    118118      REAL(wp) ::   z0, zr, zcca, zccb ! temporary scalars 
    119119      REAL(wp) ::   zu_ice2, zv_ice1   ! 
    120       REAL(wp) ::   zddc, zdtc, zdst   ! delta on corners and on centre 
     120      REAL(wp) ::   zddc, zdtc, zzdst   ! delta on corners and on centre 
    121121      REAL(wp) ::   zdsshx, zdsshy     ! term for the gradient of ocean surface 
    122122      REAL(wp) ::   sigma1, sigma2     ! internal ice stress 
     
    141141      REAL(wp), POINTER, DIMENSION(:,:) ::   zdd   , zdt      ! Divergence and tension at centre of grid cells 
    142142      REAL(wp), POINTER, DIMENSION(:,:) ::   zds              ! Shear on northeast corner of grid cells 
     143      REAL(wp), POINTER, DIMENSION(:,:) ::   zdst             ! Shear on centre of grid cells 
    143144      REAL(wp), POINTER, DIMENSION(:,:) ::   deltat, deltac   ! Delta at centre and corners of grid cells 
    144145      REAL(wp), POINTER, DIMENSION(:,:) ::   zs1   , zs2      ! Diagonal stress tensor components zs1 and zs2  
    145146      REAL(wp), POINTER, DIMENSION(:,:) ::   zs12             ! Non-diagonal stress tensor component zs12 
    146147      REAL(wp), POINTER, DIMENSION(:,:) ::   zu_ice, zv_ice, zresr   ! Local error on velocity 
    147        
    148148      !!------------------------------------------------------------------- 
    149149 
    150150      CALL wrk_alloc( jpi,jpj, zpresh, zfrld1, zmass1, zcorl1, za1ct , zpreshc, zfrld2, zmass2, zcorl2, za2ct ) 
    151151      CALL wrk_alloc( jpi,jpj, zc1   , u_oce1, u_oce2, u_ice2, zusw  , v_oce1 , v_oce2, v_ice1                ) 
    152       CALL wrk_alloc( jpi,jpj, zf1   , deltat, zu_ice, zf2   , deltac, zv_ice , zdd   , zdt    , zds          ) 
     152      CALL wrk_alloc( jpi,jpj, zf1   , deltat, zu_ice, zf2   , deltac, zv_ice , zdd   , zdt    , zds  , zdst  ) 
    153153      CALL wrk_alloc( jpi,jpj, zdd   , zdt   , zds   , zs1   , zs2   , zs12   , zresr                         ) 
    154154 
     
    377377 
    378378               !- Calculate Delta at centre of grid cells 
    379                zdst       = (  e2u(ji  , jj) * v_ice1(ji  ,jj)          & 
     379               zzdst      = (  e2u(ji  , jj) * v_ice1(ji  ,jj)          & 
    380380                  &          - e2u(ji-1, jj) * v_ice1(ji-1,jj)          & 
    381381                  &          + e1v(ji, jj  ) * u_ice2(ji,jj  )          & 
     
    384384                  &         / area(ji,jj) 
    385385 
    386                delta = SQRT( zdd(ji,jj)*zdd(ji,jj) + ( zdt(ji,jj)*zdt(ji,jj) + zdst*zdst ) * usecc2 )   
    387                deltat(ji,jj) = MAX( SQRT(zdd(ji,jj)**2 + (zdt(ji,jj)**2 + zdst**2)*usecc2), creepl ) 
     386               delta = SQRT( zdd(ji,jj)*zdd(ji,jj) + ( zdt(ji,jj)*zdt(ji,jj) + zzdst*zzdst ) * usecc2 )   
     387               deltat(ji,jj) = MAX( SQRT(zdd(ji,jj)**2 + (zdt(ji,jj)**2 + zzdst**2)*usecc2), creepl ) 
     388!!gm faster to replace the line above with simply: 
     389!!                deltat(ji,jj) = MAX( delta, creepl ) 
     390!!gm end  
    388391 
    389392               !-Calculate stress tensor components zs1 and zs2  
     
    667670                  &        * tmi(ji+1,jj) * tmi(ji+1,jj+1) 
    668671 
    669                zdst       = (  e2u( ji  , jj   ) * v_ice1(ji,jj)          & 
    670                   &          - e2u( ji-1, jj   ) * v_ice1(ji-1,jj)         & 
    671                   &          + e1v( ji  , jj   ) * u_ice2(ji,jj)           & 
    672                   &          - e1v( ji  , jj-1 ) * u_ice2(ji,jj-1)         &  
    673                   &          )                                             & 
    674                   &         / area(ji,jj) 
    675  
    676                deltat(ji,jj) = SQRT( zdd(ji,jj)*zdd(ji,jj) + &  
    677                   &                          ( zdt(ji,jj)*zdt(ji,jj) + zdst*zdst ) * usecc2 &  
     672               zdst(ji,jj) = (  e2u( ji  , jj   ) * v_ice1(ji  ,jj  )    & 
     673                  &           - e2u( ji-1, jj   ) * v_ice1(ji-1,jj  )    & 
     674                  &           + e1v( ji  , jj   ) * u_ice2(ji  ,jj  )    & 
     675                  &           - e1v( ji  , jj-1 ) * u_ice2(ji  ,jj-1)  ) / area(ji,jj) 
     676 
     677               deltat(ji,jj) = SQRT(    zdd(ji,jj)*zdd(ji,jj)   &  
     678                  &                 + ( zdt(ji,jj)*zdt(ji,jj) + zdst(ji,jj)*zdst(ji,jj) ) * usecc2 &  
    678679                  &                          ) + creepl 
    679680 
     
    688689      ! 
    689690      ! * Invariants of the stress tensor are required for limitd_me 
    690       ! accelerates convergence and improves stability 
     691      !   (accelerates convergence and improves stability) 
    691692      DO jj = k_j1+1, k_jpj-1 
    692693         DO ji = fs_2, fs_jpim1 
    693694            divu_i (ji,jj) = zdd   (ji,jj) 
    694695            delta_i(ji,jj) = deltat(ji,jj) 
    695             shear_i(ji,jj) = zds   (ji,jj) 
     696            shear_i(ji,jj) = SQRT( zdt(ji,jj) * zdt(ji,jj) + zdst(ji,jj) * zdst(ji,jj) ) 
    696697         END DO 
    697698      END DO 
    698  
    699       ! Lateral boundary condition 
    700       CALL lbc_lnk( divu_i (:,:), 'T', 1. ) 
     699      CALL lbc_lnk( divu_i (:,:), 'T', 1. )      ! Lateral boundary condition 
    701700      CALL lbc_lnk( delta_i(:,:), 'T', 1. ) 
    702       CALL lbc_lnk( shear_i(:,:), 'F', 1. ) 
     701      CALL lbc_lnk( shear_i(:,:), 'T', 1. ) 
    703702 
    704703      ! * Store the stress tensor for the next time step 
     
    746745      CALL wrk_dealloc( jpi,jpj, zpresh, zfrld1, zmass1, zcorl1, za1ct , zpreshc, zfrld2, zmass2, zcorl2, za2ct ) 
    747746      CALL wrk_dealloc( jpi,jpj, zc1   , u_oce1, u_oce2, u_ice2, zusw  , v_oce1 , v_oce2, v_ice1                ) 
    748       CALL wrk_dealloc( jpi,jpj, zf1   , deltat, zu_ice, zf2   , deltac, zv_ice , zdd   , zdt    , zds          ) 
     747      CALL wrk_dealloc( jpi,jpj, zf1   , deltat, zu_ice, zf2   , deltac, zv_ice , zdd   , zdt    , zds  , zdst  ) 
    749748      CALL wrk_dealloc( jpi,jpj, zdd   , zdt   , zds   , zs1   , zs2   , zs12   , zresr                         ) 
    750749 
Note: See TracChangeset for help on using the changeset viewer.