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.

New topo DEMs in Southwest WA

Some Observations and Questions

Under development for the Cascadia CoPes Hub project, supported by NSF.

We have been investigating the new CUDEM tiles published in December, 2025 and have some questions...

This notebook uses the list of topo sources found here:

https://depts.washington.edu/ptha/CHTuser/topo/topo-sources-cascadia/

This is a possibly incomplete list of places where we have found the topo DEMs for the Cascadia region. Corrections or additions welcome!

In many cases the most recent tiles are available in two different forms:

Many of our questions pertain to the difference between these:

  1. Why are different formats (tif/nc) used for the different versions?

  2. When reading these files, it seems that the x,y values in the .nc files are offset by integer multiples of Δ=\Delta = 1/9" from integer values of longitude, latitude. By contrast, the x,y in the .tif files are offset by half-integral offsets. In the .nc files the first and last latitudes are exactly at 47.00 and 47.25, for example, whereas in the .tif files there are always a few points outside the tile with y values at 47±Δ/247 \pm \Delta/2, for example. Why are these indexed differently?

  3. Does this mean that one set of values should be viewed as pointwise values and the other as cell average values? Running gdalinfo on a .tif file shows that it includes the metadata

    AREA_OR_POINT=Area

    But the .nc file does not seem to have this metadata field.

    The elevations z in the two files are not identical (even after accounting for the difference from NAVD88 to MHW), so they are not the same values simply offset by Δ/2\Delta/2.

  4. How was the conversion done from .tif to .nc? Which of these is considered more accurate, and the one that we should use if possible? Presumably the .tif files, which are referenced to NAVD88?

  5. Presumably the conversion from NAVD88 to MHW was done with VDATUM? Was this applied to the entire .tif file? (The online version seems to only allow ASCII files or single points as input. The ASCII file version does not seem to be working and the single point version doesn’t return values very far inland.)

  6. In at least one case, n47x00_w124x25, the .nc file is labelled 2025v1 while the .tif file is labelled 2025v2. Is the .nc file obsolete? Are the differences from one version to another described anywhere?

%matplotlib inline
from pylab import *
from clawpack.geoclaw import topotools
from clawpack.visclaw import geoplot
from importlib import reload
import geopandas as gpd
import folium
import pandas as pd
import find_topo_source
List of catalogs found in /Users/rjl/git/CHTuser/topo/topo_sources_cascadia.md:
Warning: This list may not be up to date!
  Catalog =  https://www.ngdc.noaa.gov/thredds/catalog/crm/catalog.html
  Catalog =  https://www.ngdc.noaa.gov/thredds/catalog/regional/catalog.html
  Catalog =  https://www.ngdc.noaa.gov/thredds/catalog/pmel/catalog.html
  Catalog =  https://www.ngdc.noaa.gov/thredds/catalog/tiles/tiled_19as/catalog.html
  Catalog =  https://www.ngdc.noaa.gov/thredds/catalog/tiles/tiled_13as/catalog.html
  Catalog =  https://www.ngdc.noaa.gov/thredds/catalog/tiles/nthmp/tiled_19as/catalog.html
  Catalog =  https://coast.noaa.gov/htdata/raster2/elevation/NCEI_ninth_Topobathy_2014_8483/
  Catalog =  https://coast.noaa.gov/htdata/raster2/elevation/NCEI_ninth_Topobathy_2014_8483/index.html
  Catalog =  https://coast.noaa.gov/htdata/raster2/elevation/NCEI_ninth_Topobathy_2014_8483/wash_bellingham/index.html
  Catalog =  https://coast.noaa.gov/htdata/raster2/elevation/NCEI_ninth_Topobathy_2014_8483/wash_juandefuca/index.html
  Catalog =  https://coast.noaa.gov/htdata/raster2/elevation/NCEI_ninth_Topobathy_2014_8483/wash_outercoast/index.html
  Catalog =  https://coast.noaa.gov/htdata/raster2/elevation/NCEI_ninth_Topobathy_2014_8483/wash_pugetsound/index.html
  Catalog =  https://coast.noaa.gov/htdata/raster2/elevation/NCEI_ninth_Topobathy_2014_8483/columbia_river/index.html

Select a set of tiles

Specify the NW corner of the 0.25 x 0.25 degree tiles to search for:

eighth = 1/8  # half tile width, 0.0125 degrees
yrange = arange(46.5, 47.25+eighth, 0.25)
xrange = arange(-124.25, -123.5+eighth, 0.25)

