View source: R/npn_geoserver.R
resolve_six_raster | R Documentation |
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.
resolve_six_raster(year, phenophase = "leaf", sub_model = NULL)
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). |
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.
Returns a raster object of the appropriate SI-x layer.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.