Skip to content
Back to formatted view

Raw Message

Message-ID: <72e8303a0712021231q64140d5t6a18d52684753fc7@mail.gmail.com>
Date: 2007-12-02T20:31:39Z
From: Dale Steele
Subject: How to find ocean depth at specific locations?

I would like to use ocean depth as a covariate in a spatial model
where I have a measured catch at a specific location, but depth at
that site was not reported in the original dataset.  The dataset
'scallop' in package SemiPar is a representative example:

> scallop[20:25,]
   latitude longitude tot.catch
20 39.46667 -72.66667       722
21 39.43333 -72.73333        41
22 39.40000 -72.80000        39
23 39.31667 -72.73333         0
24 39.33333 -72.85000        94
25 39.26667 -72.81667         7


I've been able to download a very large grid of depths in this area
(33514 points) from: <http://topex.ucsd.edu/cgi-bin/get_data.cgi>.
Given this data, I'm stuck at how to estimate the depth at each
location in the scallops dataset.

depths <- read.table("depths.txt", header=F,col.names=c("x","y","z"))
depths$x <- depths$x - 360
   ## subset the data keeping only negative depths
depths <- subset(depths, depths$z < 0)
   ## Convert depths to a positive number
depths$z <- (-1)*depths$z
length(depths$z)

Thanks.  --Dale