&gridnl

nelx  = 10,
nely  = 10,
nelz  = 10,
nop   = 4,        
xdims = 0,1000.0
ydims = 0,1000.0
ztop  = 1000.0
        !Dimension of the domain: (x,y) in (min,max); z in (0,ztop)	
x_boundary = 4, 4 !Front and Back (x=-1 and x=+1)
y_boundary = 4, 4 !Left and Right (y=-1 and y=+1)
z_boundary = 4, 4 !Bottom and Top (z=-1 and z=+1)
	   !These denote constant x,y, or z. 
	   !E.g. z_boundary(1) is the bottom and z_boundary(2) is the top
	   !BCs are: 0=do nothing; 10=Dirichlet; 3=periodic; 4=NFBC; 6=NRBC 
	   !(see MOD_GLOBAL_GRID for more info)
geometry_type='cube', 
		      !cube=3D Box; 
		      !sphere_hex=spherical cubed-sphere domain; 
		      !sphere_ico=spherical icosahedral domain

decomp_type='geom1',   
			!metis3d=3D metis partitioning; 
			!metis2d=2D metis partitioning; 
			!nseam=geometric for cubed-sphere; 
			!geom1=geometric along X for Cube/Cartesian grid
			!geom2=geometric along XY for Cube/Cartesian grid
			!geom3=geometric along XYZ for Cube/Cartesian grid
			!geom4=geometric along XYZ (nproc_z controls Z direction) for Cube/Cartesian grid
			!geom5=geometric along Y for Cube/Cartesian grid
			!geom6=geometric along YZ for Cube/Cartesian grid
			!geom7=geometric along XZ for Cube/Cartesian grid

nproc_z = 2,
			!Only used with GEOM4: it controls the decomposition along z. Along XY, it
			!will use the square root of nproc/nproc_z
/

&static_database_nl
use_landuse = .true.
use_landmask = .true.
use_terrain = .true.
use_georeference = .true.
/

&physics_nl
mixing_method=0,
		!=0; no sub-gridscale mixing
		!=1; 1st order closure sub-gridscale mixing (Lilly-Smagorinsky)
surface_fluxes = .false.
/

&convect_nl
run_shallow_q = .false.
/

&radiation_nl
run_shortwave = .false.     ! call the shortwave radiation
run_longwave  = .false.     ! call the longwave radiation
time_sw = 1.0               ! time interval for calling shortwave (s) (not used currently)
time_lw = 1.0               ! time interval for calling longwave (s) (not used currently)
timeofday = 12.             ! local time (hours, 0-24, 12=noon) 
juldati = 18.0              ! julian date (0-360/361)
reflat = 10.0               ! ref latitude (degrees)
/

&input
dt= 0.1,
time_initial = 0,
time_final   = 0.1,
time_restart = 100,
icase=21,   
	   !case0=advection; 
	   !case1 = igw; 
	   !case2=rtb; 
	   !case20=large rtb; 
	   !case200=rtb with tracer; 
	   !case21=3D bubble; 
	   !case3=2d dc; 
	   !case31=3d dc; 
	   !case4=2d lhm (ridge, x-direction); 
	   !case40=2d Nonlinear large Mountain (ridge, x-direction); 
	   !case41=3D Linear Mountain; 
	   !case42=2d lhm (ridge, y-direction); 
	   !case43=3D NonLinear Mountain; 
	   !case5=3D bubble on Sphere; 
	   !case6=Baroclinic Instability on Sphere; 
	   !case7=Baroclinic Instability in Channel: Balanced State
	   !case71=Baroclinic Instability in Channel: Perturbed State
	   !case8=Acoustic Wave on Sphere
	   !case9=Gravity Wave on Sphere
	   !case1000=Shallow Cumulus Case
