Index: palm/trunk/TESTS/cases/oceanml/INPUT/oceanml_p3d
===================================================================
--- palm/trunk/TESTS/cases/oceanml/INPUT/oceanml_p3d	(revision 4002)
+++ palm/trunk/TESTS/cases/oceanml/INPUT/oceanml_p3d	(revision 4211)
@@ -2,4 +2,10 @@
 !-- INITIALIZATION PARAMETER NAMELIST
 !   Documentation: https://palm.muk.uni-hannover.de/trac/wiki/doc/app/inipar
+!-------------------------------------------------------------------------------
+!   This is a setup for generating an ocean mixed layer including the effects
+!   of Stokes drift (Langmuir circulation) and wave breaking, based on the
+!   case described in Noh, Y., H.S. Min and S. Raasch (2004): Large-eddy
+!   simulation of the ocean mixed layer: The effects of wave breaking and
+!   Langmuir circulation. J. Phys. Oceanogr., 34, 720-735.
 !-------------------------------------------------------------------------------
 &initialization_parameters
@@ -7,49 +13,56 @@
 !-- grid parameters
 !-------------------------------------------------------------------------------
-    nx                         = 63, ! Number of gridboxes in x-direction (nx+1)
-    ny                         = 63, ! Number of gridboxes in y-direction (ny+1)
-    nz                         = 64, ! Number of gridboxes in z-direction (nz)
+    nx                      = 63,  ! Number of gridboxes in x-direction (nx+1)
+                                   ! For Noh et al. change to nx = 239
+    ny                      = 63,  ! Number of gridboxes in y-direction (ny+1)
+                                   ! For Noh et al. change to nx = 239
+    nz                      = 64,  ! Number of gridboxes in z-direction (nz)
 
-    dx                         = 1.25, ! Size of single gridbox in x-direction
-    dy                         = 1.25, ! Size of single gridbox in y-direction
-    dz                         = 1.25, ! Size of single gridbox in z-direction
+    dx                      = 1.25, ! Size of single gridbox in x-direction
+    dy                      = 1.25, ! Size of single gridbox in y-direction
+    dz                      = 1.25, ! Size of single gridbox in z-direction
 !
 !-- initialization
 !-------------------------------------------------------------------------------
-    initializing_actions       = 'set_constant_profiles', ! initial conditions
+    initializing_actions    = 'set_constant_profiles', ! initial conditions
 
-    latitude                   = 55.6,
+    latitude                = 55.0,  ! corresponds to a Coriolis parameter 
+                                     ! f = 1.2**-4 s-1
 
-    ug_surface                 = 0.0, ! u-comp of geostrophic wind at surface
-    vg_surface                 = 0.0, ! v-comp of geostrophic wind at surface
+    ug_surface              = 0.0,   ! u-comp of geostrophic flow at surface
+    vg_surface              = 0.0,   ! v-comp of geostrophic flow at surface
 
-    pt_surface                 = 300.0, ! initial surface potential temp
+    pt_surface              = 300.0, ! initial surface potential temp
 !
 !-- boundary conditions
 !-------------------------------------------------------------------------------
-    bc_uv_b                    = 'neumann',
-    bc_uv_t                    = 'neumann',
-    bc_pt_b                    = 'neumann',
-    bc_pt_t                    = 'neumann',
-    bc_p_b                     = 'neumann',
-    bc_p_t                     = 'neumann',
-    bc_s_b                     = 'initial_gradient',
-    bc_s_t                     = 'neumann',
+    bc_uv_b                 = 'neumann',
+    bc_uv_t                 = 'neumann',
+    bc_pt_b                 = 'neumann',
+    bc_pt_t                 = 'neumann',
+    bc_p_b                  = 'neumann',
+    bc_p_t                  = 'neumann',
 
-    use_top_fluxes             = .T.,
-    use_surface_fluxes         = .F.,
-    constant_flux_layer        = .F.,
+    use_top_fluxes          = .T.,
+    use_surface_fluxes      = .F.,
+    constant_flux_layer     = .F.,
 
