ind_long_lat | R Documentation |
Return or the index in ncdf object from lat/longitude or reverse.
ind_long_lat(
ncdf = stop("The ncdf data must be supplied"),
long = NULL,
lat = NULL,
indice.long = NULL,
indice.lat = NULL,
label.longitude = "lon",
label.latitude = "lat"
)
ncdf |
An object read from package ncdf4, ncdf or RNetCDF |
long |
Longitude in decimal format |
lat |
Latitude in decimal format |
indice.long |
Index of longitude |
indice.lat |
Index of latitude |
label.longitude |
Name of argument for longitude, default is lon |
label.latitude |
Name of argument for latitude, default is lat |
ind_long_lat is used to manage ncdf information
Or the index in ncdf object from lat/longitude or inverse
Marc Girondot marc.girondot@gmail.com
Other ncdf:
format_ncdf()
## Not run:
url <- "https://downloads.psl.noaa.gov/Datasets/noaa.oisst.v2.highres/"
url <- paste0(url, "sst.day.mean.2012.v2.nc")
dest <- paste(Sys.getenv("HOME"), "/sst.day.mean.2012.v2.nc", sep="")
download.file(url, dest)
library("ncdf4")
dta2012 <- nc_open(dest)
indices <- ind_long_lat(ncdf=dta2012, lat=5.89, long=-20.56)
coordinates <- ind_long_lat(ncdf=dta2012, indice.lat=20, indice.long=30)
# library("RNetCDF")
# dta2012 <- open.nc(dest)
# indices <- ind_long_lat(ncdf=dta2012, lat=5.89, long=-20.56)
# coordinates <- ind_long_lat(ncdf=dta2012, indice.lat=20, indice.long=30)
# ncdf library is depreciated in CRAN
# library("ncdf")
# dta2012 <- open.ncdf(dest)
# indices <- ind_long_lat(ncdf=dta2012, lat=5.89, long=-20.56)
# coordinates <- ind_long_lat(ncdf=dta2012, indice.lat=20, indice.long=30)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.