Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Coordinates and grid resolution

meters vs longitude-latitude

The partial differential equations (PDEs) solved in GeoClaw are naturally written in units of meters. In GeoClaw you can specify that your computational domain is expressed in meters by setting

rundata.geo_data.coordinate_system = 1

in setrun.py, in which case the upper and lower limits of the domain should be in meters, along with the corners of refinement flagregions, edges of fgmax or fgout grids, locations of gauges, etc.

For many tsunami modeling problems, we instead use longitude-latitude coordinates, normally with the World Geodetic System 1984 (WGS84) coordinate system, specified by ESPG:4326 in some GIS systems. In this case, set

rundata.geo_data.coordinate_system = 2

and limits of the domain and all other location specifiers in setrun.py should be in longitude-latitude.

Choice of grid resolution

When written in meter coordinates, the PDEs used in GeoClaw are isotropic (on a uniform flat bottom) and waves propagate at the same speed in all directions. This suggests that it is most efficient to use the same grid resolution in xx and yy, with Δx=Δy\Delta x = \Delta y. The time step that can be used is related to Δx\Delta x and Δy\Delta y based on the maximum wave speed on the grid and the CFL condition.

When solving a problem set up in meters it is thus natural to take Δx=Δy\Delta x = \Delta y for most problems. But if the problem is set up so that xx and yy are longitude and latitude (coordinate_system = 2), it may be less clear how to choose the relation between Δx\Delta x and Δy\Delta y. Often we choose Δx=Δy\Delta x = \Delta y (e.g. talking about “1 arcsecond resolution” usually means the two are equal). This is partly because the topography DEMs used as input are often in WGS84 coordinates on equally spaced grids with Δx=Δy\Delta x = \Delta y and it seems natural to use the same resolution for the simulation output. (Sometimes we might even want exactly the same grid points for the output as the input DEM, see ??.)

Here are some things to consider in choosing the resolution:

Resolution of adaptively refined grid patches

Also remember that in GeoClaw we specify the spatial resolution of the coarsest Level 1 grid when setting clawdata.num_cells in setrun.py, and then the resolution of refined patches is determined by the refinement ratios specified by the lists amrdata.refinement_ratios_x and amrdata.refinement_ratios_y (see ?? and ). These ratios in x and y are usually the same so that if Δx=Δy\Delta x = \Delta y on Level 1 then the same will be true on every finer level, for example.