!
&coupling_mode_nml
  coupled_mode               = .TRUE.
/
&parallel_nml
 nproma                      = 48
 num_io_procs                = 0
 num_prefetch_proc           = 0
 pio_type                    = 0
 p_test_run                  = .FALSE.
 l_fast_sum                  = .TRUE.
/
&grid_nml
 dynamics_grid_filename      = "icon_grid_0036_R02B04_O.nc"
 use_dummy_cell_closure      = .TRUE.
 use_duplicated_connectivity = .FALSE.
/
&dynamics_nml
 iequations                  = -1                               ! -1: hydrost. ocean model
/
&run_nml
 modelTimeStep               = "PT60M"
 output                      = 'nml'                            ! namelist controlled output scheme
 activate_sync_timers        = .TRUE.
 profiling_output            = 1                                ! aggregated: 1; detailed: 2; in files: 3
 msg_timestamp               = .FALSE.
 timers_level                = 10
 debug_check_level           = 1
 restart_filename            = "ler0613_restart_oce_<rsttime>.nc"
/
 &output_nml
  filetype         =  5                               ! output format: 2=GRIB2, 4=NETCDFv2, 5=NETCDFv4
  output_filename  = "ler0613_oce_fx"
  filename_format  = "<output_filename>_<datetime2>"
  output_start     = "1000-01-01T00:00:00Z"                  ! start date in ISO-format
  output_end       = "1000-01-01T00:00:00Z"                  ! end date in ISO-format
  output_interval  = "P1M"         ! interval in ISO-format
  file_interval    = "P10Y"           ! interval in ISO-format
  output_grid      = .TRUE.
  mode             =  2                               ! 1: forecast mode (relative t-axis); 2: climate mode
  include_last     = .false.
  ml_varlist       =  'wet_c','basin_c','regio_c','lsm_ctr_c'
/
&output_nml
  filetype                   = 5
  output_filename            = "ler0613_oce_def"
  filename_format            = "<output_filename>_<datetime2>"
  output_start               = "1000-01-01T00:00:00Z"                  ! start in ISO-format
  output_end                 = "1500-01-01T00:00:00Z"                    ! end in ISO-format
  output_interval            = "P1Y"     ! interval in ISO-format
  file_interval              = "P10Y"
  mode                       = 1                                ! 1: forecast mode (relative t-axis)
                                                                ! 2: climate mode (absolute t-axis)
  include_last               = .FALSE.
  output_grid                = .FALSE.
  filename_format            = "<output_filename>_<datetime2>"
  operation                  = "mean"
  ml_varlist                 = 'group:oce_default', 'group:oce_essentials'
/

&output_nml
  output_start     = "1000-01-01T00:00:00Z"                  ! start date in ISO-format
  output_end       = "1500-01-01T00:00:00Z"                    ! end date in ISO-format
  output_interval  = "P1M"         ! interval in ISO-format
  file_interval    = "P10Y"           ! interval in ISO-format
  mode             =  1                               ! 1: forecast mode (relative t-axis), 2: climate mode (absolute t-axis)
  operation        = 'mean'                           ! mean over output interval
  output_grid      = .TRUE.
  output_filename  = "ler0613_oce_ice"
  filename_format  = "<output_filename>_<datetime2>"
  filetype         =  5                               ! output format: 2=GRIB2, 4=NETCDFv2, 5=NETCDFv4
  m_levels         = "1...3,9,23,30,34"               ! surface and some subsurface levels only
  ml_varlist       =  'draftave','hi','hs','conc','to','so'
/
&output_nml
  filetype                   = 4
  output_filename            = "ler0613_oce_mon"
  filename_format            = "<output_filename>_<datetime2>"
  output_start               = "1000-01-01T00:00:00Z"                  ! start in ISO-format
  output_end                 = "1500-01-01T00:00:00Z"                    ! end in ISO-format
  output_interval            = "P1M"
  file_interval              = "P10Y"
  mode                       = 1                                ! 1: forecast mode (relative t-axis)
                                                                ! 2: climate mode (absolute t-axis)
  include_last               = .FALSE.
  output_grid                = .FALSE.
  filename_format            = "<output_filename>_<datetime2>"
  operation                  = "mean"
  ml_varlist                 = 'group:ocean_monitor'
