get_nwm_grids: Get NWM hydrologcic grids

View source: R/nwm_grids.R

get_nwm_gridsR Documentation

Get NWM hydrologcic grids

Description

Base Nextgen requires summary data from 17 layers across the soilproperties_CONUS_FullRouting GWBUCKPARM_CONUS_FullRouting, and wrfinput_CONUS NWM NetCDF files. These three files have been combined and the needed layers extracted. If this dataset doesn't exist locally, it can be built using this function (download_cache = FALSE) or downloaded from ScienceBase (download_cache = FALSE). The spatial metadata in these files is incomplete and needs to be corrected. This can be done by passing the path returned by this function when spatial = FALSE to correct_nwm_spatial or, spatial can be set to TRUE. Using data_cache = FALSE requires NCO to be installed!

Usage

get_nwm_grids(dir = NULL, spatial = FALSE, download_cache = TRUE)

Arguments

dir

directory where file should exist

spatial

should the returned object be a file path (spatial= FALSE, default) or SpatRast (spatial = TRUE)

download_cache

if the file does not exist locally, should it be downloaded (TRUE) or built from raw data (FALSE)

Value

a file path (spatial = FALSE) or SpatRast object (spatial = TRUE)


mikejohnson51/hyAggregate documentation built on July 1, 2022, 2:42 p.m.