if 1:
    name = 'NCEI tiles in SW Washington'
    find_topo_source.make_combined_tile_kml(name, xrange, yrange)
    
# make list of tile names (north to south):
tile_names = []
for y in yrange[-1::-1]:
    for x in xrange:
        xm = x+eighth
        ym = y-eighth
        tile_name = find_topo_source.tile_coords(xm,ym,verbose=False)
        #print(f'midpoints: {xm:.3f}, {ym:.3f}, NW corner:  {x:.3f}, {y:.3f}, tile: {tile_name}')
        tile_names.append(tile_name)
Created  NCEI_tiles_in_SW_Washington.kml

Search for tiles in catlogs:

print('Versions of tiles found in these catalogs:')
versions = {}
for tile_name in tile_names:
    versions[tile_name] = []
    tile_urls = find_topo_source.find_tile_url(tile_name, verbose=False)
    for url in tile_urls:
        if url[-3:]=='.nc':
            vinfo = url[-9:]
        else:
            vinfo = url[-10:]
        if 'v' not in vinfo:
            vinfo = vinfo[2:]
        versions[tile_name].append(vinfo)
    print(f'    {tile_name}: ', versions[tile_name])
Versions of tiles found in these catalogs:
    n47x25_w124x25:  ['2018v1.nc', '2020.nc', '2025v1.nc', '2025v2.tif']
    n47x25_w124x00:  ['2025v1.nc', '2025v1.tif']
    n47x25_w123x75:  ['2025v1.nc', '2025v1.tif']
    n47x25_w123x50:  []
    n47x00_w124x25:  ['2018v1.nc', '2025v1.nc', '2025v2.tif']
    n47x00_w124x00:  ['2018v1.nc', '2025v1.nc', '2025v2.tif']
    n47x00_w123x75:  ['2025v1.nc', '2025v1.tif']
    n47x00_w123x50:  ['2025v1.nc', '2025v1.tif']
    n46x75_w124x25:  ['2025v1.nc', '2025v1.tif']
    n46x75_w124x00:  ['2025v1.nc', '2025v1.tif']
    n46x75_w123x75:  ['2025v1.nc', '2025v1.tif']
    n46x75_w123x50:  []
    n46x50_w124x25:  ['2024v1.tif']
    n46x50_w124x00:  ['2024v1.tif']
    n46x50_w123x75:  ['2024v1.tif']
    n46x50_w123x50:  ['2024v1.tif']

Map of tiles

m = folium.Map(location=(46.75,-124), zoom_start=9, height=800, scrollWheelZoom=False)

for y in yrange[-1::-1]:
    for x in xrange:
        xm = x+eighth
        ym = y-eighth
        tile_name = find_topo_source.tile_coords(xm,ym,verbose=False)
        popup = f'<b>{tile_name}</b>'
        for vinfo in versions[tile_name]:
            popup = popup + f'\n{vinfo}'
        folium.Marker(
            location=[y-eighth,x+eighth],
            popup = popup,
            tooltip = "Click for info",
            #tooltip = f"<b>Tile:</b>\n {tile_name}",
            icon=folium.Icon(color="red", icon="info-sign") # Customize the marker's appearance
        ).add_to(m) 
        x1 = x
        x2 = x + 0.25
        y1 = y - 0.25
        y2 = y

        found_nc = array(['.nc' in v for v in versions[tile_name]]).sum() > 0
        found_tif = array(['.tif' in v for v in versions[tile_name]]).sum() > 0
        if found_nc and found_tif:
            color = 'green'
            tip = 'nc and tif'
        elif found_tif:
            color = 'blue'
            tip = 'tif only'
        else:
            color = 'red'
            tip = 'not found'
        
        folium.Polygon(
            locations=[[y1,x1], [y1,x2], [y2,x2], [y2,x1]],
            color="black", # Outline color
            weight=1,
            fill=True,
            fillColor=color,
            fillOpacity=0.2,
            tooltip=tip
        ).add_to(m)

for lat in arange(yrange[0]-0.25, yrange[-1]+.1, 0.25):
    folium.PolyLine(
           [[lat,-124.5], [lat,-123.25]],
           color='black', weight=1, opacity=0.5
       ).add_to(m)

    #Add label at edge
    folium.Marker(
        [lat+0.03, -124.5],
        icon=folium.DivIcon(html=f'<div style="font-size: 12pt; color: gray;">{lat}°</div>')
        ).add_to(m)

