Skip to content

Instantly share code, notes, and snippets.

@mdsumner
Created August 12, 2022 10:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mdsumner/11f594be44a81e69e923e0501a2a7ae1 to your computer and use it in GitHub Desktop.
Save mdsumner/11f594be44a81e69e923e0501a2a7ae1 to your computer and use it in GitHub Desktop.

get HBV and open with terra

wget http://www.gloh2o.org/data/HBV_parameter_maps_V0.9.zip  
unzip HBV_parameter_maps_V0.9.zip 

then in R

library(terra)
x <- terra::rast(fs::dir_ls("00"))
x
class       : SpatRaster 
dimensions  : 1800, 3600, 16  (nrow, ncol, nlyr)
resolution  : 0.1, 0.1  (x, y)
extent      : -180, 180, -90, 90  (xmin, xmax, ymin, ymax)
coord. ref. : lon/lat WGS 84 
sources     : params_BETA.nc  
              params_CET.nc  
              params_CFMAX.nc  
              ... and 13 more source(s)
varnames    : BETA 
              CET 
              CFMAX 
              ...
names       : BETA, CET, CFMAX, CFR, CWH, FC, ... 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment