1 / 32

Automated Grid Generation for WAVEWATCH III

Automated Grid Generation for WAVEWATCH III. Arun Chawla. The WAVEWATCH III Team + friends Marine Modeling and Analysis Branch NOAA / NWS / NCEP / EMC NCEP.list.WAVEWATCH@NOAA.gov NCEP.list.waves@NOAA.gov. Outline. Covered in this lecture :

trevor
Download Presentation

Automated Grid Generation for WAVEWATCH III

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Automated Grid Generation for WAVEWATCH III ArunChawla The WAVEWATCH III Team + friends Marine Modeling and Analysis Branch NOAA / NWS / NCEP / EMC NCEP.list.WAVEWATCH@NOAA.gov NCEP.list.waves@NOAA.gov

  2. Outline • Covered in this lecture: • The grids necessary for running WAVEWATCH III codes • The reference data used for creating the grids • The different modules of a grid generation software to develop the grids • Additional changes needed to the grids to allow two – way communications between grids for multi-grid WAVEWATCH III

  3. Motivation • WAVEWATCH III requires 3 grids (1 necessary and two optional) • A bathymetry grid (necessary) • A land –sea mask grid (optional in WW III v 2.22, needed in multi-grid version of WW III) • Obstruction grid to account for energy decay due to sub-grid blocking (optional) • Development of these grids can be a fairly arduous task. This is specially true for multi-grid version of WW III where grid consistency across overlapping grids is necessary for accurate two – way coupling. • To facilitate this we developed a set of algorithms that can automatically create accurate grids with minimal input from the user. • The necessary tools have been developed using MATLAB.

  4. MODULES 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 un-necessary water bodies Step 4: Generate obstruction grids for unresolved islands Step 5: Identify nodes for exchanging boundary information (multiple-grid only)

  5. Reference Data • Two types of high resolution reference data available • A global high resolution bathymetry data set • ETOPO2 from the National Geophysical Data Center • 2’ arc length global relief bathymetry data set • ETOPO1 from the National Geophysical Data Center • 1’ arc length global relief bathymetry data set • A global shoreline database in the form of polygons (GSHHS - Global Self-consistent Hierarchical High-resolution Shoreline) • Algorithms will be designed to meld the high resolution bathymetry with the shoreline database to develop the optimum grids.

  6. Subroutines • A grid generation routine • Generates a grid from base bathymetric data set. We use global ETOPO2/ETOPO1 bathymetry netcdf files. (NOTE: To use this routine your matlab should be able to handle netcdffiles. Capability is available as open source) • A boundary extraction routine • Extracts a subset of boundaries from a global set of polygon boundaries (GSHHS) • A land-mask routine • Blends the bathymetric data with the coastal boundaries to develop an accurate land-sea mask • A water body routine • Groups the wet cells into different water bodies (each having a unique id) • A sub-grid obstruction routine • Develops sub-grid obstruction matrices in x and y direction for wet cells

  7. Flow Chart High resolution grid (e.g. ETOPO2) GSSHS boundary polygons (5 resolution levels) Optional land mask polygons Grid generator Boundary extractor Boundary check Create mask bound lat depth lon Separate water bodies mask Create WAVEWATCH III files Generate obstruction grid Depth, obstruction and mask data Sx,Sy

  8. Putting it together Reference_data/ (base bathymetry and coastal polygons) bin/ (individual matlab subroutines) GRIDGEN/ (Parent directory) examples/ (Templates of master scripts used to generate grids)

  9. Grid Generation Routine • Routine uses 2D averaging to interpolate the higher resolution (reference) grid at the lower resolution • Averaging carried out over all the reference “wet cells” that lie within a grid cell • If the proportion of reference wet cells is less than user specified cut-off (ranging between 0 and 1) then the grid cell is marked dry. • Averaging filters out higher spatial frequencies and prevents aliasing Grid points Reference grid points Grid cell Reference grid cell

  10. Bathymetry (Hawaiian islands) using different cutoffs for proportion of wet cells 0.1 0.4 0.7 0.9

  11. Boundary extraction routine • Uses the GSHHS (Global Self-consistent Hierarchical High-resolution Shoreline) polygon database. • High resolution data is available as mat files at 5 resolutions • Full • high (0.2 km) • intermediate (1 km) • low (5 km) • coarse (25 km) • Only accounts for land – sea boundaries (ignores lakes) • Properly splits boundaries that are intersecting grid domain boundary • Important to properly close boundaries for land masks and sub grid obstructions

  12. Improperly closed boundaries

  13. Splitting a boundary properly

  14. Full Resolution Global Boundary Global boundaries Grid domain Sub-set boundaries

  15. Land-sea mask routine • A first order land mask (based on a depth cutoff) is determined • The land mask routine then • Checks all wet cells near the boundaries • Switches wet cells to dry if a proportion of cell within the boundary > user specified cutoff (currently set at 0.5) • Land mask routine needed to • Account for land masses not present in base bathymetry grid • Resolve discrepancies between shoreline data base and base bathymetry shorelines • Account for additional polygons

  16. To compute proportion of cell inside boundary • Equally spaced points spread throughout the cell • Determine number of points enclosed within boundary • Number of points inside boundary/Total number of points

  17. Land-Sea Mask (Bahamas 15 min grid) Red – Wet Cell Blue – Dry Cell White – Wet cell switched to dry cell

  18. Depth + Mask Depth (0.1)

  19. Optional • Boundary Splitting • Mask cleaning requires checking parts of cell being inside/outside a boundary • For very large boundaries this can be a very cumbersome process • An optional algorithm splits up the larger boundaries into more manageable smaller boundaries. • Significantly speeds up the mask cleaning algorithm

  20. Boundary Splitting

  21. Wet cell clean up routine • Cycle through all the wet cells and flag all connected cells with the same id • Independent water bodies have different ids • Function returns an id map that allows users to switch cells of a particular water body from wet to dry • Switching of cells can either be done inside the routine with a flag option, or outside by the user

  22. Wet Cell clean up (contd.) • Initialize all wet cells as unmarked • Starting from first unmarked cell with marker value at 1, mark all connected wet cells with the same marker • If more unmarked cells then increment marker by 1 and repeat step 2. • Keep repeating steps 3 and 2 till no longer unmarked wet cells • End result is a mask map with the wet cells grouped into independent water bodies

  23. Obstruction grid algorithm • Start from the final land – sea mask and boundary polygons (not the split polygons) • Following the algorithm outlined in obstruction grid presentation build the obstruction grids for all the wet cells • Assign obstructions next to dry cells to zero (to prevent spurious attenuation of wave energy)

  24. At this point • The grid generation software has created • A bathymetric grid • A final land – sea mask • A pair of obstruction grids associated with the land – sea mask and (unresolved) boundaries within the grid • When using WW-III in single grid mode this is all the information needed to create model definition files • When using WW-III in multiple grid mode with two – way nesting between the grids further considerations have to be made that will be outlined next • If building multiple grids, repeat steps till now for each of the individual grids before proceeding to the next step

  25. Multi-grid algorithms • Additional changes to support two – way nesting • Two way nesting in WW-III occurs as follows • Boundary information from low resolution grids to high resolution grids • Grid cell averaging from high resolution back to low resolution • Grid resolution across overlapping grids of similar resolution • In multi-grid WW-III, masks can have a value of 0 (land), 1 (ocean), 2 (boundary ; for data transfer from low resolution grids) and 3 (undefined ; outside the domain). • Two additional algorithms to modify the masks for multi-grid WW-III • A mask modifying algorithm that identifies boundary positions • A mask reconciliation algorithm

  26. Modifying mask

  27. Modifying masks • Once grid information for all the individual grids have been developed, the modify mask routine can be used with pairs of base and higher resolution grids to modify masks for exchange of information from low resolution to high resolution • Exchange of information from high to low resolution does not occur at a boundary so mask does not need to be modified • Lowest resolution grid also does not need the mask to be modified • If using the entire higher resolution grid (instead of carving out a domain inside the grid) then the polygon is defined by the corners of the grid • For overlapping grids with similar resolution (where data is reconciled) a common overlap area has to be defined

  28. Overlapping grids principle Overlaping length = stencil_width * global_time_step/CFL_time_step + stencil_width*global_time_step/CFL_time_step+1 Grid 1 Grid 2

  29. Overlapping grids Grid 1 extends from 65N to 82 N Grid 2 extends from 77.5S to 77.5 N Putting it together …

  30. Overlapping grids • If there is not enough overlapping domain in overlapping grids of similar resolution the WW-III model will fail • Since the minimum required domain width is a function of the global and CFL time steps in the respective grids, changing any can have an important impact on required overlapping domain width • Land – sea masks in the two grids with overlapping domains has to be similar • An optional land – sea mask reconciliation algorithm has been developed • Compares two sets of masks in an overlapping domain • If the mask at any location are different then they are both set to land values (0)

  31. The end End of lecture

More Related