MATLAB Examples

# slr_interp documentation

This function returns the 1993-2014 linear sea level trend for a given lat/lon, in millimeters per year. Data from CU Boulder Sea Level Research group. Data of lower spatial resolution (1 degree) but with temporal variablility can be found here.

## Syntax and Description

slri = slr_interp(lati,loni) returns an interpolated sea level trend for 1993-2014. Note, interpolation is performed in equally-spaced geo coordinates instead of a more proper treatment, which would interpolate across equal spaces. It's an approximation.

## Installation

The first time you run slr_interp, it'll try to download all the data you need.

## Example 1: A single point

What's the sea level trend in at (11°N,138°E)?

```slr_interp(11,138) ```
```ans = 10.5470 ```

## Example 2: A grid

Perhaps you want to make a map of sea level trends. To do so, make a grid of lats and lons, then interpolate to the points on that grid:

```[lon,lat] = meshgrid(-180:.5:180,90:-.5:-90); slr = slr_interp(lat,lon); ```

With the interpolated gridded dataset, plotting is easy as pie. Below, I'll use Stephen Cobeldick's brewermap function to create the nice blue-to-white-to-red colormap

```worldmap('world') pcolorm(lat,lon,slr) caxis([-15 15]) cb = colorbar('location','southoutside'); xlabel(cb,'sea level trend (mm/yr)') colormap(brewermap(256,'*RdBu')) geoshow('landareas.shp') ```

## Author Info

The slr_interp function and supporting documentation were written by Chad A. Greene of the University of Texas at Austin's Institute for Geophysics (UTIG), April 2015.