FVCOM_Physics | R Documentation |
R6 base class suitable for inheritance by other classes
filename
character, path or URL
NC
ncdf4 object
M
sf table of mesh
t0
POSIXct timestamp identifying the start time
verbose
logical for helpful messaging
zvar
character, the variable to use as 'z' such as siglev or siglay
open_bounds
provides the indices for open boundary elements (open water)
closed_bounds
provides the indices for closed boundary elements (shore)
new()
FVCOM_Physics$new( filename, origin = as.POSIXct("1858-11-17 00:00:00", tz = "UTC"), verbose = FALSE, zvar = c("siglev", "siglay")[1] )
filename
character either a filename or OpenDAP URL
origin
POSIXct timestamp indicating the start of the experiment
verbose
logical for helpful messaging
zvar
character, the variable to use as 'z' such as siglev or siglay
crs
print()
Pretty print
FVCOM_Physics$print()
get_crs()
Retrieve the CRS
FVCOM_Physics$get_crs(form = c("proj", "wkt")[1])
form
character, one of 'proj', 'wkt'
CRS in the specified form
get_time()
retrieve the time relative to some epoch/origin
FVCOM_Physics$get_time(origin = self$t0, ...)
origin
POSIXct the orogin of relative timestamps
...
other arguments for fvcom_time
random_points()
Retriev one or more random points
FVCOM_Physics$random_points( n = 1, select_time = c("first", "last", "random")[1], select_z = c("random", "surface", "bottom")[1] )
n
numeric, the number of points to generate
select_time
character, one of 'first' (default), 'last' or 'random'
select_z
numeric or character. If character then 'random' (default), 'surface', 'bottom'.
If numeric then you specify your own in zvar
units
sf object of class POINT
char_size()
find proxy for characteristic size based upon element size
NOTE if we update GEOS we could get size of inscribed circle
FVCOM_Physics$char_size(what = c("min", "max", "square", "circle")[4])
what
character
min or square - side length of sqaure with equivalent area
max - side of square with double the area (or 1.4*sqrt(area))
circle - radius of circle with equivalent area
x
element mesh as sf
numeric characteristic size
mesh_metrics()
generate kinematics metrics for a given mesh
FVCOM_Physics$mesh_metrics( ofile = c(NA, file.path(dirname(self$filename), "mesh-elem-metrics.csv.gz"))[1] )
ofile
optional file to save to (as non-spatial CSV) or NA/NULL to skip
mesh (invisibly) with variables added including
max_u, max_v, max_w maximum velocity by element over all sigma in m/s
area element area in m^2
char_dim characteristic dimension, for now the radius of the circle with equivalent area in m
mesh_depth()
Compute the mean depth of each mesh element
FVCOM_Physics$mesh_depth()
mesh (invisibly) with depth added
append_bounds()
append the boundary info to the mesh table
FVCOM_Physics$append_bounds()
mesh invisibly with appended boundary variable where
open indicates the element is boundaed on at least one side by open water
closed indicates the element is bounded on at least one side by shoreline
internal indicates the element is not on the boundary
unknown self-explanatory
plot()
Plot element mesh
FVCOM_Physics$plot(...)
...
other arguments for plot
clone()
The objects of this class are cloneable with this method.
FVCOM_Physics$clone(deep = FALSE)
deep
Whether to make a deep clone.
plot_mesh
and plot_mesh_geometry
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.