convert2DtoGridDF: Create a 'tibble' tibble representing a ROMS 2d spatial...

View source: R/convert2DtoGridDF.R

convert2DtoGridDFR Documentation

Create a tibble tibble representing a ROMS 2d spatial variable

Description

Function to create a tibble tibble representing a ROMS 2d spatial variable.

Usage

convert2DtoGridDF(m, name = "value")

Arguments

m

- matrix (xi x eta) from call to

name

- name for the 'value' column (defaults to "value")

Details

Creates a tibble from a matrix representing a ROMS 2d spatial variable. The matrix should (probably) represent the full xi,eta dimensions of the ROMS model. Any decimation should be done afterward on the resulting tibble. This will ensure the xi, eta indices in the dataframe correspond to the correct grid cells in the original output.

The returned sf object has columns:

  • ID - string "xi_eta"

  • xi - index value

  • eta - eta index value

  • 'name' - matrix value at '[xi,eta]'

Value

A tibble tibble object representing the grid


wStockhausen/wtsROMS documentation built on Feb. 2, 2025, 9:16 p.m.