get_spatial: Get Latitudes, Longitudes, & Depths From NEMO-MEDUSA Model...

View source: R/Spatial utilities.R

get_spatialR Documentation

Get Latitudes, Longitudes, & Depths From NEMO-MEDUSA Model Outputs

Description

This function gets the latitudes, longitudes, and depths which define the spatial location of points in an array of NEMO-MEDUSA outputs.

Usage

get_spatial(file, grid_W = F)

Arguments

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.

Details

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.

Value

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.

See Also

Other NEMO-MEDUSA variable extractors: NEMO_MEDUSA(), extractors_1D, extractors_slabR


Jack-H-Laverick/nemomedusR documentation built on Dec. 12, 2022, 5:21 a.m.