! parallel_nml: MPI parallelization -------------------------------------------
&parallel_nml
 nproma                      =                          8         ! loop chunk length
 p_test_run                  =                     .FALSE.        ! .TRUE. means verification run for MPI parallelization
 num_io_procs                =              		4         ! number of I/O processors
 num_restart_procs           =                          0         ! number of restart processors
 num_prefetch_proc           =                          1         ! number of processors for lateral-boundary-cond. prefetching
 iorder_sendrecv             =                          3         ! sequence of MPI send/receive calls
 ! num_dist_array_replicas     =                         10         ! distributed arrays: no. of replications
/

! run_nml: general switches ---------------------------------------------------
&run_nml
 ltestcase                   =              	   .FALSE.         	! idealized testcase runs
 num_lev                     =                         60         	! number of full levels (atm.) for each domain
 lvert_nest                  =                      .FALSE.        	! vertical nesting
 dtime                       =                     	   5.         	! timestep in seconds
 ldynamics                   =              	    .TRUE.        	! compute adiabatic dynamic tendencies
 ltransport                  =              	    .TRUE.        	! compute large-scale tracer transport
 ntracer                     =                          5         	! number of advected tracers
 iforcing                    =              		3         	! forcing of dynamics and transport by parameterized processes (LES)
 msg_level                   =                         8         	! controls how much printout is written during runtime
 ltimer                      =                      .TRUE.       	! timer for monitoring the runtime of specific routines
 timers_level                =                          10         	! performance timer granularity
 check_uuid_gracefully  =                      .TRUE.        	! give only warnings for non-matching uuids
 output                      =                       "nml"        	! main switch for enabling/disabling components of the model output
/

! diffusion_nml: horizontal (numerical) diffusion ----------------------------
&diffusion_nml
 lhdiff_vn                   =                      .TRUE.        	! diffusion on the horizontal wind field
 lhdiff_temp                 =                      .TRUE.        	! diffusion on the temperature field
 lhdiff_w                    =                      .TRUE.        	! diffusion on the vertical wind field
 hdiff_order                 =                          5         	! order of nabla operator for diffusion
 itype_vn_diffu              =                          1         	! reconstruction method used for Smagorinsky diffusion
 itype_t_diffu               =                          2         	! discretization of temperature diffusion
 hdiff_efdt_ratio            =                         24.0       	! ratio of e-folding time to time step
 hdiff_smag_fac              =                          0.025     	! scaling factor for Smagorinsky diffusion 
 lsmag_3d			=			.TRUE.		! TRUE: 3d Smagorinsky computation of horizontal diffusion coeff. (LES<1km)
/

! dynamics_nml: dynamical core -----------------------------------------------
&dynamics_nml
 iequations                  =                          3         	! 3: non-hydrostatic; type of equations and prognostic variables
 idiv_method                 =                          1         	! method for divergence computation
 divavg_cntrwgt              =                          0.50      	! weight of central cell for divergence averaging
 lcoriolis                   =                      .TRUE.        	! Coriolis force
/

! extpar_nml: external data --------------------------------------------------
&extpar_nml
 itopo                       =              		1         	! topography (0:analytical)
 extpar_filename             =       'extpar_R3B11_CanadaI.nc'         ! filename of external parameter input file
 n_iter_smooth_topo          =                          1,1      	! iterations of topography smoother
 ! heightdiff_threshold        =                       3000.        ! height difference between neighb. grid points
 hgtdiff_max_smooth_topo     =                 750.,750.   ! see Namelist doc ????
 heightdiff_threshold        =                 2250., 1500.	! height difference between neighb. grid points
 ! itype_vegetation_cycle	=				1	! tweaks the annual cycle of LAI
/

