NCL Home> Application examples> Maps and map projections || Data files for some examples

Example pages containing: tips | resources | functions/procedures

Coastlines

These examples show how to use the multi-resolution coastline database, RANGS (Regionally Accessible Nested Global Shorelines), developed by Rainer Feistel from Wessel and Smith's GSHHS (Global Self-consistent Hierarchical High-resolution Shoreline) database or shapefiles to get better coastal outlines.

To use the RANGS database, you need to download and install it first. Go to the RANGS page for more information.

Note: do not use the high-resolution database for global data, as you will get streaks across your plot. This database is intended only for regional data.

For more information on shapefiles, go to the shapefiles page.

coast_1.ncl: Demonstrates the three levels of coastline data in NCL.

To change the coastline to the medium level, set mpDataBaseVersion = "MediumRes".

The third example is of the multi-resolution coastline database. Once you have the RANGS database installed, set mpDataBaseVersion = "HighRes" to create maps using this database. Note: you should not use this database to plot maximal area plots, because 1) you will get horizontal lines through your plot, and 2) it takes a long time.

coast_2.ncl: Demonstrates a lambert conformal map with high-resolution coastlines.
coast_3.ncl: Using a map of Australia, this script compares NCL's two map databases ("LowRes", "MediumRes") and the high-resolution coastlines from https://www.io-warnemuende.de/rangs-en.html with data from a shapefile. The shapefile data was downloaded from http://www.gadm.org/country.

The shapefile outlines are drawn in red and the other outlines in black. Note that the high-res coastlines (third frame) are pretty close to the shapefile outlines.