# save as stand-alone html file:
fname = 'SoWA-Tiles-Map.html'
m.save(fname)
print('Created ',fname)

# display map inline:
m
Created  SoWA-Tiles-Map.html
Loading...

The stand-alone map can be viewed at interactive map.

Versions of these tiles found on NCEI webpages

Print out more details of which catalogs tiles are found in and urls:


tile_names = []
for y in yrange[-1::-1]:
    print('\n=====================')
    print(f'Latitude y = {y:.2f}:')
    print('=====================')

    for x in xrange:
        xm = x+eighth
        ym = y-eighth
        tile_name = find_topo_source.tile_coords(xm,ym,verbose=False)
        print('\n------------------------------------------------')
        print(f'Tile: {tile_name},  NW corner:  {x:.3f}, {y:.3f}')
        tile_names.append(tile_name)
        tile_urls = find_topo_source.find_tile_url(tile_name, verbose=True)
        if len(tile_urls) == 0:
            print(f'  {tile_name} not found')

=====================
Latitude y = 47.25:
=====================

------------------------------------------------
Tile: n47x25_w124x25,  NW corner:  -124.250, 47.250

  n47x25_w124x25 found in:
    Catalog:  https://www.ngdc.noaa.gov/thredds/catalog/tiles/tiled_19as/catalog.html
    URL:  https://www.ngdc.noaa.gov/thredds/dodsC/tiles/tiled_19as/ncei19_n47x25_w0124x25_2018v1.nc

  n47x25_w124x25 found in:
    Catalog:  https://www.ngdc.noaa.gov/thredds/catalog/tiles/nthmp/tiled_19as/catalog.html
    URL:  https://www.ngdc.noaa.gov/thredds/dodsC/tiles/nthmp/tiled_19as/ncei19_n47x25_w0124x25_2020.nc

  n47x25_w124x25 found in:
    Catalog:  https://www.ngdc.noaa.gov/thredds/catalog/tiles/nthmp/tiled_19as/catalog.html
    URL:  https://www.ngdc.noaa.gov/thredds/dodsC/tiles/nthmp/tiled_19as/sowa_mhw_19_n47x25_w124x25_2025v1.nc

  n47x25_w124x25 found in:
    Catalog:  https://coast.noaa.gov/htdata/raster2/elevation/NCEI_ninth_Topobathy_2014_8483/wash_outercoast/index.html
    URL:  https://coast.noaa.gov/htdata/raster2/elevation/NCEI_ninth_Topobathy_2014_8483/wash_outercoast/ncei19_n47x25_w124x25_2025v2.tif

------------------------------------------------
Tile: n47x25_w124x00,  NW corner:  -124.000, 47.250

  n47x25_w124x00 found in:
    Catalog:  https://www.ngdc.noaa.gov/thredds/catalog/tiles/nthmp/tiled_19as/catalog.html
    URL:  https://www.ngdc.noaa.gov/thredds/dodsC/tiles/nthmp/tiled_19as/sowa_mhw_19_n47x25_w124x00_2025v1.nc

  n47x25_w124x00 found in:
    Catalog:  https://coast.noaa.gov/htdata/raster2/elevation/NCEI_ninth_Topobathy_2014_8483/wash_outercoast/index.html
    URL:  https://coast.noaa.gov/htdata/raster2/elevation/NCEI_ninth_Topobathy_2014_8483/wash_outercoast/ncei19_n47x25_w124x00_2025v1.tif

------------------------------------------------
Tile: n47x25_w123x75,  NW corner:  -123.750, 47.250

  n47x25_w123x75 found in:
    Catalog:  https://www.ngdc.noaa.gov/thredds/catalog/tiles/nthmp/tiled_19as/catalog.html
    URL:  https://www.ngdc.noaa.gov/thredds/dodsC/tiles/nthmp/tiled_19as/sowa_mhw_19_n47x25_w123x75_2025v1.nc

  n47x25_w123x75 found in:
    Catalog:  https://coast.noaa.gov/htdata/raster2/elevation/NCEI_ninth_Topobathy_2014_8483/wash_outercoast/index.html
    URL:  https://coast.noaa.gov/htdata/raster2/elevation/NCEI_ninth_Topobathy_2014_8483/wash_outercoast/ncei19_n47x25_w123x75_2025v1.tif

------------------------------------------------
Tile: n47x25_w123x50,  NW corner:  -123.500, 47.250
  n47x25_w123x50 not found