! initicon_nml: specify read-in of initial state ------------------------------
&initicon_nml
 init_mode                  =              		7         	! start from initialized DWD analysis
 lread_ana		=			.FALSE.		! no analysis file will be read 
 dwdfg_filename             ='${FORDIR}/init_DOM01_ML_20190504T000000Z.nc'        ! initial data filename
 ltile_coldstart            =              	    .TRUE.         	! coldstart for surface tiles
 ltile_init                  =                     .TRUE.        	! set it to .TRUE. if FG data originate from run without tiles
/

! grid_nml: horizontal grid --------------------------------------------------
&grid_nml
 dynamics_grid_filename      =  ${dynamics_grid_filename}         ! array of the grid filenames for the dycore
 radiation_grid_filename     = ${radiation_grid_filename}         ! array of the grid filenames for the radiation model
 dynamics_parent_grid_id     =          0 		     	! array of the indexes of the parent grid filenames
 lredgrid_phys               =               .TRUE.        		! .true.=radiation is calculated on a reduced radiation grid
 ! lfeedback                   =                .TRUE. 	       	! specifies if feedback to parent grid is performed
 l_limited_area              =              .TRUE.         		! .TRUE. performs limited area run
 ifeedback_type              =              2	         	! feedback type (incremental/relaxation-based)
 ! start_time                  =                 0.       		! Time when a nested domain starts to be active [s]; 0. mean starting at exp. start date
/

! gridref_nml: grid refinement settings --------------------------------------
&gridref_nml
 denom_diffu_v               =                        150.        ! denominator for lateral boundary diffusion of velocity (n_dom>1)
/

! interpol_nml: settings for internal interpolation methods ------------------
&interpol_nml
 nudge_zone_width            =                          4  	! width of lateral boundary nudging zone (here: default)
 ! nudge_max_coeff		=			0.075	! maximum relaxation coefficient for lateral boundary nudging
 support_baryctr_intp        =                      .FALSE.        ! barycentric interpolation support for output ?????
 rbf_vec_scale_c             =                          0.06       ! 
 rbf_vec_scale_v             =                          0.13       ! 
 rbf_vec_scale_e             =                          0.2       ! 
 rbf_scale_mode_ll           =                          1          !2=default for automatic calculations
/

! io_nml: general switches for model I/O -------------------------------------
&io_nml
 itype_pres_msl              =                          5         	! method for computation of mean sea level pressure ?
 itype_rh                    =                          1         	! method for computation of relative humidity
 lmask_boundary              =                      .TRUE.       ! mask out interpolation zone in output
 dt_checkpoint			=			$dtrestart	! interval for writing a restart file
/
 
! limarea_nml: settings for limited area mode ---------------------------------
&limarea_nml
 itype_latbc                 =                          1         	! 1: time-dependent lateral boundary conditions
 dtime_latbc                 =              3600.         		! time difference between 2 consecutive boundary data
 latbc_boundary_grid         =   'lateral_boundary.grid.nc'         ! Grid file defining the lateral boundary
 latbc_path                  =   '${FORDIR}'         		! Absolute path to boundary data
 latbc_varnames_map_file     =            'map_file.latbc'
 latbc_filename              =  'forcing_DOM01_ML_<y><m><d>T<h>0000Z_lbc.nc'          ! boundary data input filename
 init_latbc_from_fg          =                     .FALSE.        	! .TRUE.: take lbc for initial time from first guess
/

! les_nml: settings for large eddy mode ---------------------------------
&les_nml
 smag_constant		=			0.23		! Smagorinsky constant (default)
 isrfc_type			=			1		! surface type (TERRA)
 ldiag_les_out			=			.FALSE.	! control of the statistical output in LES mode)
 les_metric			=			.TRUE.	! switch to turn on Sma. diff. with 3D metric terms to account for topography
/

