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 3633 for branches – NEMO

Changeset 3633 for branches


Ignore:
Timestamp:
2012-11-22T18:12:53+01:00 (11 years ago)
Author:
acc
Message:

Branch dev_NOC_2012_r3555. #1006. Step 10: merge in changes from the 2012/dev_r3452_NOCL06_LOGLAYER branch

Location:
branches/2012/dev_NOC_2012_rev3555/NEMOGCM
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2012/dev_NOC_2012_rev3555/NEMOGCM/CONFIG/AMM12/EXP00/namelist

    r3625 r3633  
    511511   rn_bfrien   =    50.    !  local multiplying factor of bfr (ln_bfr2d=T) 
    512512   ln_bfrimp   = .true.    !  implicit bottom friction (requires ln_zdfexp = .false. if true) 
     513   ln_loglayer = .false.   !  loglayer bottom friction (only effect when nn_bfr = 2) 
     514   rn_bfrz0    =    0.003  !  bottom roughness (only effect when ln_loglayer = .true.) 
    513515/ 
    514516!----------------------------------------------------------------------- 
  • branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfbfr.F90

    r3294 r3633  
    88   !!            3.2  ! 2009-09  (A.C.Coward)  Correction to include barotropic contribution 
    99   !!            3.3  ! 2010-10  (C. Ethe, G. Madec) reorganisation of initialisation phase 
     10   !!            3.4  ! 2011-11  (H. Liu) implementation of semi-implicit bottom friction option 
     11   !!                 ! 2012-06  (H. Liu) implementation of Log Layer bottom friction option 
    1012   !!---------------------------------------------------------------------- 
    1113 
     
    2426   USE timing          ! Timing 
    2527 
     28   USE phycst, ONLY: vkarmn 
     29 
    2630   IMPLICIT NONE 
    2731   PRIVATE 
     
    3135 
    3236   !                                    !!* Namelist nambfr: bottom friction namelist * 
    33    INTEGER  ::   nn_bfr    = 0           ! = 0/1/2/3 type of bottom friction  
    34    REAL(wp) ::   rn_bfri1  = 4.0e-4_wp   ! bottom drag coefficient (linear case)  
    35    REAL(wp) ::   rn_bfri2  = 1.0e-3_wp   ! bottom drag coefficient (non linear case) 
    36    REAL(wp) ::   rn_bfeb2  = 2.5e-3_wp   ! background bottom turbulent kinetic energy  [m2/s2] 
    37    REAL(wp) ::   rn_bfrien = 30._wp      ! local factor to enhance coefficient bfri 
    38    LOGICAL  ::   ln_bfr2d  = .false.     ! logical switch for 2D enhancement 
    39    LOGICAL , PUBLIC                            ::  ln_bfrimp = .false.  ! logical switch for implicit bottom friction 
    40    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::  bfrcoef2d            ! 2D bottom drag coefficient 
     37   INTEGER  ::   nn_bfr      = 0           ! = 0/1/2/3 type of bottom friction  
     38   REAL(wp) ::   rn_bfri1    = 4.0e-4_wp   ! bottom drag coefficient (linear case)  
     39   REAL(wp) ::   rn_bfri2    = 1.0e-3_wp   ! bottom drag coefficient (non linear case) 
     40   REAL(wp) ::   rn_bfeb2    = 2.5e-3_wp   ! background bottom turbulent kinetic energy  [m2/s2] 
     41   REAL(wp) ::   rn_bfrien   = 30._wp      ! local factor to enhance coefficient bfri 
     42   LOGICAL  ::   ln_bfr2d    = .false.     ! logical switch for 2D enhancement 
     43   LOGICAL  ::   ln_loglayer = .false.     ! switch for log layer bfr coeff. 
     44   REAL(wp) ::   rn_bfrz0    = 0.003_wp    ! bottom roughness for loglayer bfr coeff 
     45   LOGICAL , PUBLIC                            ::  ln_bfrimp   = .false.  ! switch for implicit bottom friction 
     46   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::  bfrcoef2d              ! 2D bottom drag coefficient 
    4147 
    4248   !! * Substitutions 
     
    7985      INTEGER, INTENT( in ) ::   kt   ! ocean time-step index 
    8086      !! 
    81       INTEGER  ::   ji, jj       ! dummy loop indices 
    82       INTEGER  ::   ikbu, ikbv   ! local integers 
    83       REAL(wp) ::   zvu, zuv, zecu, zecv   ! temporary scalars 
     87      INTEGER  ::   ji, jj                       ! dummy loop indices 
     88      INTEGER  ::   ikbu, ikbv                   ! local integers 
     89      REAL(wp) ::   zvu, zuv, zecu, zecv, ztmp   ! temporary scalars 
    8490      !!---------------------------------------------------------------------- 
    8591      ! 
     
    9298         ! where -F_h/e3U_bot = bfrUa*Ub/e3U_bot {U=[u,v]} 
    9399         ! 
     100 
     101         IF(ln_loglayer) THEN       ! "log layer" bottom friction coefficient 
     102#  if defined key_vectopt_loop 
     103           DO jj = 1, 1 
     104             DO ji = 1, jpij   ! vector opt. (forced unrolling) 
     105#  else 
     106           DO jj = 1, jpj 
     107             DO ji = 1, jpi 
     108#  endif 
     109                ztmp = 0.5_wp * fse3t(ji,jj,mbkt(ji,jj)) 
     110                ztmp = max(ztmp, rn_bfrz0) 
     111                bfrcoef2d(ji,jj) = ( log( ztmp / rn_bfrz0 ) / vkarmn ) ** (-2) 
     112             END DO 
     113           END DO 
     114         ENDIF 
     115 
    94116# if defined key_vectopt_loop 
    95117         DO jj = 1, 1 
     
    117139            END DO 
    118140         END DO 
     141 
    119142         ! 
    120143         CALL lbc_lnk( bfrua, 'U', 1. )   ;   CALL lbc_lnk( bfrva, 'V', 1. )      ! Lateral boundary condition 
     
    141164      USE iom   ! I/O module for ehanced bottom friction file 
    142165      !! 
    143       INTEGER ::   inum         ! logical unit for enhanced bottom friction file 
    144       INTEGER ::   ji, jj       ! dummy loop indexes 
    145       INTEGER ::   ikbu, ikbv   ! temporary integers 
    146       INTEGER ::   ictu, ictv   !    -          - 
    147       REAL(wp) ::  zminbfr, zmaxbfr   ! temporary scalars 
    148       REAL(wp) ::  zfru, zfrv         !    -         - 
    149       !! 
    150       NAMELIST/nambfr/ nn_bfr, rn_bfri1, rn_bfri2, rn_bfeb2, ln_bfr2d, rn_bfrien, ln_bfrimp 
     166      INTEGER   ::   inum         ! logical unit for enhanced bottom friction file 
     167      INTEGER   ::   ji, jj       ! dummy loop indexes 
     168      INTEGER   ::   ikbu, ikbv   ! temporary integers 
     169      INTEGER   ::   ictu, ictv   !    -          - 
     170      REAL(wp)  ::   zminbfr, zmaxbfr   ! temporary scalars 
     171      REAL(wp)  ::   zfru, zfrv         !    -         - 
     172      !! 
     173      NAMELIST/nambfr/ nn_bfr, rn_bfri1, rn_bfri2, rn_bfeb2, rn_bfrz0, ln_bfr2d, & 
     174                    &  rn_bfrien, ln_bfrimp, ln_loglayer 
    151175      !!---------------------------------------------------------------------- 
    152176      ! 
     
    212236         ENDIF 
    213237         bfrcoef2d(:,:) = rn_bfri2  ! initialize bfrcoef2d to the namelist variable 
     238 
    214239         ! 
    215240         IF(ln_bfr2d) THEN  
Note: See TracChangeset for help on using the changeset viewer.