/
&output_nml
  filetype                   = 5
  output_filename            = "ler0613_oce_moc"
  filename_format            = "<output_filename>_<datetime2>"
  output_start               = "1000-01-01T00:00:00Z"                  ! start in ISO-format
  output_end                 = "1500-01-01T00:00:00Z"                    ! end in ISO-format
  output_interval            = "P1M"
  file_interval              = "P10Y"
  mode                       = 1                                ! 1: forecast mode (relative t-axis)
                                                                ! 2: climate mode (absolute t-axis)
  include_last               = .FALSE.
  output_grid                = .FALSE.
  filename_format            = "<output_filename>_<datetime2>"
  operation                  = "mean"
  ml_varlist                 = 'group:ocean_moc'
/

&output_nml
  filetype         =  5                               ! output format: 2=GRIB2, 4=NETCDFv2, 5=NETCDFv4
  output_filename  = "ler0613_oce_dbg"
  filename_format  = "<output_filename>_<datetime2>"
  output_start     = "1000-01-01T00:00:00Z"                  ! start date in ISO-format
  output_end       = "1500-01-01T00:00:00Z"                    ! end date in ISO-format
  output_interval  = "P1M"         ! interval in ISO-format
  file_interval    = "P10Y"           ! interval in ISO-format
  output_grid      = .TRUE.
  mode             =  1                               ! 1: forecast mode (relative t-axis); 2: climate mode
  operation        = 'mean'                           ! mean over output interval
  include_last     = .false.
  m_levels         = "1,2"                            ! surface and subsurface level only
  filename_format  = "<output_filename>_<datetime2>"
  ml_varlist       =  'Qtop', 'Qbot','Qbot_slow', 'zHeatOceI','heatOceI','heatOceW','draftave','zUnderIce',
                      'mld','condep','zos','u_vint','hi','hs','conc','to','so','u',
                      'HeatFlux_Total','atmos_fluxes_HeatFlux_ShortWave','atmos_fluxes_HeatFlux_LongWave',
                      'HeatFlux_ShortWave','HeatFlux_LongWave','HeatFlux_Sensible','HeatFlux_Latent',
                      'FrshFlux_Runoff','FrshFlux_Precipitation','FrshFlux_Evaporation','FrshFlux_SnowFall',
                      'FrshFlux_TotalOcean','FrshFlux_VolumeIce','totalsnowfall','Wind_Speed_10m'
/
&dbg_index_nml
  idbg_mxmn                  = 1                                ! initialize MIN/MAX  debug output
  idbg_val                   = 0                                ! initialize one cell debug output
  idbg_slev                  = 1                                ! initialize start level for debug output
  idbg_elev                  = 2                                ! initialize end level for debug output
  dbg_lat_in                 = 30.0                             ! latitude location of one cell debug output
  dbg_lon_in                 = -30.0                            ! longitude location of one cell debug output
  str_mod_tst                ='oceanCouplng'                    ! define modules to print out in debug mode
  !str_mod_tst                = 'all'                            ! define modules to print out in debug mode
/
&ocean_dynamics_nml
! 40 unevenly spaced levels used by MPIOM/GR30
 n_zlev         =   40
 dzlev_m(1:40)  =   12.0,   10.0,   10.0,   10.0,   10.0,   10.0,   13.0,   15.0,   20.0,   25.0,
                    30.0,   35.0,   40.0,   45.0,   50.0,   55.0,   60.0,   70.0,   80.0,   90.0,
                   100.0,  110.0,  120.0,  130.0,  140.0,  150.0,  170.0,  180.0,  190.0,  200.0,
                   220.0,  250.0,  270.0,  300.0,  350.0,  400.0,  450.0,  500.0,  500.0,  600.0
  l_edge_based                               = .FALSE.          ! edge- or cell-based mimetic discretization
! l_partial_cells                            = .FALSE.          ! partial bottom cells=TRUE: local varying bottom depth
  select_solver                              = 4       ! 1=gmres_oce_old; 2=ocean_restart_gmres, 3=mixed precisison restart 
                                                       ! 4=CG (default) 5=CGJ 6=BiCG 7=GMRES restart (legacy) 8=MINRES
  use_absolute_solver_tolerance              = .TRUE.
  solver_tolerance                           = 1.0E-13 ! this may further be reduced
  solver_FirstGuess                          = 2       ! 0=start from zeros 1=last timestep smoothed 2=last timestep (default) 

