grid.netcdf = function(ncdf.fname) {
require(ncvar) # to handle netcdf files (binary output format of GMT)
z = var.get.ncv(path=ncdf.fname, name="z", mode="nometa")
dims = var.get.ncv(path=ncdf.fname, name="dim")
out = as.matrix( z$data )
# out = out[,ncol(out):1]
return (out)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.