! nonhydrostatic_nml: nonhydrostatic model -----------------------------------
&nonhydrostatic_nml
 iadv_rhotheta               =                          2         	! advection method for rho and rhotheta
 ivctype                     =                          2         	! type of vertical coordinate
 itime_scheme                =                          4         	! time integration scheme
 ndyn_substeps               =                          5         	! number of dynamics steps per fast-physics step
 exner_expol                 =                          0.333     	! temporal extrapolation of Exner function
 vwind_offctr                =                          0.2       	! off-centering in vertical wind solver
 ! rhotheta_offctr		=			0.0		! off-centering of density and potential temperature
 damp_height                 =                      12500.0 	! height at which Rayleigh damping of vertical wind starts
 rayleigh_coeff              =                          1.5       	! Rayleigh damping coefficient
 ! lhdiff_rcf                  =                      .TRUE.        	! .TRUE.=compute diffusion only at advection time steps
 divdamp_order               =                         24         	! order of divergence damping 
 divdamp_type                =                         3         	! type of divergence damping
 divdamp_fac                 =                          0.004     	! scaling factor for divergence damping
 l_open_ubc                  =                     .FALSE.        	! .TRUE.=use open upper boundary condition
 igradp_method               =                          3         	! discretization of horizontal pressure gradient
 l_zdiffu_t                  =                      .TRUE.        	! specifies computation of Smagorinsky temperature diffusion
 thslp_zdiffu                =                          0.02     	! slope threshold (temperature diffusion) (0.02)
 thhgtd_zdiffu               =                        125.0       	! threshold of height difference (temperature diffusion)
 htop_moist_proc             =                      22500.0   	! max. height for moist physics
 hbot_qvsubstep              =                      22500.0    	! height above which QV is advected with substepping scheme
/

! nwp_phy_nml: switches for the physics schemes ------------------------------
&nwp_phy_nml
 inwp_gscp                   =                          2         	! cloud microphysics and precipitation
 inwp_convection             =                          0         	! 1: convection, 0: off
 inwp_radiation              =                          1         	! radiation
 inwp_cldcover               =                          1         	! cloud cover scheme for radiation (LES)
 inwp_turb                   =                          5         	! vertical diffusion and transfer (LES)
 inwp_satad                  =                          1         	! saturation adjustment 
 inwp_sso                    =                          0         	! subgrid scale orographic drag (LES)
 inwp_gwd                    =                          0         	! non-orographic gravity wave drag 
 inwp_surface                =                          1         	! surface scheme TERRA
 latm_above_top              =                .TRUE.      	! take into account atmosphere above model top for radiation computation
 ldetrain_conv_prec          =                      .TRUE.	! activate detrainment of cenvective rain and snow (inwp_convection=1)
 efdt_min_raylfric           =                       7200.0       	! minimum e-folding time of Rayleigh friction
 itype_z0                    =                          2         	! type of roughness length data (EU)
 icapdcycl                   =                          3         	! apply CAPE modification to improve diurnalcycle over tropical land(inwp_convection=1)
 icpl_aero_conv              =                          1         	! coupling between autoconversion and Tegen aerosol climatology
 icpl_aero_gscp              =                          1         	! coupling between autoconversion and Tegen aerosol climatology
 lrtm_filename               =                'rrtmg_lw.nc'       ! longwave absorption coefficients for RRTM_LW
 cldopt_filename             =             'rrtm_cldopt.nc'     ! RRTM cloud optical properties
 ! mu_rain			=				0.5		! shap parameter in gamma distribution for rain
 ! rain_n0_factor		=			0.1		! tuning factor for intercept parameter of raindrop size distr.
 dt_rad                      =                         900.    	   	! time step for radiation in s
 ! dt_conv                     =                 120.,90.,90.       	! time step for convection in s (domain specific) (LES: off)
 ! dt_sso                      =               120.,360.,360.       	! time step for SSO parameterization (LES: off)
 ! dt_gwd                      =               360.,360.,360.       	! time step for gravity wave drag parameterization (LES: off)
 ! htop_moist_proc	=			??			! Height above moist physics and advection of cld. and precip. variables turned off
 ! htop_qvsubstep	=			??			! Height above QV is advected with substepping scheme