! solver_tolerance                           = 7.5E-14     ! old value
! solver_max_iter_per_restart                = 19          ! old value
! solver_max_restart_iterations              = 100         ! outer (restart solver)

  fast_performance_level                     = 200         ! performance level 12: for cell-based; 5: default
  use_continuity_correction                  = .TRUE.      ! height adjustment according to vertical velocity in dynamics
  cfl_check                                  = .FALSE.
  cfl_write                                  = .FALSE.

  i_bc_veloc_top                             = 1
  i_bc_veloc_bot                             = 1           ! 0: (def) bottom friction off, 1: on
/
&ocean_tracer_transport_nml
  flux_calculation_horz                      = 5           ! 1=upwind, 2=central, 3=Lax-Friedrichs,
                                                           ! 4=Miura, 5=FCT with Zalesak limiter (default)
  flux_calculation_vert                      = 7           ! 6=adpo; 7=upwind biased ppm (default); 8=FCT with zalesak limiter
  ! define low and high order methods to be used in
  ! horizontal flux corrected transport methods
  ! (flux_calculation_horz=4,5)
  fct_low_order_flux                         = 1           ! horizontal low  order method: 1=upwind (def), no other implemented
  fct_high_order_flux                        = 5           ! horizontal high order method: 1=upwind, 2=central, 3=lax_friedrichs, 4=miura_order1
  fct_limiter_horz                           = 100         ! zalesak
/
&ocean_horizontal_diffusion_nml
  laplacian_form                             = 1           ! 1=curlcurl-graddiv
  VelocityDiffusion_order                    = 1           ! 21=biharmonic+laplacian (for the laplacian leith)
                                                           !
!  BiharmonicViscosity_scaling                = 1
!  BiharmonicViscosity_reference              = 1.0E15      ! [m2/s] constant horizontal viscosity coefficient for velocity
!  BiharmonicViscosity_background             = 0.0         ! [m2/s] constant horizontal viscosity coefficient for velocity

  HarmonicViscosity_scaling                  = 1
  HarmonicViscosity_reference                = 5.0E+4      ! [m2/s] constant horizontal viscosity coefficient for velocity
  HarmonicViscosity_background               = 0.0  

  TracerHorizontalDiffusion_scaling          = 1
  Temperature_HorizontalDiffusion_Background = 0.0
  Temperature_HorizontalDiffusion_Reference  = 0
  Salinity_HorizontalDiffusion_Background    = 0.0
  Salinity_HorizontalDiffusion_Reference     = 0
/
&ocean_vertical_diffusion_nml
  PPscheme_type                              = 4
  velocity_VerticalDiffusion_background      = 5.0E-5      ! [m2/s]  vertical background viscosity coefficient for velocity
  temperature_VerticalDiffusion_background   = 5.0E-5      ! [m2/s]  vertical background diffusion coefficient for temperature
  salinity_VerticalDiffusion_background      = 5.0E-5      ! [m2/s]  vertical background diffusion coefficient for salinity
  tracer_convection_MixingCoefficient        = 0.1         ! max vertical tracer diffusion for convection used in case of instability
  convection_InstabilityThreshold            = -1.0E-6     ! used in update_ho_params - default=-5e-8
  richardsonDiffusion_threshold              = 0.0         ! used in update_ho_params - default=+5e-8
  tracer_RichardsonCoeff                     = 2.0E-3      ! factor for vertical diffusion coefficient in PP scheme
  velocity_RichardsonCoeff                   = 2.0E-3      ! factor for vertical viscosity coefficient in PP scheme
  bottom_drag_coeff                          = 3.0E-3      ! default=2.5E-3; active for i_bc_veloc_bot=1
  use_wind_mixing                            = .TRUE.      ! TRUE: use wind mixing scheme in MPIOM-type pp-scheme
  lambda_wind                                = 0.03
  tracer_TopWindMixing                       = 1.0E-5
  velocity_TopWindMixing                     = 1.0E-5