-    top_momentumflux_u         = -0.0001,
-    top_momentumflux_v         = 0.0,
+    top_momentumflux_u      = -0.0001,    ! corresponds to u* = 0.01 m/s
+    top_momentumflux_v      = 0.0,
 
-    top_heatflux               = 0.0,
+    top_heatflux            = 1.02e-4,    ! gives weak cooling at ocean
+                                          ! surface to initiate buoyancy driven
+                                          ! turbulence,
+                                          ! see surface_cooling_spinup_time
+                                          ! below
 !
 !-- numerics
 !-------------------------------------------------------------------------------
-    fft_method                 = 'temperton-algorithm',   ! build-in fft method
+    fft_method              = 'temperton-algorithm',   ! build-in fft method
 
-    momentum_advec             = 'pw-scheme', ! use Piacsek and Williams scheme
-    scalar_advec               = 'pw-scheme', ! use Piacsek and Williams scheme
+    momentum_advec          = 'ws-scheme',  ! attention: Noh et al. used the
+                                            ! Piascek-Williams advection scheme
+    scalar_advec            = 'ws-scheme',  ! attention: Noh et al. used the
+                                            ! Piascek-Williams advection scheme
 
 / ! end of initialization parameter namelist
@@ -63,20 +76,40 @@
 !-- run steering
 !-------------------------------------------------------------------------------
-    end_time                   = 300.0, ! simulation time of the 3D model
+    end_time                =   120.0, ! simulation time of the 3D model
+                                       ! For Noh et al. change to  28800.0 s
 
-    create_disturbances        = .TRUE.,  ! randomly perturbate horiz. velocity
-    dt_disturb                 = 60.0,    ! interval for random perturbations
-    disturbance_energy_limit   = 1.0e-4,  ! upper limit for perturbation energy
-    disturbance_amplitude      = 0.25e-1, ! maximum perturbation amplitude
+    create_disturbances     = .TRUE.,  ! randomly perturbate horiz. velocity
+                                       ! at beginning of the run
+    disturbance_amplitude   = 0.25e-3, ! maximum perturbation amplitude
+
 !
 !-- data output
 !-------------------------------------------------------------------------------
-    dt_run_control             = 0.0,    ! output interval for run control
+    netcdf_data_format = 2,            ! output in NetCDF3 64bit offset format
 
-    data_output_pr             = 'e',
-                                 'e*',
-                                 '#theta',
+    dt_run_control          = 0.0,     ! output interval for run control
+
+! remove the following line to create output of time series 
+    dt_dots                 = 100000.0,
+
+    dt_dopr                 = 120.0,   ! For Noh et al. change to 1800.0
+
+    averaging_interval_pr   = 120.0,   ! For Noh et al. change to 600.0
+    dt_averaging_input_pr   = 10.0
+    data_output_pr          = 'e', 'e*', '#theta',
+                              'prho', 'u', 'v', 'w', 'km', 'kh', 'l',
+                              'u*2', 'v*2', 'w*2', 'theta*2', 'w*3',
+                              'wu', 'w*u*', 'w"u"',
+                              'wv', 'w*v*', 'w"v"',
+                              'w*e*', 'w*p*',
+                              'w*u*u*:dz', 'w*p*:dz', 'w"e:dz',
+
+! uncomment following lines to create some of the output that is shown in
+! the Noh et al. paper
+!    dt_data_output          = 3600.0,
+!    data_output             = 'w', 'theta',
 
 / ! end of runtime parameter namelist
+
 
 !-------------------------------------------------------------------------------
@@ -85,11 +118,28 @@
 !-------------------------------------------------------------------------------
 &ocean_parameters
-!
-!-- top boundary condition for salinity
+
+    stokes_waveheight          = 1.0      ! results in a turbulent Langmuir
+                                          ! number La = 0.45
+    stokes_wavelength          = 40.0,    ! results in a turbulent Langmuir
+                                          ! number La = 0.45
+    wave_breaking              = .F.,     ! The implemented parameterization is
+                                          ! designed for a vertical grid spacing
+                                          ! of dz = 1.25m and time steps of
+                                          ! about 4 s. It will probably fail for
+                                          ! other setups.
+                                          ! Attention:
+                                          ! For Noh et al. switch to .T.
+    surface_cooling_spinup_time = 900.0,  ! add a surface cooling only at start
+                                          ! in order to initiate turbulence
+
+    salinity                   = .TRUE.,  ! salinity switched on just for
+                                          ! testing the salinity code
+                                          ! remove this and the following two
+                                          ! parameters for simulating the
+                                          ! Noh et al. case
     bc_sa_t                    = 'neumann',
