SWAN model applications Projects/Sandy
Outline SWAN model application overview How to create a SWAN only application How to create a SWAN coupled application
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, 7649-7666. 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 40.41 User Manual, Delft University of Technology.
SWAN User's manual http://swanmodel.sourceforge.net/online_doc/swanuse/swanuse.html
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
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.
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
Keywords: Start-up
Keywords: model description
Keywords: model description
Keywords: Output and Run
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 Projects/Sandy/create_sandy_application.m
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)
SWAN Grids for Sandy
2) wind forcing Can use Tools\mfiles\mtools\nam_narr_2swan.m
2) wind forcing Can use Tools\mfiles\mtools\nam_narr_2swan.m
Create SWAN wind forcing for Sandy
3) boundary conditions - TPAR Can use Tools\mfiles\swan_forc\ww3_swan_input.m First, acquire the necessary grib files from ftp://polar.ncep.noaa.gov/pub/history/waves/ Then run this script to read WW3 model output and create SWAN TPAR boundary forcing files. The m files creates some commands lines called "BOUNDSPEC." You must copy the command lines from the file Bound_spec_command and place them into your SWAN INPUT file, such as swan_sandy.in. This is only done for the parent grid.
Create SWAN TPAR boundary for Sandy
4) Projects/sandy.h Just define SWAN model and for this application we have a nested grid.
5) coawst.bash Set application, project dir, and compiler options.
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
Input file – CGRID and READGRID CGRID and READGRID: Defines the computational grid in x, y, freq, and theta space.
Input file – INPGRID and READINP INPGRID and READINP: Input grid for variables of bottom, waterlevel, currents, winds, etc. This is for the BOTTOM (bathymetry)
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.
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.
Input file - INPgrid for WIND INPGRID and READINP: Input grid for other variables of [bottom], waterlevel, currents, winds, etc. Look at the nam_narr_2swan.m for times and grid location.
Input file - Boundary inputs BOUND SHAPE BOUND SIDE or BOUND SEGMENT From ww3_swan_input.m
Lists the date, Hsig, Period, Direction, and Spreading factor TPAR file Lists the date, Hsig, Period, Direction, and Spreading factor
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.
Input file - Physics
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.
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 TPAR files. - Different names for Output files.
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.
8) INPUT files for multiday simulation Point to new INIT file Change run times Also for refined grid input file.
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.
SWAN Coupling Interactions to ocean and atm models.
Setting up a coupled application: Projects/Sandy WRF SWAN ROMS PSFC (mb) Hsig (m) SST (C)