=====================
Latitude y = 47.00:
=====================

------------------------------------------------
Tile: n47x00_w124x25,  NW corner:  -124.250, 47.000

  n47x00_w124x25 found in:
    Catalog:  https://www.ngdc.noaa.gov/thredds/catalog/tiles/tiled_19as/catalog.html
    URL:  https://www.ngdc.noaa.gov/thredds/dodsC/tiles/tiled_19as/ncei19_n47x00_w0124x25_2018v1.nc

  n47x00_w124x25 found in:
    Catalog:  https://www.ngdc.noaa.gov/thredds/catalog/tiles/nthmp/tiled_19as/catalog.html
    URL:  https://www.ngdc.noaa.gov/thredds/dodsC/tiles/nthmp/tiled_19as/sowa_mhw_19_n47x00_w124x25_2025v1.nc

  n47x00_w124x25 found in:
    Catalog:  https://coast.noaa.gov/htdata/raster2/elevation/NCEI_ninth_Topobathy_2014_8483/wash_outercoast/index.html
    URL:  https://coast.noaa.gov/htdata/raster2/elevation/NCEI_ninth_Topobathy_2014_8483/wash_outercoast/ncei19_n47x00_w124x25_2025v2.tif

------------------------------------------------
Tile: n47x00_w124x00,  NW corner:  -124.000, 47.000

  n47x00_w124x00 found in:
    Catalog:  https://www.ngdc.noaa.gov/thredds/catalog/tiles/tiled_19as/catalog.html
    URL:  https://www.ngdc.noaa.gov/thredds/dodsC/tiles/tiled_19as/ncei19_n47x00_w0124x00_2018v1.nc

  n47x00_w124x00 found in:
    Catalog:  https://www.ngdc.noaa.gov/thredds/catalog/tiles/nthmp/tiled_19as/catalog.html
    URL:  https://www.ngdc.noaa.gov/thredds/dodsC/tiles/nthmp/tiled_19as/sowa_mhw_19_n47x00_w124x00_2025v1.nc

  n47x00_w124x00 found in:
    Catalog:  https://coast.noaa.gov/htdata/raster2/elevation/NCEI_ninth_Topobathy_2014_8483/wash_outercoast/index.html
    URL:  https://coast.noaa.gov/htdata/raster2/elevation/NCEI_ninth_Topobathy_2014_8483/wash_outercoast/ncei19_n47x00_w124x00_2025v2.tif

------------------------------------------------
Tile: n47x00_w123x75,  NW corner:  -123.750, 47.000

  n47x00_w123x75 found in:
    Catalog:  https://www.ngdc.noaa.gov/thredds/catalog/tiles/nthmp/tiled_19as/catalog.html
    URL:  https://www.ngdc.noaa.gov/thredds/dodsC/tiles/nthmp/tiled_19as/sowa_mhw_19_n47x00_w123x75_2025v1.nc

  n47x00_w123x75 found in:
    Catalog:  https://coast.noaa.gov/htdata/raster2/elevation/NCEI_ninth_Topobathy_2014_8483/wash_outercoast/index.html
    URL:  https://coast.noaa.gov/htdata/raster2/elevation/NCEI_ninth_Topobathy_2014_8483/wash_outercoast/ncei19_n47x00_w123x75_2025v1.tif

------------------------------------------------
Tile: n47x00_w123x50,  NW corner:  -123.500, 47.000

  n47x00_w123x50 found in:
    Catalog:  https://www.ngdc.noaa.gov/thredds/catalog/tiles/nthmp/tiled_19as/catalog.html
    URL:  https://www.ngdc.noaa.gov/thredds/dodsC/tiles/nthmp/tiled_19as/sowa_mhw_19_n47x00_w123x50_2025v1.nc

  n47x00_w123x50 found in:
    Catalog:  https://coast.noaa.gov/htdata/raster2/elevation/NCEI_ninth_Topobathy_2014_8483/wash_outercoast/index.html
    URL:  https://coast.noaa.gov/htdata/raster2/elevation/NCEI_ninth_Topobathy_2014_8483/wash_outercoast/ncei19_n47x00_w123x50_2025v1.tif

=====================
Latitude y = 46.75:
=====================

