plot_pancan: Plot panCanadian L3b file

View source: R/bin_funcs.R

plot_pancanR Documentation

Plot panCanadian L3b file

Description

Given a vector of data from a binned ocean colour file, plot it on a raster with coastlines.

Usage

plot_pancan(
  vec,
  region = "pancan",
  ext = c(xmn = -147, xmx = -41, ymn = 39, ymx = 86),
  resolution = "4km",
  limits = NULL
)

Arguments

vec

Numeric vector of data (must be in the same order as the the bins vector of the same resolution, whether pancan, nwa, nep, or gosl - see details).

region

String, either "pancan", "nwa", "nep", or "gosl"

ext

Named vector containing the boundaries of the resulting grid.

resolution

String, either "4km" or "9km".

limits

Limits of the colour scale (numeric vector, length 2).

Details

This is used to get a quick look at a file from the panCanadian dataset, before manipulating the data. When the data is loaded, it's in vector format and in the same order as the bin vectors pancan_bins_4km, nwa_bins_4km, etc...

Value

Raster containing variable values with coastlines.

Examples

# This is an example file with data in the same format as in a panCanadian dataset file.
data("example01_A2018252.L3b_DAY_CHL_POLY4_NWA")
dat <- example01_A2018252.L3b_DAY_CHL_POLY4_NWA
lon_lim <- lon_bounds[["NWA"]]
lat_lim <- lat_bounds[["NWA"]]
plot_pancan(log10(dat), region="nwa", ext=c(range(lon_lim),range(lat_lim)))


BIO-RSG/oceancolouR documentation built on April 30, 2024, 7:54 a.m.