loadROI: Load the data for the region of interest (ROI)

View source: R/loadROI.R

loadROIR Documentation

Load the data for the region of interest (ROI)

Description

This function will load the air temperature data (SpatRaster) for the region of interest (ROI). The images loaded by this function are intended to be used, as example, for calculating the climatic zoning of crops. To calculate the climatic zoning of the crops, you first have to calculate the mean air temperature (function tmean) and the monthly air temperature (function tmean_monthly).

Usage

loadROI(variable, region, sub_region)

Arguments

variable

Stack of minimum (tmin) or maximum (tmax) air temperature (SpatRaster).

region

Use the "brazil" shapefile to extract the SpatRaster (variable) for one state (Brazilian state), or use the "biomes_brazil" to extract the Rasterstack (variable) for one biome of Brazil.

sub_region

You have two options in this section, if you choice the brazil (in region parameter) you need to choice the Brazilian states, but if you choice the biomes_brazil (in region parameter) you must choice one of Brazilian biomes.

Value

Load the tmin image example (minimum air temperature) or tmax image example (maximum air temperature) rasterstack

References

The images used in this package can be found in the paper: Abatzoglou, J.T., S.Z. Dobrowski, S.A. Parks, K.C. Hegewisch, 2018, Terraclimate, a high-resolution global dataset of monthly climate and climatic water balance from 1958-2015, Scientific Data.

Examples

## Not run: 

### Loading minimum air temperature and maximum air temperature based on Brazil states.
see_brazil_states()

image_tmin <-loadROI(variable = "tmin", 
                   region = "brazil", 
                   sub_region = 13) # sub_regions 1:27
                    
image_tmax <-loadROI(variable = "tmax",
                   region = "brazil", 
                   sub_region = 13)

### Loading minimum air temperature and maximum air temperature based on Brazil biomes.
see_brazil_biomes()

image_tmin <- loadROI(variable = tmin, 
                    region = "biomes_brazil",
                    sub_region = 5)# sub regions: 1:6 (biomes)
                    
image_tmax <-loadROI(variable = "tmax",
                   region = "biomes_brazil", 
                   sub_region = 5)


## End(Not run)

cropZoning documentation built on Oct. 11, 2023, 1:06 a.m.