resolve_six_raster: Resolve SIX Raster

View source: R/npn_geoserver.R

resolve_six_rasterR Documentation

Resolve SIX Raster

Description

Utility function used to resolve the appropriate SI-x layer to use based on the year being retrieved, the phenophase and sub-model being requested.

Usage

resolve_six_raster(year, phenophase = "leaf", sub_model = NULL)

Arguments

year

String representation of the year being requested.

phenophase

The SI-x phenophase being requested, 'leaf' or 'bloom'; defaults to 'leaf'.

sub_model

The SI-x sub model to use. Defaults to NULL (no sub-model).

Details

If the year being requested is more than two years older than the current year then use the prism based layers rather than the NCEP based layers. This is because the PRISM data is not available in whole until midway through the year after it was initially recorded. Hence, the 'safest' approach is to only refer to the PRISM data when we knows for sure it's available in full, i.e. two years prior.

Sub-model and phenophase on the other hand are appended to the name of the layer to request, no special logic is present in making the decision which layer to retrieve based on those parameters.

Value

Returns a raster object of the appropriate SI-x layer.


rnpn documentation built on Aug. 30, 2023, 5:19 p.m.