-
-!   zero salinityflux at ocean surface
-    top_salinityflux           = 0.0,
+    top_salinityflux           = 0.0,     ! zero salinityflux at ocean surface
 
 / ! end of ocean parameters
+
   ! WARNING: do not remove this blank line from the end of this file
Index: palm/trunk/TESTS/cases/oceanml/MONITORING/oceanml_rc
===================================================================
--- palm/trunk/TESTS/cases/oceanml/MONITORING/oceanml_rc	(revision 4002)
+++ palm/trunk/TESTS/cases/oceanml/MONITORING/oceanml_rc	(revision 4211)
@@ -1,10 +1,10 @@
 
  ******************************    --------------------------------------------
- * PALM 6.0  Rev: 3527M       *    ocean - run without 1D - prerun
+ * PALM 6.0  Rev: 4071        *    ocean - run without 1D - prerun
  ******************************    --------------------------------------------
 
- Date:               2018-11-15    Run:       test_oceanml__intel_default__4    
- Time:                 21:36:07    Run-No.:   00
- Run on host:        intel_defa
+ Date:               2019-09-02    Run:       oceanml                           
+ Time:                 15:36:39    Run-No.:   00
+ Run on host:           default
  Number of PEs:               4    Processor grid (x,y): (   2,   2) calculated
  ------------------------------------------------------------------------------
@@ -17,6 +17,6 @@
  --> Solve perturbation pressure via FFT using temperton-algorithm routines
      perturbation pressure is calculated at every Runge-Kutta step
- --> Momentum advection via Piascek-Williams-Scheme (Form C3) or Upstream
- --> Scalar advection via Piascek-Williams-Scheme (Form C3) or Upstream
+ --> Momentum advection via Wicker-Skamarock-Scheme 5th order
+ --> Scalar advection via Wicker-Skamarock-Scheme 5th order
  --> Loop optimization method: cache
  --> Time differencing scheme: runge-kutta-3       
@@ -29,5 +29,5 @@
  Timestep:             variable     maximum value: 20.000 s    CFL-factor: 0.90
  Start time:              0.000 s
- End time:              300.000 s
+ End time:              120.000 s
 
 
@@ -67,9 +67,4 @@
 
 
- Ocean settings:
- ------------------------------------------
-
-
-
  Boundary conditions:
  -------------------
@@ -93,5 +88,5 @@
        Predefined constant momentumflux:  u: -0.000100 m**2/s**2
                                           v:  0.000000 m**2/s**2
-       Predefined constant heatflux:    0.000000 K m/s
+       Predefined constant heatflux:    0.000102 K m/s
        Predefined constant salinityflux:    0.000000 psu m/s
 
@@ -131,17 +126,8 @@
 
 
-    1D-Profiles:
-       Output format: netCDF 64bit offset                     
-
-
-       Profile: e, e*, theta,                                                
-       Output every             ******** s
-       Time averaged over           0.00 s
-       Averaging input every        0.00 s
-
     Time series:
        Output format: netCDF 64bit offset                     
 
-       Output every                 0.00 s
+       Output every             ******** s
 
  ------------------------------------------------------------------------------
@@ -151,9 +137,9 @@
  -------------------
 
-    Geograph. latitude  :   latitude  = 55.6 degr
+    Geograph. latitude  :   latitude  = 55.0 degr
     Geograph. longitude :   longitude =  0.0 degr
     Angular velocity    :   omega  = 0.729E-04 rad/s
-    Coriolis parameter  :   f      =  0.000120 1/s
-                            f*     =  0.000082 1/s
+    Coriolis parameter  :   f      =  0.000119 1/s
+                            f*     =  0.000084 1/s
 
     Day of the year at model start :   day_init      =     172
