View source: R/Spatial utilities.R
get_spatial | R Documentation |
This function gets the latitudes, longitudes, and depths which define the spatial location of points in an array of NEMO-MEDUSA outputs.
get_spatial(file, grid_W = F)
file |
The full name of a netcdf file. |
grid_W |
Is the file a grid_W file, TRUE or FALSE. Needed as the depth variable is unique to this file type. |
Each variable of interest in the netcdf file is imported, and then collected into a list. A T/F switch is included for when the file is a grid_W type as the depth levels are different and stored differently.
A list of three elements:
nc_lat - A matrix of latitudes which maps onto the first and second dimension of a NEMO-MEDUSA array.
nc_lon - A matrix of longitudes which maps onto the first and second dimension of a NEMO-MEDUSA array.
nc_depth - A vector of depths which match the third dimension of a NEMO-MEDUSA array.
Other NEMO-MEDUSA variable extractors:
NEMO_MEDUSA()
,
extractors_1D
,
extractors_slabR
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.