4. Running h-NUMO

4.1. Setting up the Workspace

Once you have successfully compiled h-NUMO, we recommend the following steps to running h-NUMO.

  1. In the home/root directory create a directory called tests. Inside tests create another directory for a specific simulation (for example, let’s call it bump.

  2. Inside of bump copy numa3d.in.bump from input_files and rename it numa3d.in.

  3. Inside of bump copy one of the run_numo3d from run_scripts. Make sure that the other batch submission commands make sense.

4.1.1. Input file: numo3d.in

 1&gridnl
 2nelx  = 10,
 3nely  = 10,
 4nopx  = 4,
 5nopy  = 4,
 6xdims = 0.0,2e3,
 7ydims = 0.0,2e3,
 8nlayers = 2,
 9
10!P4est Input
11refinement_levels_h = 0, !refinement levels in horizontal
12
13lread_external_grid=F, ! Read external grid file
14
15!Dimension of the domain: (x,y) in (min,max); z in (0,ztop)	
16x_boundary = 4, 4 !Front and Back (x=-1 and x=+1)
17y_boundary = 4, 4 !Left and Right (y=-1 and y=+1)
18	   !These denote constant x,y, or z. 
19	   !E.g. x_boundary(1) is the west and x_boundary(2) is the east
20	   !BCs are: 0=do nothing, 4=freeslip, 5=noslip
21	
22/
23
24&input
25dt= 100,
26dt_btp = 1.8,
27time_initial = 0.0,
28time_final   = 10800,
29time_restart = 10.0,
30time_scale = 1, !1=seconds, 3600=hours, 86400=days
31!lrestart_file = .true.,
32!irestart_file_number = 2
33
34! mlswe parameter
35ad_mlswe = 0.0, 
36botfr = 0, ! bottom Friction flag: 0 = no friction, 1 = linear, 2 = quadratic
37cd_mlswe = 0.0, !cd = 1.0e-7 for linear, cd = 1e-3 (default) for quadratic bottom friction
38method_visc = 0,  !0=no viscosity
39visc_mlswe = 0.0, ! horizontal viscosity
40max_shear_dz = 0.0,
41dg_integ_exact = T,
42dump_data = T, ! write output files
43beta = 0.0,  ! beta-plane Coriolis parameter (default = 0.0)
44f0 = 0.0,    ! Coriolis parameter (default = 0.0)
45
46!---- Test Cases ------------------------------------
47test_case='bump',
48	   !
49	   ! 'bump' = 2 layers cosine test; 
50	   ! 'lakeAtrest' = 2, ..., 20 layers lake at rest test; 
51	   ! 'double-gyre' = 2 layers double-gyre test
52
53ti_method_btp = 'rk35', ! Default = 'explicit' which is a two step method
54kstages=5,
55
56space_method = 'dg', !dg=discontinuous Galerkin
57	    	
58fname_root='mlswe',
59format_vtk='ascii',
60out_type='nc',
61                  !txt=binary output
62	       	  !nc=netcdf output; 
63	       	  !vtk=Visual ToolKit (Paraview) output
64	       	  !none=No Output
65
66lprint_diagnostics=T, 
67			   !T=true=print diagnostics
68			   !F=false=do NOT print diagnostics
69
70lcheck_conserved=T
71/

Note

Check the sections below for more details.

4.1.2. gridnl

 1This namelist contains the following variables:
 2
 3nelx : number of elements in the x-direction.
 4nely : number of elements in the y-direction.
 5nop : is the polynomial order inside each element.
 6xdims : for some tests, xdims gives the minimum and maximum values (in meters)
 7		in that direction.
 8ydims : for some tests, ydims gives the minimum and maximum values (in meters)
 9		in that direction.
10x_boundary : This gives the boundary condition at the front and back of the 
11			 x-direction (more on boundary conditions, below).
12y_boundary : This gives the boundary condition at the front and back of the 
13			 y-direction (more on boundary conditions, below).

4.1.3. input

 1The input variables:
 2
 3dt : the time-step in seconds.
 4dt_btp : the time-step in seconds.
 5time_initial : initial time (can be nonzero if it is a restart).
 6time_final : final time (can be in seconds, minutes, hours, or days, 
 7			depending on the test case).
 8
 9time_restart : time at which restart files are produced. The units of 
10			   time depend on the test case as mentioned previously. 
11			   The restart only works for 'txt' outputs at the moment.
12
13cd_mlswe : is the bottom friction value.
14
15method_visc : is for the use of viscosity term. If it is 0, that means
16			  no use, otherwise, the viscosity solver is used.
17
18visc_mlswe : is the value of the viscosity in the Laplacian term.
19
20max_shear_dz : is used to discretize the vertical diffusion or 
21			   friction between layer terms.
22
23dg_integ_exact : a logical flag that turns off and on whether you
24				 want to use 2N-1 quadrature points or 2N+1 for DG 
25				 integrations.
26
27dump_data : a logical flag that turns off and on the dumping 
28			of the simulation data to a file
29
30test_case : is the specific test case.  More on this in ``tests section``.
31
32ti_method :  is the time-integration method (only the 
33			 predictor-corrector is available now).
34
35ti_method_btp : is the time-integration method for the barotropic equations
36
37kstages : number of Runge-Kutta stages if ti_method='rk'. 
38		  If ti_method='rk35' then the value of kstages 
39		  does not matter.
40
41fname_root : the root name of the output data. All data files 
42             for this run will have the prefix defined by fname_root.
43
44out_type : defines the type of output file.
45
46lprint_diagnostics : a logical flag that turns off and on the printing. 
47					 For scalability studies we turn off the printing
48					 to the screen.
49
50lcheck_conserved: a logical flag that turns off and on the 
51				  compuation of mass conservation.

4.2. h-NUMO Output

  1. Inside of bump directory run h-NUMO using your run script.

    • sbatch run_script.sh

  2. At the end of the run, you will have a collection of output files. In the input file, you can dump the simulation data as a vtk file for Paraview visualizations or simply as a txt file for Matlab visualizations. For the Matlab visualization, turn matlab_viz to true; otherwise, it will output vtk files.