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

Ignore:
Timestamp:
2010-09-08T18:17:25+02:00 (14 years ago)
Author:
cbricaud
Message:

add change dev_1784_EVP

File:
1 edited

Legend:

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

    r2072 r2076  
    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) 
    4950      !!---------------------------------------------------------------------  
    5051      !! * Local variables 
    5152      INTEGER :: ji, jj      ! dummy loop indices 
    5253 
     54      REAL(wp) ::         & 
     55         zusden              ! temporary scalars 
     56#if defined key_lim2_vp 
    5357      REAL(wp), DIMENSION(jpi,jpj) ::  & 
    5458         zd2d1 , zd1d2       ! Derivative of zh2 (resp. zh1) in the x direction 
     
    5761         zh1p  , zh2p   , &  ! Idem zh1, zh2 for the bottom left corner of the grid 
    5862         zd2d1p, zd1d2p , &  ! Idem zd2d1, zd1d2 for the bottom left corner of the grid 
    59          zusden, zusden2     ! temporary scalars 
     63         zusden2             ! temporary scalars 
     64#endif 
    6065      !!--------------------------------------------------------------------- 
    6166 
     
    112117      !------------------- 
    113118!!ibug ??? 
    114       akappa(:,:,:,:) = 0.e0 
    115119      wght(:,:,:,:) = 0.e0 
     120      tmu(:,:)      = 0.e0 
     121#if defined key_lim2_vp  
     122      akappa(:,:,:,:)     = 0.e0 
    116123      alambd(:,:,:,:,:,:) = 0.e0 
    117       tmu(:,:) = 0.e0 
     124#else 
     125      tmv(:,:) = 0.e0 
     126      tmf(:,:) = 0.e0 
     127#endif 
    118128!!i 
    119129       
    120        
     130#if defined key_lim2_vp 
    121131      ! metric coefficients for sea ice dynamic 
    122132      !---------------------------------------- 
     
    152162      CALL lbc_lnk( wght(:,:,2,1), 'I', 1. )      ! but it is never used 
    153163      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 
    154184     
    155185      ! Coefficients for divergence of the stress tensor 
    156186      !------------------------------------------------- 
    157187 
     188#if defined key_lim2_vp 
    158189      DO jj = 2, jpj 
    159190         DO ji = 2, jpi   ! NO vector opt. 
     
    223254      CALL lbc_lnk( alambd(:,:,2,1,1,1), 'I', 1. )      ! 
    224255      CALL lbc_lnk( alambd(:,:,2,1,1,2), 'I', 1. )      ! 
     256#endif 
    225257             
    226258 
     
    233265      tmu(:,1) = 0.e0 
    234266      tmu(1,:) = 0.e0 
     267 
     268#if defined key_lim2_vp 
    235269      DO jj = 2, jpj               ! ice U.V-point: computed from ice T-point mask 
    236270         DO ji = 2, jpim1   ! NO vector opt. 
     
    241275      !--lateral boundary conditions     
    242276      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 
    243296       
    244297      ! unmasked and masked area of T-grid cell 
Note: See TracChangeset for help on using the changeset viewer.