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 2104 for branches/DEV_r2006_merge_TRA_TRC/NEMO/OPA_SRC/ZDF – NEMO

Ignore:
Timestamp:
2010-09-17T14:35:46+02:00 (14 years ago)
Author:
cetlod
Message:

update DEV_r2006_merge_TRA_TRC according to review

Location:
branches/DEV_r2006_merge_TRA_TRC/NEMO/OPA_SRC/ZDF
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/DEV_r2006_merge_TRA_TRC/NEMO/OPA_SRC/ZDF/zdfbfr.F90

    r2027 r2104  
    77   !!   NEMO     1.0  ! 2002-06  (G. Madec)  F90: Free form and module 
    88   !!            3.2  ! 2009-09  (A.C.Coward)  Correction to include barotropic contribution 
     9   !!            3.3  ! 2010-10  (C. Ethe, G. Madec) reorganisation of initialisation phase 
    910   !!---------------------------------------------------------------------- 
    1011 
     
    1213   !!   zdf_bfr      : update momentum Kz at the ocean bottom due to the type of bottom friction chosen 
    1314   !!   zdf_bfr_init : read in namelist and control the bottom friction parameters. 
    14    !!   zdf_bfr_2d   : read in namelist and control the bottom friction 
    15    !!                  parameters. 
     15   !!   zdf_bfr_2d   : read in namelist and control the bottom friction parameters. 
    1616   !!---------------------------------------------------------------------- 
    1717   USE oce             ! ocean dynamics and tracers variables 
     
    4444#  include "domzgr_substitute.h90" 
    4545   !!---------------------------------------------------------------------- 
    46    !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009)  
    47    !! $Id$  
     46   !! NEMO/OPA 3,3 , LOCEAN-IPSL (2010)  
     47   !! $Id$ 
    4848   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 
    4949   !!---------------------------------------------------------------------- 
  • branches/DEV_r2006_merge_TRA_TRC/NEMO/OPA_SRC/ZDF/zdfddm.F90

    r2027 r2104  
    66   !! History :  OPA  ! 2000-08  (G. Madec)  double diffusive mixing 
    77   !!   NEMO     1.0  ! 2002-06  (G. Madec)  F90: Free form and module 
     8   !!            3.3  !  2010-10  (C. Ethe, G. Madec) reorganisation of initialisation phase 
    89   !!---------------------------------------------------------------------- 
    910#if defined key_zdfddm   ||   defined key_esopa 
     
    3940#  include "vectopt_loop_substitute.h90" 
    4041   !!---------------------------------------------------------------------- 
    41    !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009)  
    42    !! $Id$  
     42   !! NEMO/OPA 3,3 , LOCEAN-IPSL (2010)  
     43   !! $Id$ 
    4344   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 
    4445   !!---------------------------------------------------------------------- 
     
    9798            DO ji = 1, jpi 
    9899               ! stability indicator: msks=1 if rn2>0; 0 elsewhere 
    99                IF( rn2(ji,jj,jk) + 1.e-12  <= 0. ) THEN 
    100                   zmsks(ji,jj) = 0.e0 
    101                ELSE 
    102                   zmsks(ji,jj) = 1.e0 
     100               IF( rn2(ji,jj,jk) + 1.e-12  <= 0. ) THEN   ;   zmsks(ji,jj) = 0.e0 
     101               ELSE                                       ;   zmsks(ji,jj) = 1.e0 
    103102               ENDIF 
    104103               ! salt fingering indicator: msksf=1 if rrau>1; 0 elsewhere             
    105                IF( rrau(ji,jj,jk) <= 1. ) THEN 
    106                   zmskf(ji,jj) = 0.e0 
    107                ELSE 
    108                   zmskf(ji,jj) = 1.e0 
     104               IF( rrau(ji,jj,jk) <= 1.          ) THEN   ;   zmskf(ji,jj) = 0.e0 
     105               ELSE                                       ;   zmskf(ji,jj) = 1.e0 
    109106               ENDIF 
    110107               ! diffusive layering indicators:  
    111                !   mskdl1=1 if 0<rrau<1; 0 elsewhere 
    112                IF( rrau(ji,jj,jk) >= 1. ) THEN 
    113                   zmskd1(ji,jj) = 0.e0 
    114                ELSE 
    115                   zmskd1(ji,jj) = 1.e0 
    116                ENDIF 
    117                !   mskdl2=1 if 0<rrau<0.5; 0 elsewhere 
    118                IF( rrau(ji,jj,jk) >= 0.5 ) THEN 
    119                   zmskd2(ji,jj) = 0.e0 
    120                ELSE 
    121                   zmskd2(ji,jj) = 1.e0 
     108               !     ! mskdl1=1 if 0<rrau<1; 0 elsewhere 
     109               IF( rrau(ji,jj,jk) >= 1.          ) THEN   ;   zmskd1(ji,jj) = 0.e0 
     110               ELSE                                       ;   zmskd1(ji,jj) = 1.e0 
     111               ENDIF 
     112               !     ! mskdl2=1 if 0<rrau<0.5; 0 elsewhere 
     113               IF( rrau(ji,jj,jk) >= 0.5         ) THEN   ;   zmskd2(ji,jj) = 0.e0 
     114               ELSE                                       ;   zmskd2(ji,jj) = 1.e0 
    122115               ENDIF 
    123116               !   mskdl3=1 if 0.5<rrau<1; 0 elsewhere 
    124                IF( rrau(ji,jj,jk) <= 0.5 .OR. rrau(ji,jj,jk) >= 1. ) THEN 
    125                   zmskd3(ji,jj) = 0.e0 
    126                ELSE 
    127                   zmskd3(ji,jj) = 1.e0 
     117               IF( rrau(ji,jj,jk) <= 0.5 .OR. rrau(ji,jj,jk) >= 1. ) THEN   ;   zmskd3(ji,jj) = 0.e0 
     118               ELSE                                                         ;   zmskd3(ji,jj) = 1.e0 
    128119               ENDIF 
    129120            END DO 
     
    226217      WRITE(*,*) 'zdf_ddm: You should not have seen this print! error?', kt 
    227218   END SUBROUTINE zdf_ddm 
     219   SUBROUTINE zdf_ddm_init            ! Dummy routine 
     220   END SUBROUTINE zdf_ddm_init 
    228221#endif 
    229222 
  • branches/DEV_r2006_merge_TRA_TRC/NEMO/OPA_SRC/ZDF/zdfkpp.F90

    r2027 r2104  
    55   !!                 turbulent closure parameterization 
    66   !!===================================================================== 
    7    !! History :  8.1  ! 00-03 (W.G. Large, J. Chanut) Original code 
    8    !!            8.1  ! 02-06 (J.M. Molines) for real case CLIPPER   
    9    !!            8.2  ! 03-10 (Chanut J.) re-writting 
    10    !!            9.0  ! 05-01 (C. Ethe) Free form, F90 
     7   !! History :  OPA  ! 2000-03 (W.G. Large, J. Chanut) Original code 
     8   !!            8.1  ! 2002-06 (J.M. Molines) for real case CLIPPER   
     9   !!            8.2  ! 2003-10 (Chanut J.) re-writting 
     10   !!   NEMO     1.0  ! 2005-01 (C. Ethe, G. Madec) Free form, F90 + creation of tra_kpp routine 
     11   !!            3.3  ! 2010-10  (C. Ethe, G. Madec) reorganisation of initialisation phase + merge TRC-TRA 
    1112   !!---------------------------------------------------------------------- 
    1213#if defined key_zdfkpp   ||   defined key_esopa 
     
    1415   !!   'key_zdfkpp'                                             KPP scheme 
    1516   !!---------------------------------------------------------------------- 
    16    !!---------------------------------------------------------------------- 
    1717   !!   zdf_kpp      : update momentum and tracer Kz from a kpp scheme 
    1818   !!   zdf_kpp_init : initialization, namelist read, and parameters control 
     19   !!   tra_kpp      : compute and add to the T & S trend the non-local flux 
     20   !!   trc_kpp      : compute and add to the passive tracer trend the non-local flux (lk_top=T) 
    1921   !!---------------------------------------------------------------------- 
    2022   USE oce             ! ocean dynamics and active tracers  
     
    5860 
    5961#if defined key_zdfddm 
    60    REAL(wp) ::                 & !!! ** Double diffusion Mixing 
    61       difssf  = 1.e-03_wp   ,  &  ! maximum salt fingering mixing  
    62       Rrho0   = 1.9_wp      ,  &  ! limit for salt  fingering mixing  
    63       difsdc  = 1.5e-06_wp       ! maximum diffusive convection mixing 
     62   !                                        !!! ** Double diffusion Mixing 
     63   REAL(wp) ::   difssf  = 1.e-03_wp         ! maximum salt fingering mixing  
     64   REAL(wp) ::   Rrho0   = 1.9_wp            ! limit for salt  fingering mixing  
     65   REAL(wp) ::   difsdc  = 1.5e-06_wp        ! maximum diffusive convection mixing 
    6466#endif 
    6567   LOGICAL  ::   ln_kpprimix  = .TRUE.       ! Shear instability mixing  
    6668 
    67    REAL(wp) ::                 & !!! ** General constants  ** 
    68       epsln   = 1.0e-20_wp   , &  ! a small positive number     
    69       pthird  = 1._wp/3._wp  , &  ! 1/3 
    70       pfourth = 1._wp/4._wp       ! 1/4 
    71  
    72    REAL(wp) ::                 & !!! ** Boundary Layer Turbulence Parameters  ** 
    73       vonk     = 0.4_wp     ,  &  ! von Karman's constant 
    74       epsilon  = 0.1_wp     ,  &  ! nondimensional extent of the surface layer 
    75       rconc1   = 5.0_wp     ,  &  ! standard flux profile function parmaeters 
    76       rconc2   = 16.0_wp    ,  &  !         "        " 
    77       rconcm   = 8.38_wp    ,  &  ! momentum flux profile fit 
    78       rconam   = 1.26_wp    ,  &  !         "       " 
    79       rzetam   = -.20_wp    ,  &  !         "       "        
    80       rconcs   = 98.96_wp   ,  &  !  scalar  flux profile fit 
    81       rconas   = -28.86_wp  ,  &  !         "       " 
    82       rzetas   = -1.0_wp          !         "       "   
    83    REAL(wp) ::                 & !!! ** Boundary Layer Depth Diagnostic  ** 
    84       Ricr     = 0.3_wp     ,  &  ! critical bulk Richardson Number 
    85       rcekman  = 0.7_wp     ,  &  ! coefficient for ekman depth   
    86       rcmonob  = 1.0_wp     ,  &  ! coefficient for Monin-Obukhov depth  
    87       rconcv   = 1.7_wp     ,  &  ! ratio of interior buoyancy frequency to buoyancy frequency at entrainment depth 
    88       hbf      = 1.0_wp     ,  &  ! fraction of bound. layer depth to which absorbed solar  
    89       !                           ! rad. and contributes to surf. buo. forcing 
    90       Vtc                         ! function of rconcv,rconcs,epsilon,vonk,Ricr 
    91    REAL(wp) ::                 & !!! ** Nonlocal Boundary Layer Mixing ** 
    92       rcstar   = 5.0_wp     ,  &  ! coefficient for convective nonlocal transport 
    93       rcs      = 1.0e-3_wp  ,  &  ! conversion: mm/s ==> m/s    
    94       rcg                         ! non-dimensional coefficient for nonlocal transport 
     69   !                                        !!! ** General constants  ** 
     70   REAL(wp) ::   epsln   = 1.0e-20_wp        ! a small positive number     
     71   REAL(wp) ::   pthird  = 1._wp/3._wp       ! 1/3 
     72   REAL(wp) ::   pfourth = 1._wp/4._wp       ! 1/4 
     73 
     74   !                                        !!! ** Boundary Layer Turbulence Parameters  ** 
     75   REAL(wp) ::   vonk     = 0.4_wp           ! von Karman's constant 
     76   REAL(wp) ::   epsilon  = 0.1_wp           ! nondimensional extent of the surface layer 
     77   REAL(wp) ::   rconc1   = 5.0_wp           ! standard flux profile function parmaeters 
     78   REAL(wp) ::   rconc2   = 16.0_wp          !         "        " 
     79   REAL(wp) ::   rconcm   = 8.38_wp          ! momentum flux profile fit 
     80   REAL(wp) ::   rconam   = 1.26_wp          !         "       " 
     81   REAL(wp) ::   rzetam   = -.20_wp          !         "       "        
     82   REAL(wp) ::   rconcs   = 98.96_wp         !  scalar  flux profile fit 
     83   REAL(wp) ::   rconas   = -28.86_wp        !         "       " 
     84   REAL(wp) ::   rzetas   = -1.0_wp          !         "       "   
     85    
     86   !                                        !!! ** Boundary Layer Depth Diagnostic  ** 
     87   REAL(wp) ::   Ricr     = 0.3_wp           ! critical bulk Richardson Number 
     88   REAL(wp) ::   rcekman  = 0.7_wp           ! coefficient for ekman depth   
     89   REAL(wp) ::   rcmonob  = 1.0_wp           ! coefficient for Monin-Obukhov depth  
     90   REAL(wp) ::   rconcv   = 1.7_wp           ! ratio of interior buoyancy frequency to its value at entrainment depth 
     91   REAL(wp) ::   hbf      = 1.0_wp           ! fraction of bound. layer depth to which absorbed solar  
     92      !                                      ! rad. and contributes to surf. buo. forcing 
     93   REAL(wp) ::   Vtc                         ! function of rconcv,rconcs,epsilon,vonk,Ricr 
     94    
     95   !                                        !!! ** Nonlocal Boundary Layer Mixing ** 
     96   REAL(wp) ::   rcstar   = 5.0_wp           ! coefficient for convective nonlocal transport 
     97   REAL(wp) ::   rcs      = 1.0e-3_wp        ! conversion: mm/s ==> m/s    
     98   REAL(wp) ::   rcg                         ! non-dimensional coefficient for nonlocal transport 
    9599 
    96100#if ! defined key_kppcustom 
    97    REAL(wp), DIMENSION(jpk,jpk) ::   del   ! array for reference mean values of vertical integration  
     101   REAL(wp), DIMENSION(jpk,jpk) ::   del     ! array for reference mean values of vertical integration  
    98102#endif 
    99103 
    100104#if defined key_kpplktb 
    101    INTEGER, PARAMETER ::       & !!! ** Parameters for lookup table for turbulent velocity scales **  
    102       nilktb   = 892        ,  &  ! number of values for zehat in KPP lookup table 
    103       njlktb   = 482        ,  &  ! number of values for ustar in KPP lookup table 
    104       nilktbm1 = nilktb - 1 ,  &  ! 
    105       njlktbm1 = njlktb - 1       ! 
    106  
    107    REAL(wp), DIMENSION(nilktb,njlktb) ::   wmlktb   ! lookup table for the turbulent vertical velocity scale for momentum 
    108    REAL(wp), DIMENSION(nilktb,njlktb) ::   wslktb   ! lookup table for the turbulent vertical velocity scale for tracers 
    109  
    110    REAL(wp) ::                 & 
    111       dehatmin = -4.e-7_wp  ,  &  ! minimum limit for zhat in lookup table (m3/s3)  
    112       dehatmax = 0._wp      ,  &  ! maximum limit for zhat in lookup table (m3/s3) 
    113       ustmin   = 0._wp      ,  &  ! minimum limit for ustar in lookup table (m/s) 
    114       ustmax   = 0.04_wp    ,  &  ! maximum limit for ustar in lookup table (m/s)     
    115       dezehat               ,  &  ! delta zhat in lookup table 
    116       deustar                     ! delta ustar in lookup table 
     105   !                                         !!! ** Parameters for lookup table for turbulent velocity scales **  
     106   INTEGER, PARAMETER ::   nilktb   = 892     ! number of values for zehat in KPP lookup table 
     107   INTEGER, PARAMETER ::   njlktb   = 482     ! number of values for ustar in KPP lookup table 
     108   INTEGER, PARAMETER ::   nilktbm1 = nilktb-1   ! 
     109   INTEGER, PARAMETER ::   njlktbm1 = njlktb-1   ! 
     110 
     111   REAL(wp), DIMENSION(nilktb,njlktb) ::   wmlktb   ! lookup table for the turbulent vertical velocity scale (momentum) 
     112   REAL(wp), DIMENSION(nilktb,njlktb) ::   wslktb   ! lookup table for the turbulent vertical velocity scale (tracers) 
     113 
     114   REAL(wp) ::   dehatmin = -4.e-7_wp    ! minimum limit for zhat in lookup table (m3/s3)  
     115   REAL(wp) ::   dehatmax = 0._wp        ! maximum limit for zhat in lookup table (m3/s3) 
     116   REAL(wp) ::   ustmin   = 0._wp        ! minimum limit for ustar in lookup table (m/s) 
     117   REAL(wp) ::   ustmax   = 0.04_wp      ! maximum limit for ustar in lookup table (m/s)     
     118   REAL(wp) ::   dezehat                 ! delta zhat in lookup table 
     119   REAL(wp) ::   deustar                 ! delta ustar in lookup table 
    117120#endif 
    118121   REAL(wp), DIMENSION(jpk) ::   ratt   ! attenuation coef  (already defines in module traqsr,  
    119122   !                                    ! but only if the solar radiation penetration is considered) 
    120    REAL(wp) ::                 & !!! * penetrative solar radiation coefficient * 
    121       rabs = 0.58_wp        ,  &  ! fraction associated with xsi1 
    122       xsi1 = 0.35_wp        ,  &  ! first depth of extinction  
    123       xsi2 = 23.0_wp              ! second depth of extinction  
     123    
     124   !                                    !!! * penetrative solar radiation coefficient * 
     125   REAL(wp) ::   rabs = 0.58_wp          ! fraction associated with xsi1 
     126   REAL(wp) ::   xsi1 = 0.35_wp          ! first depth of extinction  
     127   REAL(wp) ::   xsi2 = 23.0_wp          ! second depth of extinction  
    124128      !                           ! (default values: water type Ib)  
    125129 
    126    REAL(wp), DIMENSION(jpi,jpj,jpk) ::   & 
    127       etmean                ,  &  ! coefficient used for horizontal smoothing 
    128       eumean                ,  &  ! at t-, u- and v-points 
    129       evmean   
     130   REAL(wp), DIMENSION(jpi,jpj,jpk) ::   etmean, eumean, evmean   ! coeff. used for hor. smoothing at t-, u- & v-points 
     131         
    130132  
    131133#if defined key_c1d 
    132    REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) ::   & 
    133       rig                   ,  &  ! gradient Richardson number 
    134       rib                   ,  &  ! bulk Richardson number 
    135       buof                  ,  &  ! buoyancy forcing 
    136       mols                        ! moning-Obukhov length scale  
    137    REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   ekdp   ! Ekman depth 
     134   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) ::   rig    !: gradient Richardson number 
     135   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) ::   rib    !: bulk Richardson number 
     136   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) ::   buof   !: buoyancy forcing 
     137   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) ::   mols   !: moning-Obukhov length scale  
     138   REAL(wp), PUBLIC, DIMENSION(jpi,jpj)     ::   ekdp   !: Ekman depth 
    138139#endif 
    139140 
     
    145146#  include  "zdfddm_substitute.h90" 
    146147   !!---------------------------------------------------------------------- 
    147    !! NEMO/OPA 3.2 , LOCEAN-IPSL   (2009) 
     148   !! NEMO/OPA 3.3 , LOCEAN-IPSL (2010)  
    148149   !! $Id$ 
    149150   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 
     
    152153CONTAINS 
    153154 
    154    SUBROUTINE zdf_kpp ( kt ) 
     155   SUBROUTINE zdf_kpp( kt ) 
    155156      !!---------------------------------------------------------------------- 
    156157      !!                   ***  ROUTINE zdf_kpp  *** 
     
    188189      !!---------------------------------------------------------------------- 
    189190#if defined  key_zdfddm 
    190       USE oce     , zviscos => ua,      &  ! temp. array for viscosities use ua as workspace 
    191          &          zdiffut => ta,      &  ! temp. array for diffusivities use sa as workspace 
    192          &          zdiffus => sa          ! temp. array for diffusivities use sa as workspace 
     191      USE oce     , zviscos => ua   ! temp. array for viscosities use ua as workspace 
     192      USE oce     , zdiffut => ta   ! temp. array for diffusivities use sa as workspace 
     193      USE oce     , zdiffus => sa   ! temp. array for diffusivities use sa as workspace 
    193194#else 
    194       USE oce     , zviscos => ua,      &  ! temp. array for viscosities use ua as workspace 
    195          &          zdiffut => ta          ! temp. array for diffusivities use sa as workspace 
     195      USE oce     , zviscos => ua   ! temp. array for viscosities use ua as workspace 
     196      USE oce     , zdiffut => ta   ! temp. array for diffusivities use sa as workspace 
    196197#endif 
    197198      !! 
     
    201202      INTEGER ::   ikbot, jkmax, jkm1, jkp2   ! 
    202203 
    203       REAL(wp), DIMENSION(jpi,jpj) ::   & !!! Surface buoyancy forcing, friction velocity 
    204          zBo, zBosol, zustar              ! 
    205                       ! 
    206       REAL(wp) ::                       &  ! 
    207          ztx, zty, zflageos,            &  ! 
    208          zstabl, zbuofdep,zucube,       &  ! 
    209          zrhos, zalbet, zbeta,          &  ! 
    210          zthermal, zhalin, zatt1           ! 
    211       
    212       REAL(wp) ::                       & !!! Bulk richardson number 
    213          zref, zt, zs, zh,              &  ! 
    214          zu, zv, zrh,                   &  ! 
    215          zrib, zrinum,                  &  ! 
    216          zdVsq, zVtsq                      ! 
    217        
    218       REAL(wp) ::                       & !!! Velocity scales 
    219          zehat, zeta, zhrib, zsig,      &  ! 
    220          zscale, zwst, zws, zwm 
    221  
     204      REAL(wp), DIMENSION(jpi,jpj) ::   zBo, zBosol, zustar         ! Surface buoyancy forcing, friction velocity 
     205      REAL(wp) ::   ztx, zty, zflageos, zstabl, zbuofdep,zucube     ! 
     206      REAL(wp) ::   zrhos, zalbet, zbeta, zthermal, zhalin, zatt1   ! 
     207      REAL(wp) ::   zref, zt, zs, zh, zu, zv, zrh                   ! Bulk richardson number 
     208      REAL(wp) ::   zrib, zrinum, zdVsq, zVtsq                      ! 
     209      REAL(wp) ::   zehat, zeta, zhrib, zsig, zscale, zwst, zws, zwm   ! Velocity scales 
    222210#if defined key_kpplktb 
    223       INTEGER ::                        & !!! Lookup table or Analytical functions  
    224          il, jl                            ! 
    225       REAL(wp) ::                       &  ! 
    226          ud, zfrac, ufrac,              &  ! 
    227          zwam, zwbm, zwas, zwbs            ! 
     211      INTEGER ::    il, jl                                          ! Lookup table or Analytical functions  
     212      REAL(wp) ::   ud, zfrac, ufrac, zwam, zwbm, zwas, zwbs        ! 
    228213#else 
    229      REAL(wp) ::                        &  ! 
    230         zwsun, zwmun,                   &  
    231         zcons, zconm, zwcons, zwconm      ! 
    232 #endif 
    233   
    234      REAL(wp) ::                       & !!! In situ density 
    235          zsr, zbw, ze,                  &  ! 
    236          zb, zd, zc, zaw, za,           &  ! 
    237          zb1, za1, zkw, zk0,            &  ! 
    238          zcomp , zrhd, zrhdr,zbvzed       ! 
    239  
     214      REAL(wp) ::   zwsun, zwmun, zcons, zconm, zwcons, zwconm      ! 
     215#endif 
     216      REAL(wp) ::   zsr, zbw, ze, zb, zd, zc, zaw, za, zb1, za1, zkw, zk0, zcomp , zrhd,zrhdr,zbvzed   ! In situ density 
    240217#if ! defined key_kppcustom      
    241      !! * local declarations 
    242       INTEGER ::                        & 
    243          jm                                ! dummy loop indices 
    244       REAL(wp) ::                       & !!! Compression terms 
    245          zr1, zr2, zr3, zr4,            &  ! 
    246          zrhop                             ! 
    247 #endif 
    248   
    249       REAL(wp) ::                       &  ! 
    250          zflag, ztemp, zrn2,            &  ! 
    251          zdep21, zdep32, zdep43 
    252  
    253       REAL(wp) ::                       & !!! Interior richardson mixing 
    254          zdku2, zdkv2, ze3sqr,          &  ! 
    255          zsh2, zri, zfri                   ! 
    256  
    257       REAL(wp), DIMENSION(jpi,0:2) ::  &  !!! Moning-Obukov limitation 
    258          zmoek 
    259       REAL(wp), DIMENSION(jpi)     ::  & 
    260          zmoa, zekman                 
    261       REAL(wp)                     ::  & 
    262          zmob, zek 
    263  
    264       REAL(wp), DIMENSION(jpi,4) ::     &  !!! The pipe  
    265          zdepw, zdift, zvisc 
    266       REAL(wp), DIMENSION(jpi,3) ::     &  
    267          zdept 
    268       REAL(wp), DIMENSION(jpi,2) ::     &   
    269          zriblk 
    270       REAL(wp), DIMENSION(jpi,jpk) ::   &  ! 
    271          zmask                           
    272       REAL(wp), DIMENSION(jpi) ::       &  !  
    273          zhmax, zria, zhbl  
    274       REAL(wp) ::                       &  ! 
    275          zflagri, zflagek,              &  ! 
    276          zflagmo, zflagh, zflagkb          ! 
    277       REAL(wp), DIMENSION(jpi)     ::   & !!! Shape function (G) 
    278          za2m, za3m, zkmpm,             & 
    279          za2t, za3t, zkmpt 
    280       REAL(wp) ::                       &  ! 
    281          zdelta, zdelta2,               &  ! 
    282          zdzup, zdzdn, zdzh,            &  ! 
    283          zvath, zgat1, zdat1,           &  ! 
    284          zkm1m, zkm1t 
    285       REAL(wp), DIMENSION(jpi,jpk) ::   & !!! Boundary layer diffusivities/viscosities 
    286          zblcm, zblct                           
     218      INTEGER  ::   jm                          ! dummy loop indices 
     219      REAL(wp) ::   zr1, zr2, zr3, zr4, zrhop   ! Compression terms 
     220#endif 
     221      REAL(wp) ::   zflag, ztemp, zrn2, zdep21, zdep32, zdep43 
     222      REAL(wp) ::   zdku2, zdkv2, ze3sqr, zsh2, zri, zfri          ! Interior richardson mixing 
     223      REAL(wp), DIMENSION(jpi,0:2) ::   zmoek                      ! Moning-Obukov limitation 
     224      REAL(wp), DIMENSION(jpi)     ::   zmoa, zekman                 
     225      REAL(wp)                     ::   zmob, zek 
     226      REAL(wp), DIMENSION(jpi,4)   ::   zdepw, zdift, zvisc   ! The pipe  
     227      REAL(wp), DIMENSION(jpi,3)   ::   zdept 
     228      REAL(wp), DIMENSION(jpi,2)   ::   zriblk 
     229      REAL(wp), DIMENSION(jpi,jpk) ::   zmask                           
     230      REAL(wp), DIMENSION(jpi)     ::   zhmax, zria, zhbl  
     231      REAL(wp) ::   zflagri, zflagek, zflagmo, zflagh, zflagkb   ! 
     232      REAL(wp), DIMENSION(jpi)     ::   za2m, za3m, zkmpm, za2t, za3t, zkmpt   ! Shape function (G) 
     233      REAL(wp) ::   zdelta, zdelta2, zdzup, zdzdn, zdzh, zvath, zgat1, zdat1, zkm1m, zkm1t 
     234      REAL(wp), DIMENSION(jpi,jpk) ::   zblcm, zblct   ! Boundary layer diffusivities/viscosities 
    287235#if defined key_zdfddm 
    288       REAL(wp) ::                       & !!! double diffusion mixing 
    289          zrrau, zds,                    & 
    290          zavdds, zavddt,zinr  
    291       REAL(wp), DIMENSION(jpi,4) ::     &   
    292         zdifs 
    293       REAL(wp), DIMENSION(jpi)     ::   & 
    294          za2s, za3s, zkmps 
    295       REAL(wp) ::                       &  
    296          zkm1s 
    297       REAL(wp), DIMENSION(jpi,jpk) ::   &  
    298          zblcs                      
     236      REAL(wp) ::   zrrau, zds, zavdds, zavddt,zinr   ! double diffusion mixing 
     237      REAL(wp), DIMENSION(jpi,4) ::     zdifs 
     238      REAL(wp), DIMENSION(jpi)     ::   za2s, za3s, zkmps 
     239      REAL(wp) ::                       zkm1s 
     240      REAL(wp), DIMENSION(jpi,jpk) ::   zblcs                      
    299241#endif 
    300242      !!-------------------------------------------------------------------- 
    301  
    302  
    303       ! Initialization (first time-step only) 
    304       ! -------------- 
    305       IF( kt == nit000  )   CALL zdf_kpp_init 
    306243      
    307244      zviscos(:,:,:) = 0. 
     
    12411178      !!                  ***  ROUTINE tra_kpp  *** 
    12421179      !! 
    1243       !! ** Purpose :   compute and add to the tracer trend the non-local 
    1244       !!                tracer flux 
     1180      !! ** Purpose :   compute and add to the tracer trend the non-local tracer flux 
    12451181      !! 
    12461182      !! ** Method  :   ??? 
    1247       !! 
    1248       !! history : 
    1249       !!     1.0  ! 2005-11 (G. Madec)  Original code 
    1250       !!     3.3  ! 2010-06 (C. Ethe)  Merge TRA-TRC 
    12511183      !!---------------------------------------------------------------------- 
    1252       !! * Modules used 
    12531184      REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::   ztrdt, ztrds   ! 3D workspace 
    12541185      !!---------------------------------------------------------------------- 
     
    13751306      !! 
    13761307      !! ** input   :   Namlist namkpp 
    1377       !! 
    1378       !! 
    1379       !! history : 
    1380       !!     8.1  ! 00-02 (J. Chanut) KPP Mixing 
    1381       !!     9.0  ! 05-01 (C. Ethe) F90 : free form 
    13821308      !!---------------------------------------------------------------------- 
    1383       !! * local declarations 
    1384  
    1385       INTEGER    ::   & 
    1386          ji, jj, jk             ! dummy loop indices 
    1387        
     1309      INTEGER  ::   ji, jj, jk     ! dummy loop indices 
    13881310#if ! defined key_kppcustom 
    1389       INTEGER    ::   & 
    1390          jm                       ! dummy loop indices      
    1391       REAL(wp)   ::              & !!! tempory scalars 
    1392          zref, zdist 
    1393 #endif 
    1394  
     1311      INTEGER  ::   jm             ! dummy loop indices      
     1312      REAL(wp) ::   zref, zdist    ! tempory scalars 
     1313#endif 
    13951314#if defined key_kpplktb 
    1396       REAL(wp)   ::              & !!! tempory scalars 
    1397          zustar,    & 
    1398          zucube, zustvk,         &  
    1399          zeta, zehat 
    1400 #endif 
    1401       REAL(wp)   ::             & !!! tempory scalars 
    1402          zhbf 
    1403       LOGICAL ::                & 
    1404          ll_kppcustom,          &  ! 1st ocean level taken as surface layer 
    1405          ll_kpplktb                ! Lookup table for turbul. velocity scales  
     1315      REAL(wp) ::   zustar, zucube, zustvk, zeta, zehat   ! tempory scalars 
     1316#endif 
     1317      REAL(wp) ::   zhbf           ! tempory scalars 
     1318      LOGICAL  ::   ll_kppcustom   ! 1st ocean level taken as surface layer 
     1319      LOGICAL  ::   ll_kpplktb     ! Lookup table for turbul. velocity scales  
    14061320      !! 
    14071321      NAMELIST/namzdf_kpp/ ln_kpprimix, rn_difmiw, rn_difsiw, rn_riinfty, rn_difri, rn_bvsqcon, rn_difcon, nn_ave 
     
    16101524   LOGICAL, PUBLIC, PARAMETER ::   lk_zdfkpp = .FALSE.   !: KPP flag 
    16111525CONTAINS 
    1612    SUBROUTINE zdf_kpp( kt )          ! Empty routine 
     1526   SUBROUTINE zdf_kpp_init           ! Dummy routine 
     1527      WRITE(*,*) 'zdf_kpp_init: You should not have seen this print! error?' 
     1528   END SUBROUTINE zdf_kpp_init 
     1529   SUBROUTINE zdf_kpp( kt )          ! Dummy routine 
    16131530      WRITE(*,*) 'zdf_kpp: You should not have seen this print! error?', kt 
    16141531   END SUBROUTINE zdf_kpp 
    1615    SUBROUTINE tra_kpp( kt )          ! Empty routine 
     1532   SUBROUTINE tra_kpp( kt )          ! Dummy routine 
    16161533      WRITE(*,*) 'tra_kpp: You should not have seen this print! error?', kt 
    16171534   END SUBROUTINE tra_kpp 
  • branches/DEV_r2006_merge_TRA_TRC/NEMO/OPA_SRC/ZDF/zdfric.F90

    r2027 r2104  
    1010   !!            8.0  ! 1997-06 (G. Madec)  complete rewriting of zdfmix 
    1111   !!   NEMO     1.0  ! 2002-06  (G. Madec)  F90: Free form and module 
     12   !!            3.3  ! 2010-10  (C. Ethe, G. Madec) reorganisation of initialisation phase 
    1213   !!---------------------------------------------------------------------- 
    1314#if defined key_zdfric   ||   defined key_esopa 
     
    4344#  include "domzgr_substitute.h90" 
    4445   !!---------------------------------------------------------------------- 
    45    !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009)  
    46    !! $Id$  
     46   !! NEMO/OPA 3.3 , LOCEAN-IPSL (2010)  
     47   !! $Id$ 
    4748   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 
    4849   !!---------------------------------------------------------------------- 
     
    192193   LOGICAL, PUBLIC, PARAMETER ::   lk_zdfric = .FALSE.   !: Richardson mixing flag 
    193194CONTAINS 
     195   SUBROUTINE zdf_ric_init         ! Dummy routine 
     196   END SUBROUTINE zdf_ric_init 
    194197   SUBROUTINE zdf_ric( kt )        ! Dummy routine 
    195198      WRITE(*,*) 'zdf_ric: You should not have seen this print! error?', kt 
  • branches/DEV_r2006_merge_TRA_TRC/NEMO/OPA_SRC/ZDF/zdftke.F90

    r2027 r2104  
    2525   !!            3.2  !  2009-06  (G. Madec, S. Masson) TKE restart compatible with key_cpl  
    2626   !!                 !                                + cleaning of the parameters + bugs correction 
     27   !!            3.3  !  2010-10  (C. Ethe, G. Madec) reorganisation of initialisation phase 
    2728   !!---------------------------------------------------------------------- 
    2829#if defined key_zdftke   ||   defined key_esopa 
     
    3031   !!   'key_zdftke'                                   TKE vertical physics 
    3132   !!---------------------------------------------------------------------- 
    32    !!   zdf_tke       : update momentum and tracer Kz from a tke scheme 
    33    !!   tke_tke       : tke time stepping: update tke at now time step (en) 
    34    !!   tke_avn       : compute mixing length scale and deduce avm and avt 
    35    !!   tke_init      : initialization, namelist read, and parameters control 
    36    !!   tke_rst       : read/write tke restart in ocean restart file 
     33   !!   zdf_tke      : update momentum and tracer Kz from a tke scheme 
     34   !!   tke_tke      : tke time stepping: update tke at now time step (en) 
     35   !!   tke_avn      : compute mixing length scale and deduce avm and avt 
     36   !!   zdf_tke_init : initialization, namelist read, and parameters control 
     37   !!   tke_rst      : read/write tke restart in ocean restart file 
    3738   !!---------------------------------------------------------------------- 
    3839   USE oce            ! ocean dynamics and active tracers  
     
    5354   PRIVATE 
    5455 
    55    PUBLIC   zdf_tke    ! routine called in step module 
    56    PUBLIC   tke_init   ! routine called in opa module 
    57    PUBLIC   tke_rst    ! routine called in step module 
     56   PUBLIC   zdf_tke        ! routine called in step module 
     57   PUBLIC   zdf_tke_init   ! routine called in opa module 
     58   PUBLIC   tke_rst        ! routine called in step module 
    5859 
    5960   LOGICAL , PUBLIC, PARAMETER              ::   lk_zdftke = .TRUE.  !: TKE vertical mixing flag 
     
    9596#  include "vectopt_loop_substitute.h90" 
    9697   !!---------------------------------------------------------------------- 
    97    !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009)  
    98    !! $Id: zdftke2.F90 1201 2008-09-24 13:24:21Z rblod $ 
     98   !! NEMO/OPA 3,3 , LOCEAN-IPSL (2010)  
     99   !! $Id: $ 
    99100   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 
    100101   !!---------------------------------------------------------------------- 
     
    150151      !!---------------------------------------------------------------------- 
    151152      ! 
    152                            CALL tke_tke      ! now tke (en) 
    153                            ! 
    154                            CALL tke_avn      ! now avt, avm, avmu, avmv 
     153      CALL tke_tke      ! now tke (en) 
     154      ! 
     155      CALL tke_avn      ! now avt, avm, avmu, avmv 
    155156      ! 
    156157   END SUBROUTINE zdf_tke 
     
    655656 
    656657 
    657    SUBROUTINE tke_init 
     658   SUBROUTINE zdf_tke_init 
    658659      !!---------------------------------------------------------------------- 
    659       !!                  ***  ROUTINE tke_init  *** 
     660      !!                  ***  ROUTINE zdf_tke_init  *** 
    660661      !!                      
    661662      !! ** Purpose :   Initialization of the vertical eddy diffivity and  
     
    685686      IF(lwp) THEN                    !* Control print 
    686687         WRITE(numout,*) 
    687          WRITE(numout,*) 'zdf_tke : tke turbulent closure scheme - initialisation' 
    688          WRITE(numout,*) '~~~~~~~~' 
     688         WRITE(numout,*) 'zdf_tke_init : tke turbulent closure scheme - initialisation' 
     689         WRITE(numout,*) '~~~~~~~~~~~~' 
    689690         WRITE(numout,*) '   Namelist namzdf_tke : set tke mixing parameters' 
    690691         WRITE(numout,*) '      coef. to compute avt                        rn_ediff  = ', rn_ediff 
     
    747748      CALL tke_rst( nit000, 'READ' ) 
    748749      ! 
    749    END SUBROUTINE tke_init 
     750   END SUBROUTINE zdf_tke_init 
    750751 
    751752 
     
    824825   LOGICAL, PUBLIC, PARAMETER ::   lk_zdftke = .FALSE.   !: TKE flag 
    825826CONTAINS 
    826    SUBROUTINE zdf_tke( kt )          ! Empty routine 
     827   SUBROUTINE zdf_tke_init           ! Dummy routine 
     828   END SUBROUTINE zdf_tke_init 
     829   SUBROUTINE zdf_tke( kt )          ! Dummy routine 
    827830      WRITE(*,*) 'zdf_tke: You should not have seen this print! error?', kt 
    828831   END SUBROUTINE zdf_tke 
  • branches/DEV_r2006_merge_TRA_TRC/NEMO/OPA_SRC/ZDF/zdftke_old.F90

    r2027 r2104  
    4848   PRIVATE 
    4949 
    50    PUBLIC   zdf_tke_old   ! routine called in step module 
    51    PUBLIC   zdf_tke_init  ! routine called in opa module 
     50   PUBLIC   zdf_tke_old     ! routine called in step module 
     51   PUBLIC   zdf_tke_init_o  ! routine called in opa module 
    5252 
    5353   LOGICAL , PUBLIC, PARAMETER              ::   lk_zdftke_old = .TRUE.  !: TKE vertical mixing flag 
     
    696696 
    697697 
    698    SUBROUTINE zdf_tke_init 
     698   SUBROUTINE zdf_tke_init_o 
    699699      !!---------------------------------------------------------------------- 
    700       !!                  ***  ROUTINE zdf_tke_init  *** 
     700      !!                  ***  ROUTINE zdf_tke_init_o  *** 
    701701      !!                      
    702702      !! ** Purpose :   Initialization of the vertical eddy diffivity and  
     
    743743      IF(lwp) THEN 
    744744         WRITE(numout,*) 
    745          WRITE(numout,*) 'zdf_tke_init : tke turbulent closure scheme (old scheme)' 
    746          WRITE(numout,*) '~~~~~~~~~~~~' 
     745         WRITE(numout,*) 'zdf_tke_init_o : tke turbulent closure scheme (old scheme)' 
     746         WRITE(numout,*) '~~~~~~~~~~~~~~' 
    747747         WRITE(numout,*) '          Namelist namzdf_tke : set tke mixing parameters' 
    748748         WRITE(numout,*) '             restart with tke from no tke              ln_rstke = ', ln_rstke 
     
    853853      CALL tke_rst( nit000, 'READ' ) 
    854854      ! 
    855    END SUBROUTINE zdf_tke_init 
     855   END SUBROUTINE zdf_tke_init_o 
    856856 
    857857 
     
    901901   LOGICAL, PUBLIC, PARAMETER ::   lk_zdftke_old = .FALSE.   !: TKE flag 
    902902CONTAINS 
    903    SUBROUTINE zdf_tke_old( kt )          ! Empty routine 
     903   SUBROUTINE zdf_tke_init_o             ! Dummy routine 
     904   END SUBROUTINE zdf_tke_init_o 
     905   SUBROUTINE zdf_tke_old( kt )          ! Dummy routine 
    904906      WRITE(*,*) 'zdf_tke_old: You should not have seen this print! error?', kt 
    905907   END SUBROUTINE zdf_tke_old 
  • branches/DEV_r2006_merge_TRA_TRC/NEMO/OPA_SRC/ZDF/zdftmx.F90

    r2027 r2104  
    66   !! History :  1.0  !  2004-04  (L. Bessieres, G. Madec)  Original code 
    77   !!             -   !  2006-08  (A. Koch-Larrouy) Indonesian strait 
     8   !!            3.3  !  2010-10  (C. Ethe, G. Madec) reorganisation of initialisation phase 
    89   !!---------------------------------------------------------------------- 
    910#if defined key_zdftmx 
     
    4849#  include "vectopt_loop_substitute.h90" 
    4950   !!---------------------------------------------------------------------- 
    50    !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009)  
    51    !! $Id$  
     51   !! NEMO/OPA 3.3 , LOCEAN-IPSL (2010)  
     52   !! $Id: $ 
    5253   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 
    5354   !!---------------------------------------------------------------------- 
     
    486487         ! 
    487488      ENDIF 
    488  
     489      ! 
    489490   END SUBROUTINE zdf_tmx_init 
    490491 
     
    495496   LOGICAL, PUBLIC, PARAMETER ::   lk_zdftmx = .FALSE.   !: tidal mixing flag 
    496497CONTAINS 
    497    SUBROUTINE zdf_tmx( kt )          ! Empty routine 
     498   SUBROUTINE zdf_tmx_init           ! Dummy routine 
     499      WRITE(*,*) 'zdf_tmx: You should not have seen this print! error?' 
     500   END SUBROUTINE zdf_tmx_init 
     501   SUBROUTINE zdf_tmx( kt )          ! Dummy routine 
    498502      WRITE(*,*) 'zdf_tmx: You should not have seen this print! error?', kt 
    499503   END SUBROUTINE zdf_tmx 
Note: See TracChangeset for help on using the changeset viewer.