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 2077 for branches/devmercator2010/NEMO/LIM_SRC_2/limmsh_2.F90 – NEMO

Ignore:
Timestamp:
2010-09-09T10:43:51+02:00 (14 years ago)
Author:
cbricaud
Message:

commit change from DEV_r1784_3DF

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/devmercator2010/NEMO/LIM_SRC_2/limmsh_2.F90

    r2076 r2077  
    4747      !!         original    : 01-04 (LIM) 
    4848      !!         addition    : 02-08 (C. Ethe, G. Madec) 
    49       !!         additions   : 2009-05 (addition of the lim2_evp case, G. Garric) 
    5049      !!---------------------------------------------------------------------  
    5150      !! * Local variables 
    5251      INTEGER :: ji, jj      ! dummy loop indices 
    5352 
    54       REAL(wp) ::         & 
    55          zusden              ! temporary scalars 
    56 #if defined key_lim2_vp 
    5753      REAL(wp), DIMENSION(jpi,jpj) ::  & 
    5854         zd2d1 , zd1d2       ! Derivative of zh2 (resp. zh1) in the x direction 
     
    6157         zh1p  , zh2p   , &  ! Idem zh1, zh2 for the bottom left corner of the grid 
    6258         zd2d1p, zd1d2p , &  ! Idem zd2d1, zd1d2 for the bottom left corner of the grid 
    63          zusden2             ! temporary scalars 
    64 #endif 
     59         zusden, zusden2     ! temporary scalars 
    6560      !!--------------------------------------------------------------------- 
    6661 
     
    117112      !------------------- 
    118113!!ibug ??? 
     114      akappa(:,:,:,:) = 0.e0 
    119115      wght(:,:,:,:) = 0.e0 
    120       tmu(:,:)      = 0.e0 
    121 #if defined key_lim2_vp  
    122       akappa(:,:,:,:)     = 0.e0 
    123116      alambd(:,:,:,:,:,:) = 0.e0 
    124 #else 
    125       tmv(:,:) = 0.e0 
    126       tmf(:,:) = 0.e0 
    127 #endif 
     117      tmu(:,:) = 0.e0 
    128118!!i 
    129119       
    130 #if defined key_lim2_vp 
     120       
    131121      ! metric coefficients for sea ice dynamic 
    132122      !---------------------------------------- 
     
    162152      CALL lbc_lnk( wght(:,:,2,1), 'I', 1. )      ! but it is never used 
    163153      CALL lbc_lnk( wght(:,:,2,2), 'I', 1. ) 
    164 #else 
    165       !                                                      ! weights (wght) 
    166       DO jj = 2, jpj-1 
    167          DO ji = 2, jpi-1 
    168             zusden = 1. / (  ( e1t(ji+1,jj) + e1t(ji,jj  ) )   & 
    169                &           * ( e2t(ji,jj+1) + e2t(ji  ,jj) ) )  
    170             wght(ji,jj,1,1) = zusden * e1t(ji+1,jj) * e2t(ji,jj+1) 
    171             wght(ji,jj,1,2) = zusden * e1t(ji+1,jj) * e2t(ji,jj  ) 
    172             wght(ji,jj,2,1) = zusden * e1t(ji  ,jj) * e2t(ji,jj+1) 
    173             wght(ji,jj,2,2) = zusden * e1t(ji  ,jj) * e2t(ji,jj  ) 
    174          END DO 
    175       END DO 
    176  
    177       !With EVP, the weights are calculated on 'F' points 
    178       CALL lbc_lnk( wght(:,:,1,1), 'F', 1. )      ! CAUTION: even with the lbc_lnk at ice U-V-point 
    179       CALL lbc_lnk( wght(:,:,1,2), 'F', 1. )      ! the value of wght at jpj is wrong 
    180       CALL lbc_lnk( wght(:,:,2,1), 'F', 1. )      ! but it is never used 
    181       CALL lbc_lnk( wght(:,:,2,2), 'F', 1. ) 
    182  
    183 #endif 
    184154     
    185155      ! Coefficients for divergence of the stress tensor 
    186156      !------------------------------------------------- 
    187157 
    188 #if defined key_lim2_vp 
    189158      DO jj = 2, jpj 
    190159         DO ji = 2, jpi   ! NO vector opt. 
     
    254223      CALL lbc_lnk( alambd(:,:,2,1,1,1), 'I', 1. )      ! 
    255224      CALL lbc_lnk( alambd(:,:,2,1,1,2), 'I', 1. )      ! 
    256 #endif 
    257225             
    258226 
     
    265233      tmu(:,1) = 0.e0 
    266234      tmu(1,:) = 0.e0 
    267  
    268 #if defined key_lim2_vp 
    269235      DO jj = 2, jpj               ! ice U.V-point: computed from ice T-point mask 
    270236         DO ji = 2, jpim1   ! NO vector opt. 
     
    275241      !--lateral boundary conditions     
    276242      CALL lbc_lnk( tmu(:,:), 'I', 1. ) 
    277 #else 
    278       tmv(:,1) = 0.e0 !SB 
    279       tmv(1,:) = 0.e0 !SB 
    280       tmf(1,:) = 0.e0 
    281       tmf(:,1) = 0.e0 
    282       DO jj = 1, jpj - 1 
    283          DO ji = 1 , jpi - 1 
    284             tmu(ji,jj) =  tms(ji,jj) * tms(ji+1,jj) 
    285             tmv(ji,jj) =  tms(ji,jj) * tms(ji,jj+1) 
    286             tmf(ji,jj) =  tms(ji,jj) * tms(ji+1,jj) * tms(ji,jj+1) * & 
    287                tms(ji+1,jj+1) 
    288          END DO 
    289       END DO 
    290  
    291       !--lateral boundary conditions 
    292       CALL lbc_lnk( tmu(:,:), 'U', 1. ) 
    293       CALL lbc_lnk( tmv(:,:), 'V', 1. ) 
    294       CALL lbc_lnk( tmf(:,:), 'F', 1. ) 
    295 #endif 
    296243       
    297244      ! unmasked and masked area of T-grid cell 
Note: See TracChangeset for help on using the changeset viewer.