/

! nwp_tuning_nml: additional tuning parameters ---------------------------------- (LES: off?)
&nwp_tuning_nml
 itune_albedo                =                          1         	! reduced albedo (w.r.t. MODIS data) over Sahara
 tune_gkwake                 =                        1.8
 ! tune_gfrcrit		=				0.333
 tune_gkdrag                 =                        0.01
 tune_minsnowfrac            =                        0.3
 ! tune_box_liq_asy		=			2.5
 ! tune_gust_factor		=			7.25
/

! output_nml: specifies an output stream --------------------------------------
&output_nml
 filetype                    =                          4         	! output format: 2=GRIB2, 4=NETCDFv2
 dom                         =                         1        		! write for this domain
 output_bounds               =       0., 350000., 3600.        ! output: start, end, increment
 steps_per_file              =                         1         	! number of output steps in one output file
 steps_per_file_inclfirst  =  		.FALSE.		! prevent writing first two files in one
 mode                        =                          1         	! 1: forecast mode (relative t-axis), 2: climate mode (absolute t-axis)
 include_last                =                      .FALSE.        	! flag whether to include the last time step
 output_filename             =                'NWP_R3B11'      ! file name base
 filename_format             = '<output_filename>_<datetime2>_<jfile>' ! file name base
 output_grid                 =                      .TRUE.        	! flag whether grid information is added to output.
 remap                       =                          1         	! remap to regular lat/lon grid (maybe change for triangle grid)  !!!!!      
 reg_lon_def                 =              244.5,0.01,255.0	! setting regular grid points NyA: 6.5,0.01,17.0
 reg_lat_def                 =              73.75,0.01,83.75	! NyA: 74.0,0.01,84.0
 ml_varlist		=	'u','v','w','group:atmo_ml_vars','group:mode_cosmo_in','group:atmo_derived','acdnc','albdif',
'albni_dif','albnirdif_t_4','albnirdif_t_6','albuv_dif','albvisdif_t_4','albvisdif_t_6','albvisdir','alhfl_bs','alhfl_s','aqhfl_s','ashfl_s','clc','clct',
'emis_rad','fr_seaice','frac_t_4','frac_t_6','freshsnow_t_4','freshsnow_t_6','gz0_t_4','gz0_t_6','h_ice','h_snow','h_snow_si','h_snow_t_4','h_snow_t_6',
'lhfl_s_t_4','lhfl_s_t_6','lw_emiss','lwflxall','pres_ifc','pres_msl','pres_sfc','qhfl_s_t_4','qhfl_s_t_6','qv_s_t_4','qv_s_t_6','rh_2m','rho_snow_t_4',
'rho_snow_t_6','rho','shfl_s_t_4','shfl_s_t_6','snowfrac_t_4','snowfrac_t_6','sob_s_t_4','sob_s_t_6','sob_t','sodifd_s','sou_s','sou_t','sp_10m',
't_2m','t_g_t_4','t_g_t_6','t_s_t_4','t_s_t_6','t_seasfc','t_snow_si','t_snow_t_4','t_snow_t_6','tch_t_4','tch_t_6','tcm_t_4','tcm_t_6','td_2m',
'thb_s_t_4','thb_s_t_6','theta_v','thu_s','tmin_2m','tmax_2m','tot_prec','tqc','tqi','tqv','u_10m_t_4','u_10m_t_6','v_10m_t_4','v_10m_t_6','vmfl_s_t_4',
'vmfl_s_t_6','w_snow_t_4','w_snow_t_6','w_so_ice_t_4','w_so_ice_t_6','z_ifc'
/

