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

Ignore:
Timestamp:
2015-12-08T12:39:53+01:00 (8 years ago)
Author:
timgraham
Message:

Merged with head of trunk

File:
1 edited

Legend:

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

    r6019 r6020  
    77   !! History :  OPA  !  1997-06  (G. Madec, A. Lazar)  Original code 
    88   !!   NEMO     1.0  !  2002-06  (G. Madec)  F90: Free form and module 
    9    !!             -   !  2005-06  (C. Ethe) KPP parameterization 
    109   !!            3.2  !  2009-03  (M. Leclair, G. Madec, R. Benshila) test on both before & after 
    1110   !!---------------------------------------------------------------------- 
    1211 
    1312   !!---------------------------------------------------------------------- 
    14    !!   zdf_evd      : increase the momentum and tracer Kz at the location of 
    15    !!                  statically unstable portion of the water column (ln_zdfevd=T) 
     13   !!   zdf_evd       : increase the momentum and tracer Kz at the location of 
     14   !!                   statically unstable portion of the water column (ln_zdfevd=T) 
    1615   !!---------------------------------------------------------------------- 
    1716   USE oce             ! ocean dynamics and tracers variables 
    1817   USE dom_oce         ! ocean space and time domain variables 
    1918   USE zdf_oce         ! ocean vertical physics variables 
    20    USE zdfkpp          ! KPP vertical mixing 
     19   ! 
    2120   USE in_out_manager  ! I/O manager 
    2221   USE iom             ! for iom_put 
    2322   USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
     23   USE wrk_nemo        ! work arrays 
    2424   USE timing          ! Timing 
    2525 
     
    5353      !! References :   Lazar, A., these de l'universite Paris VI, France, 1997 
    5454      !!---------------------------------------------------------------------- 
    55       USE oce,   zavt_evd => ua , zavm_evd => va  ! (ua,va) used ua workspace 
    56       ! 
    5755      INTEGER, INTENT( in ) ::   kt   ! ocean time-step indexocean time step 
    5856      ! 
    5957      INTEGER ::   ji, jj, jk   ! dummy loop indices 
     58      REAL(wp), POINTER, DIMENSION(:,:,:) ::   zavt_evd, zavm_evd 
    6059      !!---------------------------------------------------------------------- 
    6160      ! 
     
    6867         IF(lwp) WRITE(numout,*) 
    6968      ENDIF 
    70  
     69      ! 
     70      CALL wrk_alloc( jpi,jpj,jpk,   zavt_evd, zavm_evd )  
     71      ! 
    7172      zavt_evd(:,:,:) = avt(:,:,:)           ! set avt prior to evd application 
    72  
     73      ! 
    7374      SELECT CASE ( nn_evdm ) 
    7475      ! 
     
    8081            DO jj = 2, jpj             ! no vector opt. 
    8182               DO ji = 2, jpi 
    82 #if defined key_zdfkpp 
    83                   ! no evd mixing in the boundary layer with KPP 
    84                   IF(  MIN( rn2(ji,jj,jk), rn2b(ji,jj,jk) ) <= -1.e-12  .AND.  fsdepw(ji,jj,jk) > hkpp(ji,jj)  ) THEN 
    85 #else 
    8683                  IF(  MIN( rn2(ji,jj,jk), rn2b(ji,jj,jk) ) <= -1.e-12 ) THEN 
    87 #endif 
    8884                     avt (ji  ,jj  ,jk) = rn_avevd * tmask(ji  ,jj  ,jk) 
    8985                     avm (ji  ,jj  ,jk) = rn_avevd * tmask(ji  ,jj  ,jk) 
     
    107103            DO jj = 1, jpj             ! loop over the whole domain (no lbc_lnk call) 
    108104               DO ji = 1, jpi 
    109 #if defined key_zdfkpp 
    110                   ! no evd mixing in the boundary layer with KPP 
    111                   IF(  MIN( rn2(ji,jj,jk), rn2b(ji,jj,jk) ) <= -1.e-12  .AND.  fsdepw(ji,jj,jk) > hkpp(ji,jj)  )   &           
    112 #else 
    113105                  IF(  MIN( rn2(ji,jj,jk), rn2b(ji,jj,jk) ) <= -1.e-12 )   & 
    114 #endif 
    115106                     avt(ji,jj,jk) = rn_avevd * tmask(ji,jj,jk) 
    116107               END DO 
     
    123114      CALL iom_put( "avt_evd", zavt_evd )              ! output this change 
    124115      ! 
     116      CALL wrk_dealloc( jpi,jpj,jpk,   zavt_evd, zavm_evd )  
     117      ! 
    125118      IF( nn_timing == 1 )  CALL timing_stop('zdf_evd') 
    126119      ! 
Note: See TracChangeset for help on using the changeset viewer.