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 3487 for branches/2012/dev_r3452_NOCL06_LOGLAYER/NEMOGCM – NEMO

Ignore:
Timestamp:
2012-10-03T18:48:01+02:00 (12 years ago)
Author:
hliu
Message:

Log Layer bottom friction option is added. The two relevant parameters to activate this option has been added in the AMM12 namelist file

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

Legend:

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

    r3309 r3487  
    475475   rn_bfri2    =    2.5e-3 !  bottom drag coefficient (non linear case) 
    476476   rn_bfeb2    =    0.0e0  !  bottom turbulent kinetic energy background  (m2/s2) 
     477   rn_bfrz0    =    0.003  !  bottom roughness (only effect when ln_loglayer = .true.) 
    477478   ln_bfr2d    = .false.   !  horizontal variation of the bottom friction coef (read a 2D mask file ) 
    478479   rn_bfrien   =    50.    !  local multiplying factor of bfr (ln_bfr2d=T) 
    479480   ln_bfrimp   = .true.    !  implicit bottom friction (requires ln_zdfexp = .false. if true) 
     481   ln_loglayer = .true.    !  loglayer bottom friction (only effect when nn_bfr = 2) 
    480482/ 
    481483!----------------------------------------------------------------------- 
  • branches/2012/dev_r3452_NOCL06_LOGLAYER/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfbfr.F90

    r3294 r3487  
    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 
     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   REAL(wp) ::   rn_bfrz0    = 0.003_wp    ! bottom roughness for loglayer bfr coeff 
     43   LOGICAL  ::   ln_bfr2d    = .false.     ! logical switch for 2D enhancement 
     44   LOGICAL  ::   ln_loglayer = .false.     ! switch for log layer bfr coeff. 
     45   LOGICAL , PUBLIC                            ::  ln_bfrimp   = .false.  ! switch for implicit bottom friction 
    4046   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::  bfrcoef2d            ! 2D bottom drag coefficient 
    4147 
     
    8288      INTEGER  ::   ikbu, ikbv   ! local integers 
    8389      REAL(wp) ::   zvu, zuv, zecu, zecv   ! temporary scalars 
     90      REAL(wp) ::   ztmp         ! temporary scalars 
    8491      !!---------------------------------------------------------------------- 
    8592      ! 
     
    9299         ! where -F_h/e3U_bot = bfrUa*Ub/e3U_bot {U=[u,v]} 
    93100         ! 
     101 
     102         IF(ln_loglayer) THEN       ! "log layer" bottom friction coefficient 
     103#  if defined key_vectopt_loop 
     104           DO jj = 1, 1 
     105             DO ji = 1, jpij   ! vector opt. (forced unrolling) 
     106#  else 
     107           DO jj = 1, jpj 
     108             DO ji = 1, jpi 
     109#  endif 
     110                ztmp = 0.5_wp * fse3t(ji,jj,mbkt(ji,jj)) 
     111                ztmp = max(ztmp, rn_bfrz0) 
     112                bfrcoef2d(ji,jj) = ( log( ztmp / rn_bfrz0 ) / vkarmn ) ** (-2) 
     113             END DO 
     114           END DO 
     115         ENDIF 
     116 
    94117# if defined key_vectopt_loop 
    95118         DO jj = 1, 1 
     
    117140            END DO 
    118141         END DO 
     142 
     143 
    119144         ! 
    120145         CALL lbc_lnk( bfrua, 'U', 1. )   ;   CALL lbc_lnk( bfrva, 'V', 1. )      ! Lateral boundary condition 
     
    141166      USE iom   ! I/O module for ehanced bottom friction file 
    142167      !! 
    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 
     168      INTEGER   ::   inum         ! logical unit for enhanced bottom friction file 
     169      INTEGER   ::   ji, jj       ! dummy loop indexes 
     170      INTEGER   ::   ikbu, ikbv   ! temporary integers 
     171      INTEGER   ::   ictu, ictv   !    -          - 
     172      REAL(wp)  ::   zminbfr, zmaxbfr   ! temporary scalars 
     173      REAL(wp)  ::   zfru, zfrv         !    -         - 
     174      !! 
     175      NAMELIST/nambfr/ nn_bfr, rn_bfri1, rn_bfri2, rn_bfeb2, rn_bfrz0, ln_bfr2d, & 
     176                    &  rn_bfrien, ln_bfrimp, ln_loglayer 
    151177      !!---------------------------------------------------------------------- 
    152178      ! 
     
    212238         ENDIF 
    213239         bfrcoef2d(:,:) = rn_bfri2  ! initialize bfrcoef2d to the namelist variable 
     240 
    214241         ! 
    215242         IF(ln_bfr2d) THEN  
Note: See TracChangeset for help on using the changeset viewer.