!----------------------------------------------------------------------------
! output_nml: LES exercise;  writing boundary data for LES              ;----
!----------------------------------------------------------------------------
&output_nml
 filetype                    =				4         	! output format: GRIB2 or NETCDFv2
 dom                         =				1	        ! write output only for this domain
 output_bounds               =              0., 350000., 3600.         ! output: start, end, increment in s
 steps_per_file              =				1         	! number of output steps in one output file
 steps_per_file_inclfirst  =  		.FALSE.		! prevent writing first two files in one
 remap                       =				0         	! (no)remap to regular lat/lon grid (0 or 1)
 output_grid                 =                     .FALSE.         	! flag whether grid information is added to output.
 output_filename             =              './forcing/forcing'  ! file name base
 filename_format             = '<output_filename>_R3B11_<levtype>_<datetime2>' ! full file format
 mode                        =                          1         	! 1: forecast mode (relative t-axis), 2: climate mode (absolute t-axis)
 ml_varlist                  =              'U','V', 'W','THETA_V','RHO','TEMP','PRES','QV','QC','QI','QR','QS','Z_IFC'         ! output fields on model levels
/

!---------------------------------------------------------------------------
! output_nml: LES exercise;  writing initial data for LES              ;----
!---------------------------------------------------------------------------
&output_nml
 filetype                    =                          4         	! output format: 2=GRIB2, 4=NETCDFv2
 dom                         =                          1         	! write output only for this domain
 output_bounds               =                 0., 0., 10000.    ! output: start, end, increment in s
 steps_per_file              =                          1         	! number of output steps in one output file
 remap                       =                          0         	! remap to regular lat/lon grid (0 or 1)
 output_grid                 =                      .TRUE.        	! flag whether grid information is added to output.
 output_filename             = './forcing/init'			! file name base
 filename_format             = '<output_filename>_R3B11_<levtype>_<datetime2>' ! full output file format
 mode                        =                          1         	! 1: forecast mode (relative t-axis), 2: climate mode (absolute t-axis)
 ml_varlist                  = 'vn','w','theta_v','temp','pres','qv','qc','qi','qr','qs','alb_si','tke','t_g','t_ice','h_ice','t_mnw_lk',
                               't_wml_lk','h_ml_lk','t_bot_lk','c_t_lk','t_b1_lk','h_b1_lk','qv_s','w_i','t_so','gz0',
                               'w_so','w_so_ice','t_snow','w_snow','rho_snow','h_snow','freshsnow','fr_seaice','fr_land','z_ifc'
/

! sleve_nml: vertical level specification -------------------------------------
&sleve_nml
 min_lay_thckn               =                         20.0       	! layer thickness of lowermost layer
 ! max_lay_thckn               =                        400.0      	! maximum layer thickness below htop_thcknlimit
 ! htop_thcknlimit             =                      300.	       ! height below which the layer thickness does not exceed max_lay_thckn
 top_height                  =                      40000.0       	! height of model top
 stretch_fac                 =                          0.65       	! stretching factor to vary distribution of model levels
 decay_scale_1               =                       4000.0       ! decay scale of large-scale topography component (default)
 decay_scale_2               =                       2500.0       ! decay scale of small-scale topography component (default)
 decay_exp                   =                          1.2       	! exponent of decay function
 flat_height                 =                      16000.0       	! height above which the coordinate surfaces are flat
/

! radiation_nml: radiation scheme ---------------------------------------------
&radiation_nml
 irad_o3                     =                          7         	! ozone climatology
 irad_aero                   =                          6         	! aerosols
 albedo_type                 =                          2         	! type of surface albedo
 vmr_co2                     =                    390.e-06
 vmr_ch4                     =                   1800.e-09
 vmr_n2o                     =                   322.0e-09
 vmr_o2                      =                     0.20946
 vmr_cfc11                   =                    240.e-12
 vmr_cfc12                   =                    532.e-12
/