@@ -179,15 +165,23 @@
  -----------------------------
 
-    Disturbance impulse (u,v) every :    60.00 s
-    Disturbance amplitude           :     0.03 m/s
+    Disturbance impulse (u,v) every :   ****** s
+    Disturbance amplitude           :     0.00 m/s
     Lower disturbance level         :   -28.12 m (GP   42)
     Upper disturbance level         :    -4.38 m (GP   61)
-    Disturbances cease as soon as the disturbance energy exceeds 0.000 m**2/s**2
+    Disturbances cease as soon as the disturbance energy exceeds 0.010 m**2/s**2
     Random number generator used    : random-parallel
 
 
 
- *** no user-defined variables found
-
+ *** dynamic module disabled
+
+
+
+ Ocean settings:
+ ------------------------------------------
+
+    --> Craik-Leibovich vortex force and Stokes drift switched on
+        waveheight:  1.0 m   wavelength:   40.0 m
+    --> surface heat flux is switched off after    900.0 s
  ------------------------------------------------------------------------------
 
@@ -199,19 +193,9 @@
 RUN  ITER. HH:MM:SS.SS    DT(E)     UMAX     VMAX     WMAX     U*    W*      THETA*     Z_I     ENERG.   DISTENERG    DIVOLD     DIVNEW     UMAX(KJI)    VMAX(KJI)    WMAX(KJI)   ADVECX   ADVECY   MGCYC
 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-  0      0 00:00:00.00  20.0000A   0.0228D  0.0228D  0.0124  0.000  0.00   0.000E+00      0.  0.122E-04  0.122E-04  0.270E-02  0.387E-12   53   1   6   58  26  28   47   9   8    0.000    0.000       0
