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 14912 – NEMO

Changeset 14912


Ignore:
Timestamp:
2021-05-27T12:51:04+02:00 (3 years ago)
Author:
smueller
Message:

Minor adjustments to comments (ticket #2353)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2021/dev_r14122_HPC-08_Mueller_OSMOSIS_streamlining/src/OCE/ZDF/zdfosm.F90

    r14911 r14912  
    3434   !! 16/05/2019 (19) Fox-Kemper parametrization of restratification through mixed layer eddies added to revised code. 
    3535   !! 23/05/19   (20) Old code where key_osmldpth1` is *not* set removed, together with the key key_osmldpth1 
    36    !!             4.2  !  2021-05  (S. Mueller)  Efficiency and source-code clarity enhancements, adaptation for tiling 
     36   !!             4.2  !  2021-05  (S. Mueller)  Efficiency improvements, source-code clarity enhancements, and adaptation to tiling 
    3737   !!---------------------------------------------------------------------- 
    3838 
    3939   !!---------------------------------------------------------------------- 
    40    !!   'ln_zdfosm'                                             OSMOSIS scheme 
     40   !!   'ln_zdfosm'                                          OSMOSIS scheme 
    4141   !!---------------------------------------------------------------------- 
    4242   !!   zdf_osm        : update momentum and tracer Kz from osm scheme 
     
    6666   !!      zdf_osm_iomput_3d                    : iom_put wrapper for 3D fields 
    6767   !!---------------------------------------------------------------------- 
    68    USE oce                                        ! Ocean dynamics and active tracers 
    69                                                   ! Uses ww from previous time step (which is now wb) to calculate hbl 
    70    USE dom_oce                                    ! Ocean space and time domain 
    71    USE zdf_oce                                    ! Ocean vertical physics 
    72    USE sbc_oce                                    ! Surface boundary condition: ocean 
    73    USE sbcwave                                    ! Surface wave parameters 
    74    USE phycst                                     ! Physical constants 
    75    USE eosbn2                                     ! Equation of state 
    76    USE traqsr                                     ! Details of solar radiation absorption 
    77    USE zdfdrg, ONLY : rCdU_bot                    ! Bottom friction velocity 
    78    USE zdfddm                                     ! Double diffusion mixing (avs array) 
    79    USE iom                                        ! I/O library 
    80    USE lib_mpp                                    ! MPP library 
    81    USE trd_oce                                    ! Ocean trends definition 
    82    USE trdtra                                     ! Tracers trends 
    83    USE in_out_manager                             ! I/O manager 
    84    USE lbclnk                                     ! Ocean lateral boundary conditions (or mpp link) 
    85    USE prtctl                                     ! Print control 
    86    USE lib_fortran                                ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 
    87    ! 
     68   USE oce                       ! Ocean dynamics and active tracers 
     69   !                             ! Uses ww from previous time step (which is now wb) to calculate hbl 
     70   USE dom_oce                   ! Ocean space and time domain 
     71   USE zdf_oce                   ! Ocean vertical physics 
     72   USE sbc_oce                   ! Surface boundary condition: ocean 
     73   USE sbcwave                   ! Surface wave parameters 
     74   USE phycst                    ! Physical constants 
     75   USE eosbn2                    ! Equation of state 
     76   USE traqsr                    ! Details of solar radiation absorption 
     77   USE zdfdrg, ONLY : rCdU_bot   ! Bottom friction velocity 
     78   USE zdfddm                    ! Double diffusion mixing (avs array) 
     79   USE iom                       ! I/O library 
     80   USE lib_mpp                   ! MPP library 
     81   USE trd_oce                   ! Ocean trends definition 
     82   USE trdtra                    ! Tracers trends 
     83   USE in_out_manager            ! I/O manager 
     84   USE lbclnk                    ! Ocean lateral boundary conditions (or mpp link) 
     85   USE prtctl                    ! Print control 
     86   USE lib_fortran               ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 
     87 
    8888   IMPLICIT NONE 
    8989   PRIVATE 
    90    ! 
     90 
    9191   ! Public subroutines 
    9292   PUBLIC zdf_osm        ! Routine called by step.F90 
     
    9696   PUBLIC trc_osm        ! Routine called by trcstp.F90 
    9797   PUBLIC dyn_osm        ! Routine called by step.F90 
    98    ! 
     98 
    9999   ! Public variables 
    100100   LOGICAL,  PUBLIC                                      ::   ln_osm_mle   !: Flag to activate the Mixed Layer Eddy (MLE) 
     
    111111   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   dbdy_mle     !: Meridional buoyancy gradient in ML 
    112112   INTEGER,  PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   mld_prof     !: Level of base of MLE layer 
    113    ! 
     113 
    114114   INTERFACE zdf_osm_velocity_rotation 
    115115      !!--------------------------------------------------------------------- 
     
    127127      MODULE PROCEDURE zdf_osm_iomput_3d 
    128128   END INTERFACE 
    129    ! 
    130    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   etmean   ! Averaging operator for avt 
    131    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   dh       ! Depth of pycnocline 
    132    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   r1_ft    ! Inverse of the modified Coriolis parameter at t-pts 
    133    ! 
     129 
     130   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   etmean      ! Averaging operator for avt 
     131   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   dh          ! Depth of pycnocline 
     132   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   r1_ft       ! Inverse of the modified Coriolis parameter at t-pts 
    134133   ! Layer indices 
    135    INTEGER,  ALLOCATABLE, SAVE, DIMENSION(:,:) ::   nbld   ! Level of boundary layer base 
    136    INTEGER,  ALLOCATABLE, SAVE, DIMENSION(:,:) ::   nmld   ! Level of mixed-layer depth (pycnocline top) 
    137    ! 
     134   INTEGER,  ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   nbld        ! Level of boundary layer base 
     135   INTEGER,  ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   nmld        ! Level of mixed-layer depth (pycnocline top) 
    138136   ! Layer type 
    139    INTEGER,  ALLOCATABLE, SAVE, DIMENSION(:,:) ::   n_ddh   ! Type of shear layer 
    140    !                                                        !    n_ddh=0: active shear layer 
    141    !                                                        !    n_ddh=1: shear layer not active 
    142    !                                                        !    n_ddh=2: shear production low 
    143    ! 
     137   INTEGER,  ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   n_ddh       ! Type of shear layer 
     138   !                                                              !    n_ddh=0: active shear layer 
     139   !                                                              !    n_ddh=1: shear layer not active 
     140   !                                                              !    n_ddh=2: shear production low 
    144141   ! Layer flags 
    145    LOGICAL,  ALLOCATABLE, SAVE, DIMENSION(:,:) ::   l_conv    ! Unstable/stable bl 
    146    LOGICAL,  ALLOCATABLE, SAVE, DIMENSION(:,:) ::   l_shear   ! Shear layers 
    147    LOGICAL,  ALLOCATABLE, SAVE, DIMENSION(:,:) ::   l_coup    ! Coupling to bottom 
    148    LOGICAL,  ALLOCATABLE, SAVE, DIMENSION(:,:) ::   l_pyc     ! OSBL pycnocline present 
    149    LOGICAL,  ALLOCATABLE, SAVE, DIMENSION(:,:) ::   l_flux    ! Surface flux extends below OSBL into MLE layer 
    150    LOGICAL,  ALLOCATABLE, SAVE, DIMENSION(:,:) ::   l_mle     ! MLE layer increases in hickness. 
    151    ! 
     142   LOGICAL,  ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   l_conv      ! Unstable/stable bl 
     143   LOGICAL,  ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   l_shear     ! Shear layers 
     144   LOGICAL,  ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   l_coup      ! Coupling to bottom 
     145   LOGICAL,  ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   l_pyc       ! OSBL pycnocline present 
     146   LOGICAL,  ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   l_flux      ! Surface flux extends below OSBL into MLE layer 
     147   LOGICAL,  ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   l_mle       ! MLE layer increases in hickness. 
    152148   ! Scales 
    153    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   swth0       ! Surface heat flux (Kinematic) 
    154    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   sws0        ! Surface freshwater flux 
    155    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   swb0        ! Surface buoyancy flux 
    156    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   suw0        ! Surface u-momentum flux 
    157    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   sustar      ! Friction velocity 
    158    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   scos_wind   ! Cos angle of surface stress 
    159    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   ssin_wind   ! Sin angle of surface stress 
    160    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   swthav      ! Heat flux - bl average 
    161    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   swsav       ! Freshwater flux - bl average 
    162    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   swbav       ! Buoyancy flux - bl average 
    163    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   sustke      ! Surface Stokes drift 
    164    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   dstokes     ! Penetration depth of the Stokes drift 
    165    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   swstrl      ! Langmuir velocity scale 
    166    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   swstrc      ! Convective velocity scale 
    167    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   sla         ! Trubulent Langmuir number 
    168    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   svstr       ! Velocity scale that tends to sustar for large Langmuir number 
    169    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   shol        ! Stability parameter for boundary layer 
    170    ! 
     149   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   swth0       ! Surface heat flux (Kinematic) 
     150   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   sws0        ! Surface freshwater flux 
     151   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   swb0        ! Surface buoyancy flux 
     152   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   suw0        ! Surface u-momentum flux 
     153   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   sustar      ! Friction velocity 
     154   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   scos_wind   ! Cos angle of surface stress 
     155   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   ssin_wind   ! Sin angle of surface stress 
     156   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   swthav      ! Heat flux - bl average 
     157   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   swsav       ! Freshwater flux - bl average 
     158   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   swbav       ! Buoyancy flux - bl average 
     159   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   sustke      ! Surface Stokes drift 
     160   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   dstokes     ! Penetration depth of the Stokes drift 
     161   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   swstrl      ! Langmuir velocity scale 
     162   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   swstrc      ! Convective velocity scale 
     163   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   sla         ! Trubulent Langmuir number 
     164   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   svstr       ! Velocity scale that tends to sustar for large Langmuir number 
     165   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   shol        ! Stability parameter for boundary layer 
    171166   ! Layer averages: BL 
    172    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   av_t_bl   ! Temperature average 
    173    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   av_s_bl   ! Salinity average 
    174    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   av_u_bl   ! Velocity average (u) 
    175    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   av_v_bl   ! Velocity average (v) 
    176    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   av_b_bl   ! Buoyancy average 
    177    ! 
     167   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   av_t_bl     ! Temperature average 
     168   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   av_s_bl     ! Salinity average 
     169   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   av_u_bl     ! Velocity average (u) 
     170   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   av_v_bl     ! Velocity average (v) 
     171   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   av_b_bl     ! Buoyancy average 
    178172   ! Difference between layer average and parameter at the base of the layer: BL 
    179    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   av_dt_bl   ! Temperature difference 
    180    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   av_ds_bl   ! Salinity difference 
    181    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   av_du_bl   ! Velocity difference (u) 
    182    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   av_dv_bl   ! Velocity difference (v) 
    183    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   av_db_bl   ! Buoyancy difference 
    184    ! 
     173   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   av_dt_bl    ! Temperature difference 
     174   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   av_ds_bl    ! Salinity difference 
     175   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   av_du_bl    ! Velocity difference (u) 
     176   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   av_dv_bl    ! Velocity difference (v) 
     177   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   av_db_bl    ! Buoyancy difference 
    185178   ! Layer averages: ML 
    186    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   av_t_ml   ! Temperature average 
    187    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   av_s_ml   ! Salinity average 
    188    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   av_u_ml   ! Velocity average (u) 
    189    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   av_v_ml   ! Velocity average (v) 
    190    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   av_b_ml   ! Buoyancy average 
    191    ! 
     179   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   av_t_ml     ! Temperature average 
     180   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   av_s_ml     ! Salinity average 
     181   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   av_u_ml     ! Velocity average (u) 
     182   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   av_v_ml     ! Velocity average (v) 
     183   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   av_b_ml     ! Buoyancy average 
    192184   ! Difference between layer average and parameter at the base of the layer: ML 
    193    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   av_dt_ml   ! Temperature difference 
    194    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   av_ds_ml   ! Salinity difference 
    195    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   av_du_ml   ! Velocity difference (u) 
    196    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   av_dv_ml   ! Velocity difference (v) 
    197    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   av_db_ml   ! Buoyancy difference 
    198    ! 
     185   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   av_dt_ml    ! Temperature difference 
     186   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   av_ds_ml    ! Salinity difference 
     187   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   av_du_ml    ! Velocity difference (u) 
     188   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   av_dv_ml    ! Velocity difference (v) 
     189   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   av_db_ml    ! Buoyancy difference 
    199190   ! Layer averages: MLE 
    200    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   av_t_mle  ! Temperature average 
    201    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   av_s_mle  ! Salinity average 
    202    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   av_u_mle  ! Velocity average (u) 
    203    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   av_v_mle  ! Velocity average (v) 
    204    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   av_b_mle  ! Buoyancy average 
    205    ! 
     191   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   av_t_mle    ! Temperature average 
     192   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   av_s_mle    ! Salinity average 
     193   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   av_u_mle    ! Velocity average (u) 
     194   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   av_v_mle    ! Velocity average (v) 
     195   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   av_b_mle    ! Buoyancy average 
    206196   ! Diagnostic output 
    207    REAL(WP), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   osmdia2d   ! Auxiliary array for diagnostic output 
    208    REAL(WP), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   osmdia3d   ! Auxiliary array for diagnostic output 
    209    ! 
    210    !            ** Namelist  namzdf_osm  ** 
     197   REAL(WP), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   osmdia2d    ! Auxiliary array for diagnostic output 
     198   REAL(WP), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   osmdia3d    ! Auxiliary array for diagnostic output 
     199   LOGICAL  ::   ln_dia_pyc_scl = .FALSE.                         ! Output of pycnocline scalar-gradient profiles 
     200   LOGICAL  ::   ln_dia_pyc_shr = .FALSE.                         ! Output of pycnocline velocity-shear  profiles 
     201 
     202   !                                               !!* namelist namzdf_osm * 
    211203   LOGICAL  ::   ln_use_osm_la                      ! Use namelist rn_osm_la 
    212204   REAL(wp) ::   rn_osm_la                          ! Turbulent Langmuir number 
     
    221213   INTEGER  ::   nn_osm_SD_reduce                   ! = 0/1/2 flag for getting effective stokes drift from surface value 
    222214   LOGICAL  ::   ln_dia_osm                         ! Use namelist  rn_osm_la 
    223    LOGICAL  ::   ln_dia_pyc_scl        = .FALSE.    ! Output of pycnocline scalar-gradient profiles 
    224    LOGICAL  ::   ln_dia_pyc_shr        = .FALSE.    ! Output of pycnocline velocity-shear  profiles 
    225215   LOGICAL  ::   ln_kpprimix           = .TRUE.     ! Shear instability mixing 
    226216   REAL(wp) ::   rn_riinfty            = 0.7_wp     ! Local Richardson Number limit for shear instability 
     
    228218   LOGICAL  ::   ln_convmix            = .TRUE.     ! Convective instability mixing 
    229219   REAL(wp) ::   rn_difconv            = 1.0_wp     ! Diffusivity when unstable below BL  (m2/s) 
    230    ! 
    231220   ! OSMOSIS mixed layer eddy parametrization constants 
    232    INTEGER  ::   nn_osm_mle          ! = 0/1 flag for horizontal average on avt 
    233    REAL(wp) ::   rn_osm_mle_ce       ! MLE coefficient 
    234    !   ! Parameters used in nn_osm_mle = 0 case 
    235    REAL(wp) ::   rn_osm_mle_lf       ! Typical scale of mixed layer front 
    236    REAL(wp) ::   rn_osm_mle_time     ! Time scale for mixing momentum across the mixed layer 
    237    !   ! Parameters used in nn_osm_mle = 1 case 
    238    REAL(wp) ::   rn_osm_mle_lat      ! Reference latitude for a 5 km scale of ML front 
    239    LOGICAL  ::   ln_osm_hmle_limit   ! If true arbitrarily restrict hmle to rn_osm_hmle_limit*zmld 
    240    REAL(wp) ::   rn_osm_hmle_limit   ! If ln_osm_hmle_limit true arbitrarily restrict hmle to rn_osm_hmle_limit*zmld 
    241    REAL(wp) ::   rn_osm_mle_rho_c    ! Density criterion for definition of MLD used by FK 
    242    REAL(wp) ::   rb_c                ! ML buoyancy criteria = g rho_c /rho0 where rho_c is defined in zdfmld 
    243    REAL(wp) ::   rc_f                ! MLE coefficient (= rn_ce / (5 km * fo) ) in nn_osm_mle=1 case 
    244    REAL(wp) ::   rn_osm_mle_thresh   ! Threshold buoyancy for deepening of MLE layer below OSBL base 
    245    REAL(wp) ::   rn_osm_bl_thresh    ! Threshold buoyancy for deepening of OSBL base 
    246    REAL(wp) ::   rn_osm_mle_tau      ! Adjustment timescale for MLE 
    247    ! 
    248    !             ** General constants  ** 
     221   INTEGER  ::   nn_osm_mle                         ! = 0/1 flag for horizontal average on avt 
     222   REAL(wp) ::   rn_osm_mle_ce                      ! MLE coefficient 
     223   !    Parameters used in nn_osm_mle = 0 case 
     224   REAL(wp) ::   rn_osm_mle_lf                      ! Typical scale of mixed layer front 
     225   REAL(wp) ::   rn_osm_mle_time                    ! Time scale for mixing momentum across the mixed layer 
     226   !    Parameters used in nn_osm_mle = 1 case 
     227   REAL(wp) ::   rn_osm_mle_lat                     ! Reference latitude for a 5 km scale of ML front 
     228   LOGICAL  ::   ln_osm_hmle_limit                  ! If true arbitrarily restrict hmle to rn_osm_hmle_limit*zmld 
     229   REAL(wp) ::   rn_osm_hmle_limit                  ! If ln_osm_hmle_limit true arbitrarily restrict hmle to rn_osm_hmle_limit*zmld 
     230   REAL(wp) ::   rn_osm_mle_rho_c                   ! Density criterion for definition of MLD used by FK 
     231   REAL(wp) ::   rb_c                               ! ML buoyancy criteria = g rho_c /rho0 where rho_c is defined in zdfmld 
     232   REAL(wp) ::   rc_f                               ! MLE coefficient (= rn_ce / (5 km * fo) ) in nn_osm_mle=1 case 
     233   REAL(wp) ::   rn_osm_mle_thresh                  ! Threshold buoyancy for deepening of MLE layer below OSBL base 
     234   REAL(wp) ::   rn_osm_bl_thresh                   ! Threshold buoyancy for deepening of OSBL base 
     235   REAL(wp) ::   rn_osm_mle_tau                     ! Adjustment timescale for MLE 
     236 
     237   ! General constants 
    249238   REAL(wp) ::   epsln     = 1.0e-20_wp      ! A small positive number to ensure no div by zero 
    250239   REAL(wp) ::   depth_tol = 1.0e-6_wp       ! A small-ish positive number to give a hbl slightly shallower than gdepw 
    251240   REAL(wp) ::   pthird    = 1.0_wp/3.0_wp   ! 1/3 
    252241   REAL(wp) ::   p2third   = 2.0_wp/3.0_wp   ! 2/3 
    253    ! 
     242 
    254243   !! * Substitutions 
    255244#  include "do_loop_substitute.h90" 
     
    267256      !!---------------------------------------------------------------------- 
    268257      INTEGER ::   ierr 
     258      !!---------------------------------------------------------------------- 
    269259      ! 
    270260      zdf_osm_alloc = 0 
     
    363353      INTEGER                   , INTENT(in   ) ::  Kbb, Kmm, Krhs   ! Ocean time level indices 
    364354      REAL(wp), DIMENSION(:,:,:), INTENT(inout) ::  p_avm, p_avt     ! Momentum and tracer Kz (w-points) 
    365       ! 
    366       ! Local variables 
     355      !! 
    367356      INTEGER ::   ji, jj, jk, jl, jm, jkflt   ! Dummy loop indices 
    368       ! 
     357      !! 
    369358      REAL(wp) ::   zthermal, zbeta 
    370359      REAL(wp) ::   zesh2, zri, zfri   ! Interior Richardson mixing 
    371       ! 
    372       ! Scales 
     360      !! Scales 
    373361      REAL(wp), DIMENSION(A2D((nn_hls-1)))  ::   zrad0       ! Surface solar temperature flux (deg m/s) 
    374362      REAL(wp), DIMENSION(A2D((nn_hls-1)))  ::   zradh       ! Radiative flux at bl base (Buoyancy units) 
     
    382370      REAL(wp), DIMENSION(A2D((nn_hls-1)))  ::   zdiff_mle   ! Extra MLE vertical diff 
    383371      REAL(wp), DIMENSION(A2D((nn_hls-1)))  ::   zvel_mle    ! Velocity scale for dhdt with stable ML and FK 
    384       ! 
    385       ! mixed-layer variables 
     372      !! Mixed-layer variables 
    386373      INTEGER,  DIMENSION(A2D((nn_hls-1))) ::   jk_nlev   ! Number of levels 
    387374      INTEGER,  DIMENSION(A2D((nn_hls-1))) ::   jk_ext   ! Offset for external level 
    388       ! 
     375      !! 
    389376      REAL(wp), DIMENSION(A2D((nn_hls-1))) ::   zhbl   ! BL depth - grid 
    390377      REAL(wp), DIMENSION(A2D((nn_hls-1))) ::   zhml   ! ML depth - grid 
    391       ! 
     378      !! 
    392379      REAL(wp), DIMENSION(A2D((nn_hls-1))) ::   zhmle   ! MLE depth - grid 
    393380      REAL(wp), DIMENSION(A2D(nn_hls))     ::   zmld    ! ML depth on grid 
    394       ! 
     381      !! 
    395382      REAL(wp), DIMENSION(A2D((nn_hls-1))) ::   zdh                          ! Pycnocline depth - grid 
    396383      REAL(wp), DIMENSION(A2D((nn_hls-1))) ::   zdhdt                        ! BL depth tendency 
     
    398385      REAL(wp), DIMENSION(A2D((nn_hls-1))) ::   zdbdz_bl_ext                 ! External buoyancy gradients 
    399386      REAL(wp), DIMENSION(A2D(nn_hls))     ::   zdtdx, zdtdy, zdsdx, zdsdy   ! Horizontal gradients for Fox-Kemper parametrization 
    400       ! 
     387      !! 
    401388      REAL(wp), DIMENSION(A2D((nn_hls-1))) ::   zdbds_mle   ! Magnitude of horizontal buoyancy gradient 
    402       ! Flux-gradient relationship variables 
     389      !! Flux-gradient relationship variables 
    403390      REAL(wp), DIMENSION(A2D((nn_hls-1))) ::   zshear   ! Shear production 
    404       ! 
     391      !! 
    405392      REAL(wp), DIMENSION(A2D((nn_hls-1))) ::   zhbl_t   ! Holds boundary layer depth updated by full timestep 
    406       ! 
    407       ! For calculating Ri#-dependent mixing 
     393      !! For calculating Ri#-dependent mixing 
    408394      REAL(wp), DIMENSION(A2D(nn_hls)) ::   z2du     ! u-shear^2 
    409395      REAL(wp), DIMENSION(A2D(nn_hls)) ::   z2dv     ! v-shear^2 
    410396      REAL(wp)                         ::   zrimix   ! Spatial form of ri#-induced diffusion 
    411       ! 
    412       ! Temporary variables 
     397      !! Temporary variables 
    413398      REAL(wp)                                 ::   znd              ! Temporary non-dimensional depth 
    414399      REAL(wp)                                 ::   zz0, zz1, zfac 
     
    419404      REAL(wp)                                 ::   zsqrtpi, z_two_thirds, zthickness 
    420405      REAL(wp)                                 ::   z2k_times_thickness, zsqrt_depth, zexp_depth, zf, zexperfc 
    421       ! 
    422       ! For debugging 
     406      !! For debugging 
    423407      REAL(wp), PARAMETER ::   pp_large = -1e10_wp 
     408      !!---------------------------------------------------------------------- 
    424409      ! 
    425410      DO_2D_OVR( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
     
    11601145      REAL(wp),           INTENT(inout), DIMENSION(jpi,jpj) ::   pu, pv   ! Components of current 
    11611146      LOGICAL,  OPTIONAL, INTENT(in   )                     ::   fwd      ! Forward (default) or reverse rotation 
    1162       ! 
     1147      !! 
    11631148      INTEGER  ::   ji, jj       ! Loop indices 
    11641149      REAL(wp) ::   ztmp, zfwd   ! Auxiliary variables 
     1150      !!----------------------------------------------------------------------       
    11651151      ! 
    11661152      zfwd = 1.0_wp 
     
    11921178      INTEGER,  OPTIONAL, INTENT(in   )                             ::   ktop     ! Minimum depth index 
    11931179      INTEGER,  OPTIONAL, INTENT(in   ), DIMENSION(A2D((nn_hls-1))) ::   knlev    ! Array of maximum depth indices 
    1194       ! 
     1180      !! 
    11951181      INTEGER  ::   ji, jj, jk, jktop, jkmax   ! Loop indices 
    11961182      REAL(wp) ::   ztmp, zfwd                 ! Auxiliary variables 
    11971183      LOGICAL  ::   llkbot                     ! Auxiliary variable 
     1184      !!----------------------------------------------------------------------       
    11981185      ! 
    11991186      zfwd = 1.0_wp 
     
    12411228      REAL(wp), DIMENSION(A2D((nn_hls-1))), INTENT(in   ) ::   phml      ! ML depth 
    12421229      REAL(wp), DIMENSION(A2D((nn_hls-1))), INTENT(in   ) ::   pdh       ! Pycnocline depth 
    1243       ! 
    1244       ! Local variables 
     1230      !! 
    12451231      INTEGER :: jj, ji   ! Loop indices 
    1246       ! 
     1232      !! 
    12471233      REAL(wp), DIMENSION(A2D((nn_hls-1))) ::   zekman 
    12481234      REAL(wp), DIMENSION(A2D((nn_hls-1))) ::   zri_p, zri_b   ! Richardson numbers 
    12491235      REAL(wp)                             ::   zshear_u, zshear_v, zwb_shr 
    12501236      REAL(wp)                             ::   zwcor, zrf_conv, zrf_shear, zrf_langmuir, zr_stokes 
    1251       ! 
     1237      !! 
    12521238      REAL(wp), PARAMETER ::   pp_a_shr         = 0.4_wp,  pp_b_shr    = 6.5_wp,  pp_a_wb_s = 0.8_wp 
    12531239      REAL(wp), PARAMETER ::   pp_alpha_c       = 0.2_wp,  pp_alpha_lc = 0.03_wp 
     
    12571243      REAL(wp), PARAMETER ::   pp_ek            = 4.0_wp 
    12581244      REAL(wp), PARAMETER ::   pp_large         = -1e10_wp 
     1245      !!---------------------------------------------------------------------- 
    12591246      ! 
    12601247      ! Initialise arrays 
     
    14011388      REAL(wp), DIMENSION(A2D((nn_hls-1))), INTENT(  out) ::   pdtdz, pdsdz   ! External gradients of temperature, salinity 
    14021389      REAL(wp), DIMENSION(A2D((nn_hls-1))), INTENT(  out) ::   pdbdz          !    and buoyancy 
    1403       ! 
    1404       ! Local variables 
     1390      !! 
    14051391      INTEGER  ::   ji, jj, jkb, jkb1 
    14061392      REAL(wp) ::   zthermal, zbeta 
    1407       ! 
     1393      !! 
    14081394      REAL(wp), PARAMETER ::   pp_large = -1e10_wp 
     1395      !!----------------------------------------------------------------------    
    14091396      ! 
    14101397      DO_2D_OVR( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
     
    14511438      REAL(wp), DIMENSION(A2D((nn_hls-1))), INTENT(in   ) ::   pwb_fk         ! Max MLE buoyancy flux 
    14521439      REAL(wp), DIMENSION(A2D((nn_hls-1))), INTENT(in   ) ::   pvel_mle       ! Vvelocity scale for dhdt with stable ML and FK 
    1453       ! 
    1454       ! Local variables 
     1440      !! 
    14551441      INTEGER  ::   jj, ji 
    14561442      REAL(wp) ::   zgamma_b_nd, zgamma_dh_nd, zpert, zpsi, zari 
    14571443      REAL(wp) ::   zvel_max, zddhdt 
    1458       ! 
     1444      !! 
    14591445      REAL(wp), PARAMETER ::   pp_alpha_b = 0.3_wp 
    14601446      REAL(wp), PARAMETER ::   pp_ddh     = 2.5_wp, pp_ddh_2 = 3.5_wp   ! Also in pycnocline_depth 
    14611447      REAL(wp), PARAMETER ::   pp_large   = -1e10_wp 
     1448      !!---------------------------------------------------------------------- 
    14621449      ! 
    14631450      DO_2D_OVR( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
     
    16171604      REAL(wp), DIMENSION(A2D((nn_hls-1))), INTENT(in   ) ::   pwb_ent    ! Buoyancy entrainment flux 
    16181605      REAL(wp), DIMENSION(A2D((nn_hls-1))), INTENT(in   ) ::   pwb_fk_b   ! MLE buoyancy flux averaged over OSBL 
    1619       ! 
    1620       ! Local variables 
     1606      !! 
    16211607      INTEGER  ::   jk, jj, ji, jm 
    16221608      REAL(wp) ::   zhbl_s, zvel_max, zdb 
    16231609      REAL(wp) ::   zthermal, zbeta 
     1610      !!---------------------------------------------------------------------- 
    16241611      ! 
    16251612      DO_2D_OVR( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
     
    17191706      REAL(wp), DIMENSION(A2D((nn_hls-1))), INTENT(in   ) ::   pdbdz_bl_ext   ! External buoyancy gradients 
    17201707      REAL(wp), DIMENSION(A2D((nn_hls-1))), INTENT(in   ) ::   pwb_fk_b       ! MLE buoyancy flux averaged over OSBL 
    1721  
    1722       ! 
    1723       ! Local variables 
     1708      !! 
    17241709      INTEGER  ::   jj, ji 
    17251710      INTEGER  ::   inhml 
    17261711      REAL(wp) ::   zari, ztau, zdh_ref, zddhdt, zvel_max 
    17271712      REAL(wp) ::   ztmp   ! Auxiliary variable 
    1728       ! 
     1713      !! 
    17291714      REAL, PARAMETER ::   pp_ddh = 2.5_wp, pp_ddh_2 = 3.5_wp   ! Also in pycnocline_depth 
     1715      !!---------------------------------------------------------------------- 
    17301716      ! 
    17311717      DO_2D_OVR( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
     
    18811867      REAL(wp), DIMENSION(A2D((nn_hls-1))),      INTENT(in   ) ::   phml           ! ML depth 
    18821868      REAL(wp), DIMENSION(A2D((nn_hls-1))),      INTENT(in   ) ::   pdhdt          ! Rates of change of hbl 
    1883       ! 
    1884       ! Local variables 
     1869      !! 
    18851870      INTEGER  ::   jk, jj, ji 
    18861871      REAL(wp) ::   zbgrad 
     
    18881873      REAL(wp) ::   zzeta_m 
    18891874      REAL(wp) ::   ztmp   ! Auxiliary variable 
    1890       ! 
     1875      !! 
    18911876      REAL(wp), PARAMETER ::   pp_gamma_b = 2.25_wp 
    18921877      REAL(wp), PARAMETER ::   pp_large   = -1e10_wp 
     1878      !!---------------------------------------------------------------------- 
    18931879      ! 
    18941880      DO_2D_OVR( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 )       
     
    19931979      REAL(wp), DIMENSION(A2D((nn_hls-1))),      INTENT(in   ) ::   pwb_ent        ! Buoyancy entrainment flux 
    19941980      REAL(wp), DIMENSION(A2D((nn_hls-1))),      INTENT(in   ) ::   pwb_min 
    1995       ! 
    1996       ! Local variables 
     1981      !! 
    19971982      INTEGER ::   ji, jj, jk   ! Loop indices 
    1998       ! 
    1999       ! Scales used to calculate eddy diffusivity and viscosity profiles 
     1983      !! Scales used to calculate eddy diffusivity and viscosity profiles 
    20001984      REAL(wp), DIMENSION(A2D((nn_hls-1))) ::   zdifml_sc,    zvisml_sc 
    20011985      REAL(wp), DIMENSION(A2D((nn_hls-1))) ::   zdifpyc_n_sc, zdifpyc_s_sc 
     
    20031987      REAL(wp), DIMENSION(A2D((nn_hls-1))) ::   zbeta_d_sc,   zbeta_v_sc 
    20041988      REAL(wp), DIMENSION(A2D((nn_hls-1))) ::   zb_coup,      zc_coup_vis,  zc_coup_dif 
    2005       ! 
     1989      !! 
    20061990      REAL(wp) ::   zvel_sc_pyc, zvel_sc_ml, zstab_fac, zz_b 
    20071991      REAL(wp) ::   za_cubic, zb_d_cubic, zc_d_cubic, zd_d_cubic,   &   ! Coefficients in cubic polynomial specifying diffusivity 
     
    20091993      REAL(wp) ::   zznd_ml, zznd_pyc, ztmp 
    20101994      REAL(wp) ::   zmsku, zmskv 
    2011       ! 
     1995      !! 
    20121996      REAL(wp), PARAMETER ::   pp_dif_ml     = 0.8_wp,  pp_vis_ml  = 0.375_wp 
    20131997      REAL(wp), PARAMETER ::   pp_dif_pyc    = 0.15_wp, pp_vis_pyc = 0.142_wp 
    20141998      REAL(wp), PARAMETER ::   pp_vispyc_shr = 0.15_wp 
     1999      !!---------------------------------------------------------------------- 
    20152000      ! 
    20162001      zb_coup(:,:) = 0.0_wp 
     
    21912176      REAL(wp), DIMENSION(A2D((nn_hls-1)),jpk),  INTENT(in   ) ::   pdiffut        ! t-diffusivity 
    21922177      REAL(wp), DIMENSION(A2D((nn_hls-1)),jpk),  INTENT(in   ) ::   pviscos        ! Viscosity 
    2193       ! 
     2178      !! 
    21942179      REAL(wp), DIMENSION(A2D((nn_hls-1)))     ::   zalpha_pyc   ! 
    21952180      REAL(wp), DIMENSION(A2D((nn_hls-1)),jpk) ::   zdbdz_pyc    ! Parametrised gradient of buoyancy in the pycnocline 
    21962181      REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::   z3ddz_pyc_1, z3ddz_pyc_2   ! Pycnocline gradient/shear profiles 
    2197       ! 
     2182      !! 
    21982183      INTEGER                              ::   ji, jj, jk, jkm_bld, jkf_mld, jkm_mld   ! Loop indices 
    21992184      INTEGER                              ::   istat                                   ! Memory allocation status 
     
    22152200      REAL(wp)                             ::   ztmp                                    ! 
    22162201      REAL(wp)                             ::   ztgrad, zsgrad, zbgrad                  ! Variables used to calculate pycnocline 
    2217       !                                                                                 !    gradients 
     2202      !!                                                                                !    gradients 
    22182203      REAL(wp)                             ::   zugrad, zvgrad                          ! Variables for calculating pycnocline shear 
    22192204      REAL(wp)                             ::   zdtdz_pyc                               ! Parametrized gradient of temperature in 
    2220       !                                                                                 !    pycnocline 
     2205      !!                                                                                !    pycnocline 
    22212206      REAL(wp)                             ::   zdsdz_pyc                               ! Parametrised gradient of salinity in 
    2222       !                                                                                 !    pycnocline 
     2207      !!                                                                                !    pycnocline 
    22232208      REAL(wp)                             ::   zdudz_pyc                               ! u-shear across the pycnocline 
    22242209      REAL(wp)                             ::   zdvdz_pyc                               ! v-shear across the pycnocline 
     2210      !!---------------------------------------------------------------------- 
    22252211      ! 
    22262212      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    27232709      REAL(wp), DIMENSION(A2D(nn_hls)),     INTENT(inout) ::   pdsdy        ! Horizontal gradient for Fox-Kemper parametrization 
    27242710      REAL(wp), DIMENSION(A2D((nn_hls-1))), INTENT(inout) ::   pdbds_mle    ! Magnitude of horizontal buoyancy gradient 
    2725       ! 
    2726       ! Local variables 
     2711      !! 
    27272712      INTEGER                               ::   ji, jj, jk   ! Dummy loop indices 
    27282713      INTEGER,  DIMENSION(A2D(nn_hls))      ::   jk_mld_prof  ! Base level of MLE layer 
     
    27382723      REAL(wp), DIMENSION(A2D(nn_hls))      ::   zmld_midu 
    27392724      REAL(wp), DIMENSION(A2D(nn_hls))      ::   zmld_midv 
     2725      !!---------------------------------------------------------------------- 
    27402726      ! 
    27412727      ! ==  MLD used for MLE  ==! 
     
    28232809      !! 
    28242810      !!----------------------------------------------------------------------       
    2825       ! Outputs 
    28262811      INTEGER,                              INTENT(in   ) ::   Kmm         ! Time-level index 
    28272812      REAL(wp), DIMENSION(A2D((nn_hls-1))), INTENT(inout) ::   pwb_fk 
     
    28302815      REAL(wp), DIMENSION(A2D((nn_hls-1))), INTENT(in   ) ::   pwb_ent     ! Buoyancy entrainment flux 
    28312816      REAL(wp), DIMENSION(A2D((nn_hls-1))), INTENT(in   ) ::   pdbds_mle   ! Magnitude of horizontal buoyancy gradient 
    2832       ! 
    2833       ! Local variables 
     2817      !! 
    28342818      INTEGER                              ::   ji, jj, jk        ! Dummy loop indices 
    28352819      REAL(wp), DIMENSION(A2D((nn_hls-1))) ::   znd_param 
     
    28402824      REAL(wp)                             ::   zpe_mle_ref 
    28412825      REAL(wp)                             ::   zdbdz_mle_int 
     2826      !!----------------------------------------------------------------------       
    28422827      ! 
    28432828      znd_param(:,:) = 0.0_wp 
     
    29442929      REAL(wp), DIMENSION(A2D((nn_hls-1))), INTENT(in   ) ::   phbl        ! BL depth 
    29452930      REAL(wp), DIMENSION(A2D((nn_hls-1))), INTENT(in   ) ::   pwb0tot     ! Total surface buoyancy flux including insolation 
    2946       ! 
    2947       ! Local variables 
     2931      !! 
    29482932      INTEGER  ::   ji, jj, jk   ! Dummy loop indices 
    29492933      REAL(wp) ::   ztmp 
     
    29552939      REAL(wp) ::   zbuoy 
    29562940      REAL(wp) ::   zdb_mle 
     2941      !!---------------------------------------------------------------------- 
    29572942      ! 
    29582943      ! Calculate vertical buoyancy, heat and salinity fluxes due to MLE 
     
    30112996      !!---------------------------------------------------------------------- 
    30122997      INTEGER, INTENT(in   ) ::   Kmm   ! Time level 
    3013       ! 
    3014       ! Local variables 
     2998      !! 
    30152999      INTEGER  ::   ios            ! Local integer 
    30163000      INTEGER  ::   ji, jj, jk     ! Dummy loop indices 
    30173001      REAL(wp) ::   z1_t2 
    3018       ! 
     3002      !! 
    30193003      REAL(wp), PARAMETER ::   pp_large = -1e10_wp 
    3020       ! 
     3004      !! 
    30213005      NAMELIST/namzdf_osm/ ln_use_osm_la,    rn_osm_la,      rn_osm_dstokes,      nn_ave,                nn_osm_wave,        & 
    30223006         &                 ln_dia_osm,       rn_osm_hbl0,    rn_zdfosm_adjust_sd, ln_kpprimix,           rn_riinfty,         & 
    30233007         &                 rn_difri,         ln_convmix,     rn_difconv,          nn_osm_wave,           nn_osm_SD_reduce,   & 
    30243008         &                 ln_osm_mle,       rn_osm_hblfrac, rn_osm_bl_thresh,    ln_zdfosm_ice_shelter 
    3025       ! Namelist for Fox-Kemper parametrization 
     3009      !! Namelist for Fox-Kemper parametrization 
    30263010      NAMELIST/namosm_mle/ nn_osm_mle,       rn_osm_mle_ce,     rn_osm_mle_lf,  rn_osm_mle_time,  rn_osm_mle_lat,   & 
    30273011         &                 rn_osm_mle_rho_c, rn_osm_mle_thresh, rn_osm_mle_tau, ln_osm_hmle_limit, rn_osm_hmle_limit 
     3012      !!---------------------------------------------------------------------- 
    30283013      ! 
    30293014      READ  ( numnam_ref, namzdf_osm, IOSTAT = ios, ERR = 901) 
     
    32413226      INTEGER         , INTENT(in   ) ::   Kmm    ! Ocean time level index (middle) 
    32423227      CHARACTER(len=*), INTENT(in   ) ::   cdrw   ! "READ"/"WRITE" flag 
    3243       ! 
    3244       ! Local variables 
     3228      !! 
    32453229      INTEGER  ::   id1, id2, id3                 ! iom enquiry index 
    32463230      INTEGER  ::   ji, jj, jk                    ! Dummy loop indices 
     
    32503234      REAL(wp) ::   rho_c = 0.01_wp               ! Density criterion for mixed layer depth 
    32513235      INTEGER, DIMENSION(jpi,jpj) ::   imld_rst   ! Level of mixed-layer depth (pycnocline top) 
     3236      !!---------------------------------------------------------------------- 
    32523237      ! 
    32533238      !!----------------------------------------------------------------------------- 
     
    33503335      INTEGER                                  , INTENT(in   ) ::   Kmm, Krhs   ! Time level indices 
    33513336      REAL(wp), DIMENSION(jpi,jpj,jpk,jpts,jpt), INTENT(inout) ::   pts         ! Active tracers and RHS of tracer equation 
    3352       ! 
    3353       ! Local variables 
     3337      !! 
    33543338      INTEGER                                 ::   ji, jj, jk 
    33553339      REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::   ztrdt, ztrds   ! 3D workspace 
     3340      !!---------------------------------------------------------------------- 
    33563341      ! 
    33573342      IF ( kt == nit000 ) THEN 
     
    34053390      !!---------------------------------------------------------------------- 
    34063391      INTEGER, INTENT(in) :: kt 
     3392      !!---------------------------------------------------------------------- 
    34073393      ! 
    34083394      WRITE(*,*) 'trc_osm: Not written yet', kt 
     
    34233409      INTEGER                             , INTENT(in   ) ::   Kmm, Krhs   ! Ocean time level indices 
    34243410      REAL(wp), DIMENSION(jpi,jpj,jpk,jpt), INTENT(inout) ::   puu, pvv    ! Ocean velocities and RHS of momentum equation 
    3425       ! 
     3411      !! 
    34263412      INTEGER :: ji, jj, jk   ! dummy loop indices 
    34273413      !!---------------------------------------------------------------------- 
     
    34563442      CHARACTER(LEN=*),         INTENT(in   ) ::   cdname 
    34573443      REAL(wp), DIMENSION(:,:), INTENT(in   ) ::   posmdia2d 
     3444      !!---------------------------------------------------------------------- 
    34583445      ! 
    34593446      IF ( ln_dia_osm .AND. iom_use( cdname ) ) THEN 
     
    34783465      CHARACTER(LEN=*),           INTENT(in   ) ::   cdname 
    34793466      REAL(wp), DIMENSION(:,:,:), INTENT(in   ) ::   posmdia3d 
     3467      !!---------------------------------------------------------------------- 
    34803468      ! 
    34813469      IF ( ln_dia_osm .AND. iom_use( cdname ) ) THEN 
Note: See TracChangeset for help on using the changeset viewer.