1 of 18

Mickaël Accensi

Lab. Ocean Physics & Satellite remote sensing (LOPS)

CNRS-Ifremer-IRD-UBO

mickael.accensi@ifremer.fr

Grid generation with gridgen

Short course on ocean waves

4 April 2023

2 of 18

Outline

1. gridgen

2. Reference data

3. Grid type and coordinate system

4. grid creation

5. boundary creation

6. multi-grid nesting

short course on ocean waves

3 of 18

gridgen

To run WAVEWATCH-III on a given domain, you need to provide 3 grid files :

  • bathymetry grid
  • land-sea mask grid
  • obstruction grid

gridgen tool is developed by NOAA/EMC https://github.com/NOAA-EMC/gridgen

the IFREMER version is based on NOAA/EMC version with some improvements :

  • namelist feature
  • automatic grid creation
  • automatic boundary creation

short course on ocean waves

4 of 18

reference data

To run properly, gridgen need :

  • bathymetry dataset
    • gebco2022 15’’ GB (global)
    • etopo2022 15’’ US (global)
    • globe 30’’ US (global)
    • strm3 3’’ US (global)
    • srtm1 1’’ US (Africa)
    • homonim 100m FR (France)
    • emodnet 1/16’’ FR (Europe)

  • shoreline polygon
    • GSHHS v2.3.7
    • OpenStreetMap - available in WGS84 (deg) or Mercator (m)

short course on ocean waves

5 of 18

grid type and coordinate system

gridgen handles either :

  • Geographic Coordinate System (spatial - units in degrees)
  • Projected Coordinate System (cartesian - units in meters)

short course on ocean waves

6 of 18

grid type and coordinate system

gridgen handles either :

  • rectilinear grid type

geostrophic coordinate system [deg] :

fixed resolution for latitudes and longitudes

projected coordinate system [m] :

Mercator Conformal Cylindrical projection

short course on ocean waves

7 of 18

grid type and coordinate system

gridgen handles either :

  • curvilinear grid type

geostrophic coordinate system [deg] :

latitude-dependent resolution for longitudes and a fixed resolution for latitudes

projected coordinate system [m] :

Lambert Conformal Conic projection

short course on ocean waves

8 of 18

grid type and coordinate system

It’s all matter of your own grid type and coordinate system but …

… the convention for WAVEWATCH-III ® must be :

    • Mean Sea Level
    • depths negative downwards

note : even if curvilinear grids, WW3 will use the same propagation routine, it will convert back and forth the curving space into straightened space to propagate the wave action density

note : curvilinear grids can also be used for rotated grids or shoreline-following grids with higher resolution near shore…

short course on ocean waves

9 of 18

grid creation

The grid creation is a four steps process :

Step 1: Build a bathymetric grid from

a high resolution base bathymetry

Step 2: Create an appropriate land / sea mask

to accurately depict coast lines

Step 3: Mask out unnecessary water bodies

Step 4: Generate obstruction grids

for unresolved islands

short course on ocean waves

10 of 18

grid creation

Step 1: Build a bathymetric grid from a high resolution base bathymetry

  • Routine uses 2D averaging to interpolate the higher resolution grid at the lower resolution.

  • A first order land mask is determined based on depth threshold from bathymetric grid. see CUT_OFF parameter

  • A grid cell is considered wet if the proportion of reference grid cells that need to be wet is reached. see LIM_BATHY parameter

  • Averaging is carried out over all the reference “wet cells” that lie within a grid cell.

note : lim_bathy is usually set at 0.5. It provides the initial land-sea mask which will be refined at step2.

short course on ocean waves

11 of 18

grid creation

Step 1: Build a bathymetric grid from a high resolution base bathymetry

0.1

0.7

0.9

0.4

short course on ocean waves

12 of 18

grid creation

Step 2: Create an appropriate land / sea mask to accurately depict coast lines

  • Extract land-sea boundaries based on the GSHHS (Global Self-consistent Hierarchical High-resolution Shoreline) polygon database

  • The resolution can be chosen using BOUNDARY parameter.
    • 'full' (native resolution)
    • 'high' (0.2km)
    • 'intermediate' (1km)
    • 'low' (5km)
    • 'coarse' (25km)

note : boundary can be disabled with READ_BOUNDARY parameter.

note : for computation time efficiency, boundaries can be splitted. see MIN_DIST and SPLIT_LIM parameters

short course on ocean waves

13 of 18

grid creation

Step 2: Create an appropriate land / sea mask to accurately depict coast lines

  • Check all wet cells near the boundaries
  • Spread equally spaced points through the cell
  • Switches wet cell to dry if a proportion of the cell is within the boundary. see LIM_VAL parameter

note : dry cells can not be switched back to wet

note : an additional width around the boundaries can be added to check if wet cells are being crossed by the boundaries. see OFFSET parameter

note : additional coastal polygon can be added (lakes are missing in GSHHS…). see OPT_POLY parameter

grid cell at boundary

outside

inside

coastal

boundary

short course on ocean waves

14 of 18

grid creation

Step 2: Create an appropriate land / sea mask to accurately depict coast lines

depth (0.1)

depth (0.1) + land-sea mask

short course on ocean waves

15 of 18

grid creation

Step 3: Mask out unnecessary water bodies

  • group all connected wet cells into independent water bodies

  • choose to keep or remove some water bodies according to lake_tol parameter
    • =0 : no changes applied
    • >0 : all water bodies having less than this value of total wet cells will be flagged dry
    • <0 : all but the largest water body is flagged dry

  • land-sea mask will be defined with following values :
    • 0 : land
    • 1 : sea

short course on ocean waves

16 of 18

grid creation

Step 4: Generate obstruction grids for unresolved islands

  • The reduction in wave energy is dependent on the proportion of the cell being obstructed

  • Obstruction at a cell can either consider obstruction on the cell itself [0] or in both neighbors [1] to take into account shadowing effects. see OBSTR_OFFSET parameter

  • Obstruction grid values range from 0 (no obstruction) to 1 (full obstruction)

  • Obstruction grid values for dry cells are set to 0 to prevent spurious attenuation of swell travelling into the coast

note : also implemented for curvilinear grid.

see create_obstr_curv.m

obstruction ratio

wave energy

short course on ocean waves

17 of 18

boundary creation

The boundary creation can be done in 3 ways. see BOUND_SELECT parameter :

Option 1: Manually set active boundaries by clicking on the map

Option 2: Automatically set active boundaries at grid open sea boundaries

Option 3: define a polygon from google-earth

  • land-sea mask will be modified with values
    • 0 : land
    • 1 : sea
    • 2 : active boundaries
    • 3 : excluded

short course on ocean waves

18 of 18

output files

Parameters FNAME and FNAMEB define to filenames prefix of respectively the grid and the base grid. It is usually composed by gridname and resolution, for example :

  • FNAME=ATL-10M for Atlantic grid at 10min resolution
  • FNAMEB=GLOB-30M for Global grid at 30min resolution

The output of grid creation :

  • ATL-10M.meta template file for ww3_grid.nml
  • ATL-10M.depth bathy file
  • ATL-10M.mask_nobound land-sea mask file without active boundaries
  • ATL-10M.obst obstruction grids along x and y axis

The output of boundary creation :

  • ATL-10M.bound listing of active boundaries at base grid resolution
  • ATL-10M.fullbound listing of active boundaries at grid resolution
  • ATL-10M.mask land-sea mask file with active boundaries

short course on ocean waves