!
&coupling_mode_nml
  coupled_mode               = .TRUE.
/
&parallel_nml
 nproma                      = 16
 num_io_procs                = 0
 num_prefetch_proc           = 0
 pio_type                    = 0
 p_test_run                  = .FALSE.
 l_fast_sum                  = .FALSE.
/
&grid_nml
 dynamics_grid_filename      = "icon_grid_0035_modsills_R02B06_O.nc"
 use_dummy_cell_closure      = .TRUE.
 use_duplicated_connectivity = .FALSE.
/
&dynamics_nml
 iequations                  = -1                               ! -1: hydrost. ocean model
/
&run_nml
 modelTimeStep               = "PT30M"
 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            = "slo1325_restart_oce_<rsttime>.nc"
/
 &output_nml
  filetype         =  5                               ! output format: 2=GRIB2, 4=NETCDFv2, 5=NETCDFv4
  output_filename  = "slo1325_oce_fx"
  filename_format  = "<output_filename>_<datetime2>"
  output_start     = "4700-01-01T00:00:00Z"                  ! start date in ISO-format
  output_end       = "4700-01-01T00:00:00Z"                  ! end date in ISO-format
  output_interval  = "P1M"         ! interval in ISO-format
  file_interval    = "P20Y"           ! 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            = "slo1325_oce_def"
  filename_format            = "<output_filename>_<datetime2>"
  output_start               = "4700-01-01T00:00:00Z"                  ! start in ISO-format
  output_end                 = "4900-01-01T00:00:00Z"                    ! end in ISO-format
  output_interval            = "P1Y"     ! interval in ISO-format
  file_interval              = "P20Y"
  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'
/

&output_nml
  output_start     = "4700-01-01T00:00:00Z"                  ! start date in ISO-format
  output_end       = "4900-01-01T00:00:00Z"                    ! end date in ISO-format
  output_interval  = "P1M"         ! interval in ISO-format
  file_interval    = "P20Y"           ! 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  = "slo1325_oce_ice"
  filename_format  = "<output_filename>_<datetime2>"
  filetype         =  5                               ! output format: 2=GRIB2, 4=NETCDFv2, 5=NETCDFv4
  m_levels         = "1...28"                         ! upper 500m
  ml_varlist       =  'mld','condep','draftave','hi','hs','conc','to','so','ice_u','ice_v'
/
&output_nml
  filetype                   = 4
  output_filename            = "slo1325_oce_mon"
  filename_format            = "<output_filename>_<datetime2>"
  output_start               = "4700-01-01T00:00:00Z"                  ! start in ISO-format
  output_end                 = "4900-01-01T00:00:00Z"                    ! end in ISO-format
  output_interval            = "P1M"
  file_interval              = "P20Y"
  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            = "slo1325_oce_moc"
  filename_format            = "<output_filename>_<datetime2>"
  output_start               = "4700-01-01T00:00:00Z"                  ! start in ISO-format
  output_end                 = "4900-01-01T00:00:00Z"                    ! end in ISO-format
  output_interval            = "P1M"
  file_interval              = "P20Y"
  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  = "slo1325_oce_dbg"
  filename_format  = "<output_filename>_<datetime2>"
  output_start     = "4700-01-01T00:00:00Z"                  ! start date in ISO-format
  output_end       = "4900-01-01T00:00:00Z"                    ! end date in ISO-format
  output_interval  = "P1M"         ! interval in ISO-format
  file_interval    = "P20Y"           ! 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',
                      'atmos_fluxes_stress_x','atmos_fluxes_stress_y',
                      'atmos_fluxes_stress_xw','atmos_fluxes_stress_yw'
/
&dbg_index_nml
  idbg_mxmn                  = 0                                ! 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
 n_zlev         =   64
