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 13191 for branches/UKMO/dev_1d_bugfixes_tocommit/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfevd.F90 – NEMO

Ignore:
Timestamp:
2020-07-01T15:01:22+02:00 (4 years ago)
Author:
jwhile
Message:

Updates for 1d runnig

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_1d_bugfixes_tocommit/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfevd.F90

    r11442 r13191  
    2020   USE zdfkpp          ! KPP vertical mixing 
    2121   USE trd_oce         ! trends: ocean variables 
    22    USE trdtra          ! trends manager: tracers  
     22   USE trdtra          ! trends manager: tracers 
    2323   USE in_out_manager  ! I/O manager 
    2424   USE iom             ! for iom_put 
    2525   USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
    2626   USE timing          ! Timing 
    27    USE stopack          
     27   USE stopack 
    2828 
    2929   IMPLICIT NONE 
     
    4545      !!---------------------------------------------------------------------- 
    4646      !!                  ***  ROUTINE zdf_evd  *** 
    47       !!                    
     47      !! 
    4848      !! ** Purpose :   Local increased the vertical eddy viscosity and diffu- 
    4949      !!      sivity coefficients when a static instability is encountered. 
    5050      !! 
    5151      !! ** Method  :   avt, avm, and the 4 neighbouring avmu, avmv coefficients 
    52       !!      are set to avevd (namelist parameter) if the water column is  
     52      !!      are set to avevd (namelist parameter) if the water column is 
    5353      !!      statically unstable (i.e. if rn2 < -1.e-12 ) 
    5454      !! 
     
    7777      zavt_evd(:,:,:) = avt(:,:,:)           ! set avt prior to evd application 
    7878 
     79#if defined key_traldf_c2d || key_traldf_c3d 
    7980      IF( ln_stopack .AND. ( nn_spp_aevd > 0 ) ) THEN 
    8081         rn_avevd0(:,:) = rn_avevd 
    8182         CALL spp_gen(kt, rn_avevd0, nn_spp_aevd, rn_aevd_sd, jk_spp_aevd) 
    8283      ENDIF 
     84#else 
     85      IF ( ln_stopack .AND. ( nn_spp_aevd > 0 ) ) & 
     86         & CALL ctl_stop( 'zdf_evd: parameter perturbation will only work with '// & 
     87                          'key_traldf_c2d or key_traldf_c3d') 
     88#endif 
    8389 
    8490      SELECT CASE ( nn_evdm ) 
     
    8894         zavm_evd(:,:,:) = avm(:,:,:)           ! set avm prior to evd application 
    8995         ! 
    90          DO jk = 1, jpkm1  
     96         DO jk = 1, jpkm1 
    9197            DO jj = 2, jpj             ! no vector opt. 
    9298               DO ji = 2, jpi 
     
    106112               END DO 
    107113            END DO 
    108          END DO  
     114         END DO 
    109115         CALL lbc_lnk( avt , 'W', 1. )   ;   CALL lbc_lnk( avm , 'W', 1. )   ! Lateral boundary conditions 
    110116         CALL lbc_lnk( avmu, 'U', 1. )   ;   CALL lbc_lnk( avmv, 'V', 1. ) 
     
    113119         CALL iom_put( "avm_evd", zavm_evd )              ! output this change 
    114120         ! 
    115       CASE DEFAULT         ! enhance vertical eddy diffusivity only (if rn2<-1.e-12)  
     121      CASE DEFAULT         ! enhance vertical eddy diffusivity only (if rn2<-1.e-12) 
    116122         DO jk = 1, jpkm1 
    117 !!!         WHERE( rn2(:,:,jk) <= -1.e-12 ) avt(:,:,jk) = tmask(:,:,jk) * avevd   ! agissant sur T SEUL!  
     123!!!         WHERE( rn2(:,:,jk) <= -1.e-12 ) avt(:,:,jk) = tmask(:,:,jk) * avevd   ! agissant sur T SEUL! 
    118124            DO jj = 1, jpj             ! loop over the whole domain (no lbc_lnk call) 
    119125               DO ji = 1, jpi 
    120126#if defined key_zdfkpp 
    121127                  ! no evd mixing in the boundary layer with KPP 
    122                   IF(  MIN( rn2(ji,jj,jk), rn2b(ji,jj,jk) ) <= -1.e-12  .AND.  fsdepw(ji,jj,jk) > hkpp(ji,jj)  )   &           
     128                  IF(  MIN( rn2(ji,jj,jk), rn2b(ji,jj,jk) ) <= -1.e-12  .AND.  fsdepw(ji,jj,jk) > hkpp(ji,jj)  )   & 
    123129#else 
    124130                  IF(  MIN( rn2(ji,jj,jk), rn2b(ji,jj,jk) ) <= -1.e-12 )   & 
     
    129135         END DO 
    130136         ! 
    131       END SELECT  
     137      END SELECT 
    132138 
    133139      zavt_evd(:,:,:) = avt(:,:,:) - zavt_evd(:,:,:)   ! change in avt due to evd 
Note: See TracChangeset for help on using the changeset viewer.