grid_to_df: NetCDF to data frame

View source: R/grid_to_df.R

grid_to_dfR Documentation

NetCDF to data frame

Description

Reads a NetCDF file into a data frame with longitude and latitude information

Usage

grid_to_df(arr, grid = NA, dropna = TRUE, timedim = NA)

Arguments

arr

A 2D or 3D array

grid

A character string specifying the grid

dropna

A boolean specifying wether rows where the data variable is NA should be dropped. Recommended to be set to TRUE for large global arrays where much of the grid is NA (e.g., over ocean).

timedim

An integer specifying which dimension represents time for 3D arrays.

Value

A data frame with columns lon and lat.


stineb/rbeni documentation built on Feb. 24, 2023, 5:40 a.m.