Skip to content

Commit

Permalink
add CABCM shortcut
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejohnson51 committed Mar 20, 2024
1 parent e91ae02 commit b9e1908
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 4 deletions.
2 changes: 0 additions & 2 deletions R/climater_filter.R
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ climater_filter <- function(id = NULL,
stop("no data to filter.", call. = FALSE)
}



if(inherits(AOI, "list")){
AOI = AOI[[1]]
}
Expand Down
24 changes: 23 additions & 1 deletion R/shortcuts.R
Original file line number Diff line number Diff line change
Expand Up @@ -582,11 +582,33 @@ getISRIC_soils = function(AOI = NULL, varname = NULL, verbose = TRUE, ID = NULL)
}
}

#' @title Get California Basin Characterization Model (CABCM) historical and projected climate and hydrology data.
#' @description The California Basin Characterization Model (CABCM) dataset provides historical and projected climate and hydrology data at a 270 meter resolution, which is relevant for watershed-scale evaluation and planning.
#' @inheritParams climater_filter
#' @inheritParams climater_dap
#' @inheritParams getTerraClim
#' @inherit getTerraClim return
#' @family shortcuts
#' @export

getCABCM = function(AOI = NULL, varname = NULL, model = 'CNRM', scenario = NULL,
startDate, endDate = NULL,
verbose = FALSE, ID = NULL, dryrun = FALSE){

model = c("HST", model)

climater_dap('cabcm',
as.list(environment()),
verbose, dryrun)

}


#' @title Get MERRA2
#' @description MERRA2
#' @inheritParams climater_filter
#' @param year Land cover product year 1985 - 2019 (default = 2019)
#' @param type product type (primary landcover (default), secondary landcover, primary confidence, secondary confidence, cover change, change day, change magniture, model cquality, spectral stability, spectral lastchance)
#' @param type product type (primary landcover (default), secondary landcover, primary confidence, secondary confidence, cover change, change day, change magnitude, model quality, spectral stability, spectral lastchance)
#' @inherit getTerraClim return
#' @family shortcuts
#' @export
Expand Down
2 changes: 1 addition & 1 deletion R/update_catalog.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ read_live_catalog = function(url = paste0('https://github.com/mikejohnson51/clim
'/releases/latest/download/',
'catalog.parquet')) {
read_parquet(url)
}
}
Binary file modified data/catalog.rda
Binary file not shown.

0 comments on commit b9e1908

Please sign in to comment.