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 3764 for branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/OPA_SRC/ZDF – NEMO

Ignore:
Timestamp:
2013-01-23T15:33:04+01:00 (11 years ago)
Author:
smasson
Message:

dev_MERGE_2012: report bugfixes done in the trunk from r3555 to r3763 into dev_MERGE_2012

Location:
branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/OPA_SRC/ZDF
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfbfr.F90

    r3633 r3764  
    1818   !!---------------------------------------------------------------------- 
    1919   USE oce             ! ocean dynamics and tracers variables 
    20    USE dom_oce         ! ocean space and time domain variables  
     20   USE dom_oce         ! ocean space and time domain variables 
    2121   USE zdf_oce         ! ocean vertical physics variables 
    2222   USE in_out_manager  ! I/O manager 
     
    3535 
    3636   !                                    !!* Namelist nambfr: bottom friction namelist * 
    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 
     37   INTEGER , PUBLIC ::   nn_bfr      = 0           ! = 0/1/2/3 type of bottom friction  (PUBLIC for TAM) 
     38   REAL(wp), PUBLIC ::   rn_bfri1    = 4.0e-4_wp   ! bottom drag coefficient (linear case)  (PUBLIC for TAM) 
     39   REAL(wp), PUBLIC ::   rn_bfri2    = 1.0e-3_wp   ! bottom drag coefficient (non linear case) (PUBLIC for TAM) 
     40   REAL(wp), PUBLIC ::   rn_bfeb2    = 2.5e-3_wp   ! background bottom turbulent kinetic energy  [m2/s2] (PUBLIC for TAM) 
     41   REAL(wp), PUBLIC ::   rn_bfrien   = 30._wp      ! local factor to enhance coefficient bfri (PUBLIC for TAM) 
     42   LOGICAL , PUBLIC ::   ln_bfr2d    = .false.     ! logical switch for 2D enhancement (PUBLIC for TAM) 
     43   LOGICAL , PUBLIC ::   ln_loglayer = .false.     ! switch for log layer bfr coeff. (PUBLIC for TAM) 
     44   REAL(wp), PUBLIC ::   rn_bfrz0    = 0.003_wp    ! bottom roughness for loglayer bfr coeff (PUBLIC for TAM) 
     45   LOGICAL , PUBLIC                                    ::  ln_bfrimp = .false.  ! logical switch for implicit bottom friction 
     46   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:), PUBLIC ::  bfrcoef2d            ! 2D bottom drag coefficient (PUBLIC for TAM) 
    4747 
    4848   !! * Substitutions 
     
    7070      !!---------------------------------------------------------------------- 
    7171      !!                   ***  ROUTINE zdf_bfr  *** 
    72       !!                  
     72      !! 
    7373      !! ** Purpose :   compute the bottom friction coefficient. 
    7474      !! 
    75       !! ** Method  :   Calculate and store part of the momentum trend due     
    76       !!              to bottom friction following the chosen friction type  
     75      !! ** Method  :   Calculate and store part of the momentum trend due 
     76      !!              to bottom friction following the chosen friction type 
    7777      !!              (free-slip, linear, or quadratic). The component 
    7878      !!              calculated here is multiplied by the bottom velocity in 
     
    124124            DO ji = 2, jpim1 
    125125# endif 
    126                ikbu = mbku(ji,jj)         ! ocean bottom level at u- and v-points  
     126               ikbu = mbku(ji,jj)         ! ocean bottom level at u- and v-points 
    127127               ikbv = mbkv(ji,jj)         ! (deepest ocean u- and v-points) 
    128128               ! 
     
    135135               zecv = SQRT(  vn(ji,jj,ikbv) * vn(ji,jj,ikbv) + zuv*zuv + rn_bfeb2  ) 
    136136               ! 
    137                bfrua(ji,jj) = - 0.5_wp * ( bfrcoef2d(ji,jj) + bfrcoef2d(ji+1,jj  ) ) * zecu  
     137               bfrua(ji,jj) = - 0.5_wp * ( bfrcoef2d(ji,jj) + bfrcoef2d(ji+1,jj  ) ) * zecu 
    138138               bfrva(ji,jj) = - 0.5_wp * ( bfrcoef2d(ji,jj) + bfrcoef2d(ji  ,jj+1) ) * zecv 
    139139            END DO 
     
    156156      !!---------------------------------------------------------------------- 
    157157      !!                  ***  ROUTINE zdf_bfr_init  *** 
    158       !!                     
     158      !! 
    159159      !! ** Purpose :   Initialization of the bottom friction 
    160160      !! 
     
    217217         bfrcoef2d(:,:) = rn_bfri1  ! initialize bfrcoef2d to the namelist variable 
    218218         ! 
    219          IF(ln_bfr2d) THEN  
     219         IF(ln_bfr2d) THEN 
    220220            ! bfr_coef is a coefficient in [0,1] giving the mask where to apply the bfr enhancement 
    221221            CALL iom_open('bfr_coef.nc',inum) 
     
    238238 
    239239         ! 
    240          IF(ln_bfr2d) THEN  
     240         IF(ln_bfr2d) THEN 
    241241            ! bfr_coef is a coefficient in [0,1] giving the mask where to apply the bfr enhancement 
    242242            CALL iom_open('bfr_coef.nc',inum) 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfkpp.F90

    r3625 r3764  
    247247#if defined key_zdfddm 
    248248      REAL(wp) ::   zrrau, zds, zavdds, zavddt,zinr   ! double diffusion mixing 
    249       REAL(wp), POINTER, DIMENSION(:,:) ::     zdifs 
    250       REAL(wp), POINTER, DIMENSION(:)   ::   za2s, za3s, zkmps 
     249      REAL(wp), POINTER, DIMENSION(:,:)   ::     zdifs 
     250      REAL(wp), POINTER, DIMENSION(:)     ::   za2s, za3s, zkmps 
    251251      REAL(wp) ::                            zkm1s 
    252       REAL(wp), POINTER, DIMENSION(:,:) ::   zblcs 
     252      REAL(wp), POINTER, DIMENSION(:,:)   ::   zblcs 
    253253      REAL(wp), POINTER, DIMENSION(:,:,:) ::   zdiffus 
    254254#endif 
     
    266266      CALL wrk_alloc( jpi,4, zdepw, zdift, zvisc ) 
    267267      CALL wrk_alloc( jpi,jpj, zBo, zBosol, zustar ) 
    268       CALL wrk_alloc( jpi,jpk, zmask, zblcm, zblct, zblcs ) 
     268      CALL wrk_alloc( jpi,jpk, zmask, zblcm, zblct ) 
    269269#if defined key_zdfddm 
    270270      CALL wrk_alloc( jpi,4, zdifs ) 
     
    10811081               zdiffut(ji,jj,jk) = zdiffut(ji,jj,jk) * tmask(ji,jj,jk)  
    10821082#if defined key_zdfddm 
    1083                zdiffus(ji,jj,jk) = ( 1.0 - zmask(ji,jk) )          * avs (ji,jj,jk) & ! interior diffusivities  
     1083               zdiffus(ji,jj,jk) = ( 1.0 - zmask(ji,jk) )         * avs (ji,jj,jk) & ! interior diffusivities  
    10841084                  &              +                        zflag   * zblcs(ji,jk   ) & ! boundary layer diffusivities 
    10851085                  &              + zmask(ji,jk) * ( 1.0 - zflag ) * zkmps(ji      )   ! diffusivity enhancement at W_level near zhbl 
    1086                         
    10871086               zdiffus(ji,jj,jk) = zdiffus(ji,jj,jk) * tmask(ji,jj,jk)  
    10881087#endif                
     
    12121211      CALL wrk_dealloc( jpi,4, zdepw, zdift, zvisc ) 
    12131212      CALL wrk_dealloc( jpi,jpj, zBo, zBosol, zustar ) 
    1214       CALL wrk_dealloc( jpi,jpk, zmask, zblcm, zblct, zblcs ) 
     1213      CALL wrk_dealloc( jpi,jpk, zmask, zblcm, zblct ) 
    12151214#if defined key_zdfddm 
    12161215      CALL wrk_dealloc( jpi,4, zdifs ) 
Note: See TracChangeset for help on using the changeset viewer.