! 64 unevenly spaced levels, updated by Leonidas/Helmuth 201906
 dzlev_m(1:64)  =  12,  10,  10,  10,  10,  10,  10,  10,  10,  10, 
                   11,  12,  13,  14,  15,  16,  17,  18,  20,  22, 
                   24,  26,  28,  30,  32,  35,  38,  41,  45,  49, 
                   53,  58,  62,  66,  71,  75,  80,  85,  91,  97, 
                  104, 111, 118, 125, 132, 138, 145, 152, 160, 167, 
                  175, 182, 188, 195, 201, 208, 213, 219, 224, 230, 
                  235, 241, 250, 260
  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-10     ! 1e-10 in omip-YVF - 1e-13 necessary?
  l_lhs_direct                               = .TRUE.      ! .true.= use lhs implementation directly  .false.= matrix scanner (default) 
  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                    = 2           ! 1=laplacian (def); 2=biharmonic; 21=biharmonic+laplacian (for the laplacian leith)
                                                           !
  BiharmonicViscosity_scaling                = 1
  BiharmonicViscosity_reference              = 3.5E12      ! enhanced value (old: 1e12, def: 0)
  BiharmonicViscosity_background             = 0.0         ! [m2/s] constant horizontal viscosity coefficient for velocity

  HarmonicViscosity_scaling                  = 1
  HarmonicViscosity_reference                = 0.0         ! [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
  vert_mix_type                              = 2           ! 1: PP; 2: TKE
  PPscheme_type                              = 0           ! 4: current PPscheme - 0: switched off
  velocity_VerticalDiffusion_background      = 5.0E-5      ! [m2/s]  vertical background viscosity coefficient for velocity
  temperature_VerticalDiffusion_background   = 1.0E-5      ! [m2/s]  vertical background diffusion coefficient for temperature
  salinity_VerticalDiffusion_background      = 1.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
  tracer_TopWindMixing                       = 2.31480E-6  ! eqals 0.5e-3 m2s-1 (MPIOM)
  velocity_TopWindMixing                     = 2.31480E-6
  ! cvmix/tke parameters
  c_k        = 0.1
  c_eps      = 0.7
  alpha_tke  = 30.0
  mxl_min    = 1.d-8
  kappaM_min = 0.0
  kappaM_max = 100.0
  cd         = 3.75
  tke_min    = 1.d-6
  tke_mxl_choice = 2
  tke_surf_min = 1.d-4
  only_tke = .true.
  use_ubound_dirichlet = .false.
  use_lbound_dirichlet = .false.
/
&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-3      ! 1.0
  S_d                                        = 1.0e-4      ! 5e-3 to 5e-4
                                                           !
  k_tracer_GM_kappa_parameter                =  400.0      !
  k_tracer_isoneutral_parameter              =  400.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
/                                           
&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)
  albedoW_sim                                = 0.10        ! albedo of the ocean used in sea ice model
  leadclose_1                                = 0.5         ! default: 0.5 - value of MPIOM: 0.25
  leadclose_2n                               = 0.666       ! default: 0.0 - value of MPIOM: 2/3
  !pstar                                      = 40000.      ! default: 27500.; MPIOM=20000.
  therm_conduct_snow                         = 0.7         ! default: ks=0.31
  !therm_conduct_ice                          = 2.4         ! default: ki=2.1656
  !therm_emiss                                = 0.97        ! default: zemiss_def=0.996
/
&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
  limit_elevation                            = .FALSE.     ! true: adjust daily to zero, default=false: free surface
  lswr_jerlov                                = .TRUE.      ! use jerlov water types for sw absorption (default=T)
  jerlov_atten                               = 0.08        ! jerlov water type IB
  jerlov_bluefrac                            = 0.36        ! jerlov water type IB
                                                           ! parameters for salt content conservation
  lfix_salt_content                          = .true.      ! fix global ocean+ice salt content to constant (def=F)
  !surface_flux_type                          = 1           ! 1: apply_surface_fluxes_slo (def), 2: apply_surface_fluxes (Vladimir L.)
  !lcheck_salt_content                        = .false.     ! diagnostic output of salt content (def=F)
  !limit_seaice                               =  .true.     ! use seaice limiter
  !limit_seaice_type                          = 1           ! 1: ice_thickness_limiter (def), 2: ice_thickness_limiter_hh (H. Haak)
/
&ocean_initialConditions_nml
  initial_salinity_type                      = 0           ! 0: none, 1: read S from initial_state.nc
  initial_temperature_type                   = 0           ! 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.      ! T: add heat content to monitoring
/
&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
/
