| earth_surf {marelac} | R Documentation |
Computes the surface of 1d by 1dg grid cells as a function of latitude.
Based on data that give the surface distance per 1 dg change in lat/lon from http://en.wikipedia.org/wiki/Latitude
earth_surf(lat = 0, lon = 0)
lat |
latitude (-90 - +90). |
lon |
longitude - not used. |
Surface of the grid cell, in m2.
Karline Soetaert <k.soetaert@nioo.knaw.nl>
earth_surf(seq(0,90,by=15))
SURF <- outer(X=Bathymetry$x,
Y=Bathymetry$y,
FUN <- function(X,Y) earth_surf(Y,X))
sum(SURF) #is: 510,072,000 km2
# the surface of the Oceans, m2
sum(SURF*(Bathymetry$z<0)) # is: 3.58e14
# the volume of the Oceans, m3
- sum(SURF*Bathymetry$z*(Bathymetry$z<0)) # is: 1.34e+18
# the surface area at several depths
SurfDepth <- vector()
dseq <- seq(-7500,-250,by=250)
for (i in 2:length(dseq)) {
ii <- which (Bathymetry$z>dseq[i-1]&Bathymetry$z<=dseq[i])
SurfDepth[i-1]<-sum(SURF[ii])
}
plot(dseq[-1],SurfDepth, xlab="depth, m", log="y",
ylab = "m2", main = "Surface at ocean depths")