-  0      1 00:00:20.00  20.0000A   0.0233  -0.0219  -0.0126  0.000  0.00   0.000E+00      0.  0.123E-04  0.122E-04  0.442E-04  0.609E-14   53   1   6   60  21  57   47  45  36    0.000    0.000       0
-  0      2 00:00:40.00  20.0000A   0.0234  -0.0224  -0.0131  0.000  0.00   0.000E+00      0.  0.123E-04  0.122E-04  0.441E-04  0.607E-14   53   1   6   57  54  38   47  45  36    0.000    0.000       0
-  0      3 00:01:00.00  20.0000A  -0.0340D  0.0331D -0.0184  0.000  0.00   0.000E+00      0.  0.248E-04  0.244E-04  0.271E-02  0.388E-12   60  53  41   58  27  28   50  31  19    0.000    0.000       0
-  0      4 00:01:20.00  20.0000A  -0.0329   0.0325  -0.0188  0.000  0.00   0.000E+00      0.  0.249E-04  0.242E-04  0.885E-04  0.122E-13   60  53  41   58  27  28   50  31  19    0.000    0.000       0
-  0      5 00:01:40.00  20.0000A   0.0315  -0.0323  -0.0188  0.000  0.00   0.000E+00      0.  0.250E-04  0.240E-04  0.879E-04  0.121E-13   49  55  35   57   1  26   50  31  19    0.000    0.000       0
-  0      6 00:02:00.00  20.0000A   0.0435D -0.0470D -0.0219  0.000  0.00   0.000E+00      0.  0.375E-04  0.360E-04  0.272E-02  0.390E-12   56  24  27   57   0  26   54  50  12    0.000    0.000       0
-  0      7 00:02:20.00  20.0000A   0.0445  -0.0456  -0.0217  0.000  0.00   0.000E+00      0.  0.374E-04  0.354E-04  0.129E-03  0.177E-13   56  24  28   57   0  26   47  26  27    0.000    0.000       0
-  0      8 00:02:40.00  20.0000A   0.0473   0.0449  -0.0218  0.000  0.00   0.000E+00      0.  0.372E-04  0.346E-04  0.127E-03  0.174E-13   56  24  28   53  53  45   47  26  27    0.000    0.000       0
-  0      9 00:03:00.00  20.0000A   0.0528D -0.0504D -0.0250  0.000  0.00   0.000E+00      0.  0.495E-04  0.463E-04  0.271E-02  0.388E-12   56  24  28   43  11  40   56  43  19    0.000    0.000       0
-  0     10 00:03:20.00  20.0000A   0.0542   0.0496  -0.0253  0.000  0.00   0.000E+00      0.  0.489E-04  0.449E-04  0.165E-03  0.223E-13   60  48   2   57   8  30   56  43  19    0.000    0.000       0
-  0     11 00:03:40.00  20.0000A   0.0528  -0.0523  -0.0253  0.000  0.00   0.000E+00      0.  0.481E-04  0.433E-04  0.160E-03  0.215E-13   60  48   3   43  10  40   55  51  57    0.000    0.000       0
-  0     12 00:04:00.00  19.6000A   0.0504D -0.0575D -0.0298  0.000  0.00   0.000E+00      0.  0.595E-04  0.539E-04  0.273E-02  0.393E-12   43  42  39   57  27  20   58  20  59    0.000    0.000       0
-  0     13 00:04:19.60  19.9000A   0.0544  -0.0566  -0.0284  0.000  0.00   0.000E+00      0.  0.581E-04  0.515E-04  0.186E-03  0.249E-13   43  42  39   57  26  20   58  20  59    0.000    0.000       0
-  0     14 00:04:39.50  19.7000A   0.0520  -0.0572  -0.0274  0.000  0.00   0.000E+00      0.  0.565E-04  0.489E-04  0.181E-03  0.241E-13   43  42  39   57  26  20   57  20  59    0.000    0.000       0
-  0     15 00:04:59.19  20.0000A  -0.0511  -0.0511  -0.0284  0.000  0.00   0.000E+00      0.  0.549E-04  0.462E-04  0.171E-03  0.226E-13   53  33   8   59  60  21   54  50  57    0.000    0.000       0
-  0     16 00:05:19.19  19.9000A   0.0559D -0.0566D -0.0341  0.000  0.00   0.000E+00      0.  0.655E-04  0.556E-04  0.272E-02  0.391E-12   58  23  33   48   9   0   54  50  57    0.000    0.000       0
+  0      0 00:00:00.00  20.0000A   0.0002D  0.0002D  0.0001  0.000  0.00   0.000E+00      0.  0.122E-08  0.122E-08  0.270E-04  0.387E-14   53   1   6   58  26  28   47   9   8    0.000    0.000       0
+  0      1 00:00:20.00  20.0000A   0.0016  -0.0002   0.0001  0.000  0.00   0.000E+00      0.  0.401E-07  0.122E-08  0.380E-06  0.423E-16   65  55  48   60  21  57   47   9   8    0.000    0.000       0
+  0      2 00:00:40.00  20.0000A   0.0032  -0.0002   0.0001  0.000  0.00   0.000E+00      0.  0.156E-06  0.122E-08  0.380E-06  0.422E-16   65  56  48   61  22  63   47   9   8    0.000    0.000       0
+  0      3 00:01:00.00  20.0000A   0.0048  -0.0003   0.0001  0.000  0.00   0.000E+00      0.  0.347E-06  0.122E-08  0.380E-06  0.421E-16   65  56  48   64  54  31   47   9   8    0.000    0.000       0
+  0      4 00:01:20.00  20.0000A   0.0063  -0.0004   0.0001  0.000  0.00   0.000E+00      0.  0.611E-06  0.122E-08  0.380E-06  0.419E-16   65  55  49   64  54  31   47   9   8    0.000    0.000       0
+  0      5 00:01:40.00  20.0000A   0.0079  -0.0005   0.0001  0.000  0.00   0.000E+00      0.  0.945E-06  0.122E-08  0.381E-06  0.417E-16   64  55  50   65  54  31   58  16  15    0.000    0.000       0
+  0      6 00:02:00.00  20.0000A   0.0094  -0.0007   0.0001  0.000  0.00   0.000E+00      0.  0.135E-05  0.122E-08  0.381E-06  0.415E-16   65  55  50   64  63  26   58  16  15    0.000    0.000       0