! transport_nml: tracer transport ---------------------------------------------
&transport_nml
 ivadv_tracer                =              3, 3, 3, 3, 3         	! tracer specific method to compute vertical advection
 itype_hlimit                =              3, 4, 4, 4, 4         	! type of limiter for horizontal transport
 ihadv_tracer                =             52, 2, 2, 2, 2         	! tracer specific method to compute horizontal advection
 llsq_svd                    =                      .TRUE.        	! use SV decomposition for least squares design matrix
/

! turbdiff_nml: turbulent diffusion -------------------------------------------
&turbdiff_nml
 tkhmin                      =                          0.75      	! scaling factor for minimum vertical diffusion coefficient
 tkmmin                      =                          0.75      	! scaling factor for minimum vertical diffusion coefficient
 pat_len                     =                        750.0       	! effective length scale of thermal surface patterns
 ! tur_len			=			500.0		! asymptotic maximal turbolent distance
 c_diff                      =                          0.2       		! length scale factor for vertical diffusion of TKE (also for LES)
 rat_sea                     =                          7.5       	! controls laminar resistance for sea surface
 ltkesso                     =                        .TRUE.      	! consider TKE-production by sub-grid SSO wakes
 frcsmot                     =                          0.2       	! these 2 switches together apply vertical smoothing of the TKE source terms (LES?)
 imode_frcsmot               =                            2       	! in the tropics (only), which reduces the moist bias in the tropical lower troposphere
 itype_sher                  =                            3       	! type of shear forcing used in turbulence
 ! itype_tran		=				??		! type of surface-atmosphere transfer (LES)
 ltkeshs                     =                        .TRUE.      	! include correction term for coarse grids in hor. shear production term
 a_hshr                      =                          2.0       	! length scale factor for separated horizontal shear mode (LES?)
 ! a_stab			=				??		! factor of stability corr. of turb. length scale (LES?)
 icldm_turb                  =                            1       	! mode of cloud water representation in turbulence; 0=off (LES?)
 ! icldm_tran		=				0		! same for transfer layer (LES?)
 ! q_crit			=				1.6		! critical value for normalized supersaturation (default: 1.6) (LES?)
 ! imode_tkesso		=				1		! mode of calculation the SSO source term for TKE production
 ! a_hshr			=				??		! length scale factor for separated horiz. shear mode (LES?)
 ! lexpcor			=				??		! explicit corr. of implicitly calc. vert. diff. of non-conservative scalars
 ! alpha0			=				??		! lower bound velocity-dependent Charnock parameter (LES?)
/

! lnd_nml: land scheme switches -----------------------------------------------
&lnd_nml
 ntiles                      =                          	3     		! number of tiles
 nlev_snow                   =                          3         	! number of snow layers
 lmulti_snow                 =                      .FALSE.       	! .TRUE. for use of multi-layer snow model
 idiag_snowfrac              =                         20         	! type of snow-fraction diagnosis
 lsnowtile                   =                       .TRUE.       	! .TRUE.=consider snow-covered and snow-free separately
 itype_root                  =                          2         	! root density distribution
 itype_heatcond              =                          3         	! type of soil heat conductivity
 itype_lndtbl                =                          4         	! table for associating surface parameters
 itype_evsl                  =                          4         	! type of bare soil evaporation
 itype_root                  =                          2         	! root density distribution
 cwimax_ml                   =                      5.e-4         	! scaling parameter for max. interception storage
 c_soil                      =                       1.75         	! surface area density of the evaporative soil surface
 c_soil_urb                  =                        0.5         	! same for urban areas
 lseaice                     =                      .TRUE.        	! .TRUE. for use of sea-ice model
 llake                       =                      .TRUE.        	! .TRUE. for use of lake model
 ! itype_snowevap	=				2		! snow evap. in vegetated areas with add. vaiables for snow age and max. snow height
 ! itype_trvg		=				3		! BATS scheme with add. prog. var. for integr. plant transpiration since sunrise
 ! sstice_mode		=				2		! 2: SST is updated on a daily basis by climatological increments
 /