/
&ocean_GentMcWilliamsRedi_nml
  GMRedi_configuration                       = 1           ! 0=cartesian diffusion; 1=GM-Redi: bolus advection + isopycnal diffusion
  tapering_scheme                            = 1
  GMRedi_usesRelativeMaxSlopes               = .FALSE.
  S_max                                      = 1.0e-5      ! 1.0
  S_d                                        = 1.0e-4      ! 5e-3 to 5e-4
                                                           !
  k_tracer_GM_kappa_parameter                = 800.0      !
  k_tracer_isoneutral_parameter              = 800.0      ! value for cell-based cartesian diffusion - mpiom: 1000/400km = 400/160km
  k_tracer_dianeutral_parameter              = 0.0         ! 1.0E-5  !
                                                           !
  switch_off_diagonal_vert_expl              = .TRUE.
  gmredi_combined_diagnostic                 = .FALSE.
! switch_on_redi_balance_diagnostic          = .FALSE.     ! not yet available in icon-aes-dyamond++
  revert_vertical_recon_and_transposed       = .TRUE.
  slope_calc_via_temperture_salinity         = .TRUE.
  include_slope_squared_implicit             = .TRUE.      ! think of l_with_vert_tracer_diffusion
  switch_on_tapering_horizontal_diffusion    = .TRUE.
/
&ocean_physics_nml
  i_sea_ice                                  = 1           ! 0 = no sea ice; 1 = sea ice model on; default=1
  lhamocc                                    = .FALSE.
  lbgcadv                                    = .FALSE.
/                                           
&sea_ice_nml
  i_ice_therm                                = 1           ! 1=zero-layer (default), 2=Winton, 0/2: not allowed
  i_ice_dyn                                  = 1           ! 1/0=switch on/off AWI ice dynamics
! i_Qio_type                                 = 3           ! 3 (default): energy of whole grid-area used for melting (MPIOM-type)
! use_constant_tfreez                        = .TRUE.      ! default: TRUE
! use_no_flux_gradients                      = .FALSE.     ! default: TRUE
 leadclose_1                                = 0.25        ! default: 0.5 - value of MPIOM: 0.25
 leadclose_2n                               = 0.666       ! default: 0.0 - value of MPIOM: 2/3
/
&ocean_forcing_nml
  iforc_oce                                  = 14          ! ocean forcing: 14 from coupling via YAC
  type_surfRelax_Temp                        = -1          ! -1: use net surface heat flux from atmosphere
                                                           !  0: no relaxation used
                                                           !  1: relaxation switched on for reading (init_oce_relax=1)
                                                           !     or some testcases only
  forcing_enable_freshwater                  = .TRUE.      ! enable/disable freshwater flux
  forcing_windstress_u_type                  = 2           ! 0: zero wind stress, 1: read from file, 2: none
  forcing_windstress_v_type                  = 2           ! 0: zero wind stress, 1: read from file, 2: none
                                                           ! salt-change due to internal fluxes only
  limit_seaice                               = .TRUE.      ! default: TRUE
  seaice_limit                               = 0.8         ! hard limit set to 80% of upper layer for sea ice
  lfix_salt_content                          = .TRUE.
  limit_elevation                            = .FALSE.     ! true: adjust daily to zero, default=false: free surface
! lswr_jerlov                                = .FALSE.     ! SW-penetration (Jerlov-radiation, default=T)
/
&ocean_initialConditions_nml
  initial_salinity_type                      = 1                ! 0: none, 1: read S from initial_state.nc
  initial_temperature_type                   = 1                ! 0: none, 1: read T from initial_state.nc
  initialize_fromRestart                     = .FALSE.
/
&ocean_diagnostics_nml
  diagnostics_level                          = 1
  diagnose_for_horizontalVelocity            = .FALSE.
  diagnose_for_heat_content                  = .TRUE.
/
&io_nml
  restart_file_type                          = 5
  write_last_restart                         = .TRUE.
! restart_write_mode                         = "joint procs multifile"  ! not yet available in ocean model
! lnetcdf_flt64_output = .TRUE.                                 ! 64 bit output in all files
  lkeep_in_sync                              = .TRUE.           ! sync after each timestep
/
