Download presentation
Presentation is loading. Please wait.
1
SWAN model applications
Projects/Sandy
2
Outline SWAN model application overview
How to create a SWAN only application (with refinement) How to create a SWAN coupled application
3
SWAN N = wave action density (energy density / relative frequency)
cx, cy = propagation velocities (x- and y- directions) s = relative frequency = wave direction S = source/sink term for: - wind-wave generation - wave breaking - bottom dissipation - nonlinear wave-wave interactions SWAN accounts for shoaling, diffraction, partial transmission, and reflection. Booij, N., R.C. Ris and L.H. Holthuijsen, 1999, A third-generation wave model for coastal regions, Part I, Model description and validation, J.Geoph.Research, 104, C4, Booij, N., R.C. Ris and L.H. Holthuijsen, 1999, A third-generation wave model for coastal regions, Part II, Model description and validation, Booij, N., Haagsma, IJ.G., Holthuijsen, L.H., Kieftenburg, A.T.M.M., Ris, R.C., van der Westhuysen, A.J., and Zijlema, M. (2004). SWAN Cycle III version User Manual, Delft University of Technology.
4
SWAN User's manual
5
SWAN grid points ROMS grid
For the SWAN grid, we set the SWAN points on the ROMS rho points. eta xi Borrowed from Marcel’s presentation
6
SWAN grid tiling SWAN ROMS
SWAN tiles the grid by dividing the longest side into multiple sections. Don’t have any tiles that are all land mask. This may not work with the way we require the entire SWAN grid to be accounted for in the exchanges.
7
SWAN is driven by a series of 'KEYWORDS' in the input file.
To run SWAN - Input file SWAN is driven by a series of 'KEYWORDS' in the input file. 'PROJECT' 'MODE' 'SET' 'CGRID' 'READGRID' etc Projects/Inlet_Test/Swanonly/swan_inlet_test.in
8
Keywords: Start-up
9
Keywords: model description
10
Keywords: model description
11
Keywords: Output and Run
12
How to create a SWAN only application
1) grids 2) wind forcing 3) boundary conditions 4) cppdefs.h 5) coawst.bash 6) INPUT 7) run it – to create init files 8) INPUT 9) run it – to run for multiday These steps are in the Users Manual Section 10
13
1) Grids There are several ways to make a SWAN computational grid.
you can use the CGRID Regular command in the SWAN INPUT file. This is for a regular grid, even spacings, perhaps on an angle. or 2) If you already have a ROMS grid then run COAWST/Tools/mfiles/mtools/ roms2swan(lon_rho(or x), lat_rho (or y), depth, mask) This creates 2 files: grid_coord.grd (goes with READGRID COORDS) swan_bathy.bot (goes with READINP BOTTOM)
14
SWAN Grids for Sandy
15
2) wind forcing Can use Tools\mfiles\mtools\ncei_2swan.m
16
2) wind forcing Enter values for steps 1 -4
17
2) wind forcing Usually pick a ‘user’ grid so the file can be used by multiple swan grids.
18
Create SWAN wind forcing for Sandy
19
3) boundary conditions: 2 choices
If you use Tools\mfiles\swan_forc\ww3_swan_input.m, you have 2 choices: 1) TPAR files: These are parametric files of Hsig, Tp, Dir, Spr and SWAN recreates directional spectra. 2) Spec2d files: These contain wave energy as a function of direction and frequency (2d spectra). Generally the spec2d files have better information, but are a little more difficult to create. For both of these we use WaveWatchIII data. SWAN will also take 1D spectra, but we don’t have an m file for that. But sometimes that data is available from an ADCP or instrument.
20
3) boundary conditions Enter information for steps 1 - 4
Both methods are driven by ww3_swan_input.m Enter information for steps 1 - 4
21
3) boundary conditions Step 5) Here is where you select to create TPAR (field output) or Spec2D (partition) files. The next step is to get the files that are needed.
22
3) boundary conditions - TPAR
Go here and get the README : ftp://polar.ncep.noaa.gov/pub/history/waves/ If you want to make TPAR files then we want to use the Field Data Output.
23
3) boundary conditions - TPAR
Go here and get the data: Select multi_1, YYYYMM, gribs ftp://polar.ncep.noaa.gov/pub/history/waves/multi_1/201210/gribs/ Download the .grb2 data files that you need. *.dp.* *.hs.* *.tp.* These were ‘at’ = Atlantic, for H Sandy 2012. Yours will be different.
24
3) boundary conditions - TPAR
Run the ww3_swan_input.m file This will produce several TPAR files. Example of a TPAR file Date Hsig Tp Dir Spr
25
3) boundary conditions - TPAR
When you run the ww3_swan_input.m file It will also produce some text to enter to the INPUT file BOUND_spec_command You need to copy this to the INPUT file (we will show that in a few steps)
26
3) boundary conditions – Spec2D
Go here and get the README : ftp://polar.ncep.noaa.gov/pub/history/waves/ If you want to make 2DSpec Files then we want to use the Partitioned Data Output.
27
3) boundary conditions – Spec2D
Reconstruct the wave spectra based on the approach here: Kumar, N., D.L. Cahl, S.C. Crosby, and G. Voulgaris, 2017: Bulk versus Spectral Wave Parameters: Implications on Stokes Drift Estimates, Regional Wave Modeling, and HF Radars Applications. J. Phys. Oceanogr., 47, 1413–1431, For example, Data at one spatial location and for one instant in time is saved as: Partition 1 Partition 2 Partition 3 Total
28
3) boundary conditions – Spec2D
Go here and get the data: Select multi_1, YYYYMM, partitions ftp://polar.ncep.noaa.gov/pub/history/waves/multi_1/201210/gribs/ Download the tarred ASCII file. It is only 2.1GB More recent files are in netcdf. if (use_partition_data) % Enter name of wave watch 3 partition file partfile='multi_1.partition.glo_30m '; end
29
3) boundary conditions - TPAR
Run the ww3_swan_input.m file This will produce several 2DSpec files WW3part_01.spc2d Example of a 2D Sepc file Scroll down and see the Dirs. File contains time dependent 2D spectra
30
3) boundary conditions - TPAR
When you run the ww3_swan_input.m file It will also produce some text to enter to the INPUT file BOUND_spec_command You need to copy this to the INPUT file (we will show that in a few steps)
31
4) Projects/sandy.h Just define SWAN model and for this application we have a nested grid.
32
5) coawst.bash Set application, project dir, and compiler options.
33
6) Input file - control commands
Proejcts/Sandy/swan_sandy.in PROJECT - 4 text lines MODE NONSTAT TWOD SET - DEPMIN to be same as Dcrit - INRHOG 1 !!!! - NAUTICAL !!!! COORDINATES - SPHERICAL or CARTESIAN NSGRIDS - required Next slides
34
NSGRIDS – COAWST specific
We modified the SWAN code so that all the nested grids run concurrently (at the same time). NSGRIDS tells us how many SWAN grids there are. You need to have a separate INPUT file for each grid. Example of Sandy test case Showing Hsig_ _120000 For both parent and child grids.
35
Input file – CGRID and READGRID
CGRID and READGRID: Defines the computational grid in x, y, freq, and theta space.
36
Input file – INPGRID and READINP
INPGRID and READINP: Input grid for variables of bottom, waterlevel, currents, winds, etc. This is for the BOTTOM (bathymetry)
37
Input file - INPgrid INPGRID and READINP: Input grid for other variables of [bottom], waterlevel, currents, winds, etc. These INPGRID commands create a varying grid for that field in SWAN. Since we are not reading in any values with a READINP command, and not coupling to ROMS, they will not be used.
38
Input file – INPgrid for WIND
INPGRID and READINP: Input grid for other variables of [bottom], waterlevel, currents, winds, etc. This WIND INPGRID command creates a wind grid for SWAN. The READINP command reads wind from a file. We showed a few slides ago how to get these values.
39
Input file - Boundary inputs
BOUND SHAPE BOUND SIDE or BOUND SEGMENT Constant TPAR 2DSpec You only need one type. Pick one, or nothing.
40
Input file - Init files Can start SWAN with data from an init file.
This file can be created from a STATIONARY run. We are going to create the init files, so just set it as INIT.
41
Input file - Physics
42
Input file - Output and run
- Ouputs - Restart : COAWST specific command to create restarts during run. - COMPUTE – do a stationary run now to get init files. HOTFILE – output files at end of run to use as init files. STOP – we are done.
43
Input file for refined grid
Need to create the swan_ref3 input files also. This is basically the same as the parent grid but: Different grid size NO Boundary files. - Different names for Output files.
44
7) run coawst Run it by pointing to the 2 SWAN input files:
mpirun -np X ./coawstM Projects/Inlet_test/Swanonly/swan_inlet_test.in Projects/Inlet_test/Swanonly/swan_inlet_test_ref5.in This created the SWAN init files.
45
8) INPUT files for multiday simulation
Point to new INIT file Change run times Also for refined grid input file.
46
9) run coawst Run it by pointing to the 2 SWAN input files:
mpirun -np X ./coawstM Projects/Inlet_test/Swanonly/swan_inlet_test.in Projects/Inlet_test/Swanonly/swan_inlet_test_ref5.in This created the multiday SWAN ouput.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.