obtain_CMIP5_MACAv2metdata_USA: Check and prepare local copy of CMIP5_MACAv2metdata dataset

Description Usage Arguments Value Notes References Examples

View source: R/ExtractData_ClimateDownscaling.R

Description

Check and prepare local copy of CMIP5_MACAv2metdata dataset

Usage

1
obtain_CMIP5_MACAv2metdata_USA(locations, dir_ex_fut)

Arguments

locations

A data frame. Two columns X_WGS84 and Y_WGS84 of locations describe rectangle for which data will be downloaded.

dir_ex_fut

A character string. The path name to future climate projections.

Value

If all files are available, then a message is printed to the R console with that information. Otherwise, the message points to a .sh script that was created at the MACAv2metdata_USA sub-folder. This script must be run separately to download the missing files.

Notes

The download scripts use wget, i.e., it must be available on your system to work. The scripts are based on the dataset repository setup at https://climate.northwestknowledge.net/MACA/index.php as of Dec 2019. This dataset has been bias corrected against gridMET.

References

Abatzoglou, J. T. (2013) Development of gridded surface meteorological data for ecological applications and modelling. Int. J. Climatol., 33: 121–131.

Examples

1
2
3
4
5
6
7
if (exists("SFSW2_prj_meta") && exists("SFSW2_prj_inputs")) {
  obtain_CMIP5_MACAv2metdata_USA(
    locations =
      SFSW2_prj_inputs[["SWRunInformation"]][, c("X_WGS84", "Y_WGS84")],
    dir_ex_fut = SFSW2_prj_meta[["project_paths"]][["dir_ex_fut"]],
  )
}

Burke-Lauenroth-Lab/SoilWat_R_Wrapper documentation built on Aug. 14, 2020, 5:17 p.m.