get.northern.hemisphere.booleans: Determine what portions of a subset are within the northern...

View source: R/support_functions.R

get.northern.hemisphere.booleansR Documentation

Determine what portions of a subset are within the northern hemisphere.

Description

Determine what portions of a subset are within the northern hemisphere.

Usage

get.northern.hemisphere.booleans(subset, f, v, projection)

Arguments

subset

The subset to use.

f

The NetCDF file to use; an object of class ncdf4.

v

The variable in question.

projection

The proj4 string to use; NULL if the data is not in a projected coordinate space.

Details

Given a subset, a file, a variable, and a projection, determine what positions are within the northern hemisphere, returning the result as an array of booleans.

Value

An array of booleans corresponding to the subset containing TRUE if the point is within the northern hemisphere, and FALSE otherwise.

Examples


## Open files, etc.
input.files <- c("tasmax_NAM44_CanRCM4_ERAINT_r1i1p1_1989-2009.nc")
f <- list(nc_open(input.files))
f.v <- lapply(f, ncdf4.helpers::nc.get.variable.list, min.dims=2)
bools <- get.northern.hemisphere.booleans(list(X=1:2, Y=1:2), f[[1]], f.v[[1]], NULL)



ECA-D/ecad_indices_grid documentation built on Nov. 23, 2022, 6:04 a.m.