Description Usage Arguments Details Value Examples
This function gets (geographic and optical) data for a geographic zone. Such a zone may be a
single geographic point, a longitudinal transect, a latitudinal transect, or an area.
The type of geographic zone depends the arguments lon
and lat
passed to the function (see details)
1 2 3 4 5 6 7 8 | cl_GetData(
lon,
lat,
what = c("depth", "area", "par", "kdpar", "parbottom"),
dirdata = "CoastalLight.d",
month = 0,
stat = "mean"
)
|
lon |
: [numeric] longitude, vector of length 1 or 2, (interval [-180; 180], and see details) ; unit : decimal \, degree |
lat |
: [numeric] latitude, vector of length 1 or 2, (interval [-90; 90], and see details) ; unit : decimal \, degree |
what |
: [character] a vector of the variables to extract among "depth", "area", "par", "kdpar" and "parbottom". Several variables can be listed. Default is all of them. Note that longitude and latitude are automatically added to the variables. Units : depth (m), area (km^{2}), par, parbottom (mol.photons \; m^{-2} \; d^{-1}), kdpar (m^{-1}). |
dirdata |
: [character] The directory where the data files
(previouly downloaded with the function |
month |
: [integer] : the decimal value of the month ([0-12] of interest. 0 indicate the climatology over 21 years (1998-2018), 1 is January, ... |
stat |
: [character] the statistical value you want for variables "par", "kdpar" and "parbottom"; choose one among "mean" (mean value), "min" (minimum), "max" (maximum), "sd" (standard deviation) (default = "mean") N.B. : "min", "max", "sd", are available only at URL http://obs-vlfr.fr/Pfunction/ |
There are 4 options for parameters lon
and lat
:
lon
is of length 1, lat
is of length 1 : the type is "Point"
lon
is of length 2, lat
is of length 1 : the type is "LonTransect"
lon
is of length 1, lat
is of length 2 : the type is "LatTransect"
lon
is of length 2, lat
is of length 2 : the type is "Area"
To get data along an ordinary transect (i.e. a polygonal line, given by its vertices)
you have, in a first time, to get data in an "Area" containing this polygonal line,
and, in a second time, to use function cl_Transect()
in order to extract data along the transect
(see example of this function).
: [list] a list with 5 components :
type
: the type of geographical zone :
"Point", "LonTransect", "LatTransect" or "Area"
lon
: the lon argument as passed to the function
lat
: the lat argument as passed to the function
data
: a matrix of data with columns names "longitude", "latitude",
and variables requested
stat
: see argument stat
("mean", "min", "max", or "sd")
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## All examples assume that data have been downloaded in directory "CoastalLight.d"
## with function cl_DownloadData()
## Area
gabes <- cl_GetData(lon = c(10, 14), lat = c(32.5, 36), dir = "./CoastalLight.d")
par(mfrow = c(3,2))
cl_PlotData(gabes)
## a longitudinal transect in January
long.transect <- cl_GetData(lon = c(10, 14), lat = c(34), dir = "./CoastalLight.d", month = 1)
par(mfrow = c(1,1))
cl_PlotData(long.transect)
## a latitudinal transect in August
lat.transect <- cl_GetData(lon = c(12), lat = c(32.5, 36), dir = "./CoastalLight.d", month = 8)
par(mfrow = c(1,1))
cl_PlotData(lat.transect)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.