fix_raster: Raster from Array

View source: R/oisst_data_funs.R

fix_rasterR Documentation

Raster from Array

Description

Helper function to convert an array (x, y, z) into raster layers with the correct dimensions and orientation for spatial analyses. Typically used when working from netcdf to raster.

Usage

fix_raster(x, lons.use, lats.use, x.min.use, x.max.use, y.min.use, y.max.use)

Arguments

x

matrix. As currently implemented, x is an individiaul time slice from an x, y, z array.

lons.use

Longitudes, extracted using ncvar_get

lats.use

Latitudes, extracted using ncvar_get

x.min.use

Bounding box x minimum

x.max.use

Bounding box x maximum

y.min.use

Bounding box y minimum

y.max.use

Bounding box y maximum

Value

rast.out Correctly trimmed and oriented raster object


gulfofmaine/gmRi documentation built on Jan. 26, 2025, 5:12 a.m.