------------------------------------------------
Tile: n46x75_w124x25,  NW corner:  -124.250, 46.750

  n46x75_w124x25 found in:
    Catalog:  https://www.ngdc.noaa.gov/thredds/catalog/tiles/nthmp/tiled_19as/catalog.html
    URL:  https://www.ngdc.noaa.gov/thredds/dodsC/tiles/nthmp/tiled_19as/sowa_mhw_19_n46x75_w124x25_2025v1.nc

  n46x75_w124x25 found in:
    Catalog:  https://coast.noaa.gov/htdata/raster2/elevation/NCEI_ninth_Topobathy_2014_8483/wash_outercoast/index.html
    URL:  https://coast.noaa.gov/htdata/raster2/elevation/NCEI_ninth_Topobathy_2014_8483/wash_outercoast/ncei19_n46x75_w124x25_2025v1.tif

------------------------------------------------
Tile: n46x75_w124x00,  NW corner:  -124.000, 46.750

  n46x75_w124x00 found in:
    Catalog:  https://www.ngdc.noaa.gov/thredds/catalog/tiles/nthmp/tiled_19as/catalog.html
    URL:  https://www.ngdc.noaa.gov/thredds/dodsC/tiles/nthmp/tiled_19as/sowa_mhw_19_n46x75_w124x00_2025v1.nc

  n46x75_w124x00 found in:
    Catalog:  https://coast.noaa.gov/htdata/raster2/elevation/NCEI_ninth_Topobathy_2014_8483/wash_outercoast/index.html
    URL:  https://coast.noaa.gov/htdata/raster2/elevation/NCEI_ninth_Topobathy_2014_8483/wash_outercoast/ncei19_n46x75_w124x00_2025v1.tif

------------------------------------------------
Tile: n46x75_w123x75,  NW corner:  -123.750, 46.750

  n46x75_w123x75 found in:
    Catalog:  https://www.ngdc.noaa.gov/thredds/catalog/tiles/nthmp/tiled_19as/catalog.html
    URL:  https://www.ngdc.noaa.gov/thredds/dodsC/tiles/nthmp/tiled_19as/sowa_mhw_19_n46x75_w123x75_2025v1.nc

  n46x75_w123x75 found in:
    Catalog:  https://coast.noaa.gov/htdata/raster2/elevation/NCEI_ninth_Topobathy_2014_8483/wash_outercoast/index.html
    URL:  https://coast.noaa.gov/htdata/raster2/elevation/NCEI_ninth_Topobathy_2014_8483/wash_outercoast/ncei19_n46x75_w123x75_2025v1.tif

------------------------------------------------
Tile: n46x75_w123x50,  NW corner:  -123.500, 46.750
  n46x75_w123x50 not found

=====================
Latitude y = 46.50:
=====================

------------------------------------------------
Tile: n46x50_w124x25,  NW corner:  -124.250, 46.500

  n46x50_w124x25 found in:
    Catalog:  https://coast.noaa.gov/htdata/raster2/elevation/NCEI_ninth_Topobathy_2014_8483/columbia_river/index.html
    URL:  https://coast.noaa.gov/htdata/raster2/elevation/NCEI_ninth_Topobathy_2014_8483/columbia_river/ncei19_n46x50_w124x25_2024v1.tif

------------------------------------------------
Tile: n46x50_w124x00,  NW corner:  -124.000, 46.500

  n46x50_w124x00 found in:
    Catalog:  https://coast.noaa.gov/htdata/raster2/elevation/NCEI_ninth_Topobathy_2014_8483/columbia_river/index.html
    URL:  https://coast.noaa.gov/htdata/raster2/elevation/NCEI_ninth_Topobathy_2014_8483/columbia_river/ncei19_n46x50_w124x00_2024v1.tif

------------------------------------------------
Tile: n46x50_w123x75,  NW corner:  -123.750, 46.500

  n46x50_w123x75 found in:
    Catalog:  https://coast.noaa.gov/htdata/raster2/elevation/NCEI_ninth_Topobathy_2014_8483/columbia_river/index.html
    URL:  https://coast.noaa.gov/htdata/raster2/elevation/NCEI_ninth_Topobathy_2014_8483/columbia_river/ncei19_n46x50_w123x75_2024v1.tif

------------------------------------------------
Tile: n46x50_w123x50,  NW corner:  -123.500, 46.500

  n46x50_w123x50 found in:
    Catalog:  https://coast.noaa.gov/htdata/raster2/elevation/NCEI_ninth_Topobathy_2014_8483/columbia_river/index.html
    URL:  https://coast.noaa.gov/htdata/raster2/elevation/NCEI_ninth_Topobathy_2014_8483/columbia_river/ncei19_n46x50_w123x50_2024v1.tif