ti_method = 'ark3', 
	      !rk; (RK method of order KSTAGES)
	      !rk35; (Optimized RK35)
	      !am2; (am2 with ab3)
	      !bdf22; (bdf2 with 2nd order explicit scheme)
	      !bdf23; (bdf2 with 3rd order explicit scheme)
	      !bdf3;  (bdf3 with 3rd order explicit scheme)
		  !lf2;
		  !ark2a; (2nd order 2-stage method, 1-stage implicit)
		  !ark2s; (2nd order 2-stage method, 1-stage implicit)
 		  !ark2o; (Original 2nd order 3-stage method, 1-stage implicit)
 		  !ark2n; (New 2nd order 3-stage method, 1-stage implicit)
 		  !ark3; 
 		  !ark4; 
 		  !ark5 
si_method = 'no_schur', 
	    	!schur; 
	    	!no_schur
si_dimension = '3d', 
	       	     !1d IMEX in the vertical/radial direction; 
	       	     !3d IMEX
Iter_Type = 'GMRES', ! = 'GMRES' means run MGS-based GMRES
	    	     ! = 'PROJ' means run MGS-based GMRES + Projection
                     ! = 'CHEBY' means run Chebyshev (dot-product free)
                     ! = 'BICGS' means run stabilized BiCG method (TBD)
                     ! = 'RICHA' means run Richardson Extrapolation
Proj_Size=30, !=Number of Maximum Projection vectors: Only works for 
	      !Iter_Type=PROJ
Focal_Dist_Adj = 0.981, ! Used only by Chebyshev method and 
                        ! adjusts elliptical hull focal distance
                        ! to obtain optimal convergence rate
precon_mode = 'SKIP', 
	    	     ! = 'SKIP' means do not build and do not apply (means precon_order=0)
	    	     ! = 'BUILD' means:
                     !           1) compute max/min eigVals and precon coeffs,
                     !           2) save above data to file, and abort run.
                     ! = 'APPLY' means read above data and run model.
                     ! = 'BOTH' means BUILD and APPLY w/o stopping model
precon_order = 0,      ! = 0 means no preconditioner is made/read
		     ! > 0 mean precon K = p(A) where p is a polynomial
                     !     of the order shown and of the type specified below:
precon_type = 'S',     ! S = spectrally-optimized polynomial coefficients
                     ! N = Neumann polynomial coefficients   
                     ! C = Chebyshev polynomial coefficients   
PBNO_pNorm =  4,     ! sets p-norm exponent (used in with precon_type = S)
Imag_Wt = 1.0e0,     ! Imag Component weight factor (used only with p-norm)   
Hmat_Size = 150,     ! Size of Hessenberg matrix used to estimate system spectrum 

lf2_filter=0., !LF2 Robert-Asselin Filter
lf2_alpha=0.5,  !LF2 Off-Centering (0.5 is fully centered)
kstages=5,
solver_type = 'direct',
	        !=direct uses a direct solver for SI_DIMENSION=1D and SI_METHOD=SCHUR form
	        !=iterative uses an iterative solver for SI_DIMENSION=1D and SI_METHOD=SCHUR form
solver_tol=1e-10,
	        !=1e-2 for IMEX-3D
	        !<=1e-9 for IMEX-1D (e.g., case 21 and case 7)
gamma1=+1, 
	   !-1=relative residual (works best for No Schur); 
	   !+1=absolute residual (works best for Schur)
delta=1, 
	 !-1=No Semi-implicit; 
	 !0=No Semi-implicit but go through algorithm anyway (for debugging); 
	 !1=Semi-Implicit
xmu=0e-2,
ifilter=-1,
filter_weight_type='erf',
filter_basis_type='modal',
fname_root='new_case21_visc=0.1',
out_type='nc',   
		  !gks2d=ascii 2d slice; 
	       	  !gks3d=ascii 3d output; 
	       	  !nc=netcdf 3d output; 
	       	  !vtk=Visual ToolKit (Paraview) output
	       	  !none=No Output
visc=0.1,
visc_dd=0e4, !divergence damping
nlaplacian=1,
iadapt_timestep=0,
		!=1: adapt DT automatically based on stability conditions of each TI
		!=0: use given DT
lprint_diagnostics=T, 
			   !T=true=print diagnostics
			   !F=false=do NOT print diagnostics
lphysics=F, 
			   !T=true=Turn ON PHYSICS
			   !F=false=Turn OFF PHYSICS
/
