Skip to content

daniellegrogan/WBMr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

89 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WBMr

This repository conatains the following R files:

WBM-specific:

wbm_load.R

Functions: wbm_load()

  • Uses the raster package to load WBM output files into R
  • Reads multiple yearly WBM files into a single raster stack
  • Only loads one variable

spatial_aggregation.R

Functions:

spatial_aggregation()

  • Given gridded data and a polygon shapefile, aggregates grid values to polygons.
  • Option: sum or average over polygons.
    • If sum is used, the function assumes the data is in mm and aggregates to km3 using either input grid area, or calculates grid area.

global.sum()

  • Given gridded data, sums or averages all grids.
    • If sum, then input is assumed to be mm and output is in km3. Uses either input grid area, or calculates grid area.

global.sum.stack() NOTE: this function should be updated/merged with global.sum()

spatial.agg.ts()

linear_val.R

Functions:

linear_reg()

linear_val()

map_r2() *NOTE: need to make legend placement option, or at least place legend outside of map boundaries

General hydrology:

NSE.R

Functions: NSE()

Links to other data or models:

get_USGS_data.R

Functions: get_USGS_data()

FDC.R Functions: FDC()

About

R scripts for processing and plotting WBM output. Also useful for general hydrology and gridded data processing.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages