Git Product home page Git Product logo

rastestr's Introduction

RAStestR

This package has been deprecated.

Development has shifted to RASminer.

An R package for working with HEC-RAS outputs. Provides functions for reading and manipulating RAS HDF outputs with a focus on sediment simulations. Also provides automatic report generation for comparing simulations.

rastestr's People

Contributors

mkoohafkan avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

rastestr's Issues

add RAS version checking for list_*

list_* functions are not currently checking if they support the RAS version specified. This should be added to the case statement

stop("RAS version ", ras.version, " is not currently supported", .call = FALSE)

maintain information on Rivers and Reaches

Right now the read_* methods label columns in the format XS_###.## with cross section stationing. River and Reach information should also be included, either in the format of the column names (e.g. River/Reach/###.##) or as attributes of the data frame.

major slowdown after transitioning to hdf5r package

test case: Compare the master branch (h5-based) to hdf5r_transition branch (hdf5r-based).

require(microbenchmark)
ras.file = system.file("sample-data/SampleQuasiUnsteady.hdf", package = "RAStestR")
microbenchmark(vol.change.cum <- read_sediment(ras.file, "Vol Bed Change Cum"))

microbenchmark results:

Unit: milliseconds
expr        min       lq     mean   median       uq      max neval
h5       100.51 104.1777 110.2355 106.9395 111.2867 197.3422   100
hdf5r  5685.172 5761.895 5860.317 5813.281 5908.393 6482.691   100

Benchmark for single table reads:

get_dataset_hdf5r = function(f, table.path) {
  x = hdf5r::H5File$new(f)
  g = x$open(table.path)
  res = g$read()
  g$close()
  x$close()
  res
}

get_dataset_h5 = function(f, table.path, type = "double") {
  x = h5::h5file(f)
  g = h5::openDataSet(x, table.path, type)
  res = h5::readDataSet(g)
  h5::h5close(g)
  h5::h5close(x)
  res
}

myfile = system.file("sample-data/SampleQuasiUnsteady.hdf", package = "RAStestR")
mytable =  "Results/Sediment/Output Blocks/Sediment/Sediment Time Series/Cross Sections/Vol Bed Change Cum"

microbenchmark(
  get_dataset_hdf5r(myfile, mytable),
  get_dataset_h5(myfile, mytable)
)

microbenchmark results:

Unit: milliseconds
                               expr      min       lq     mean   median       uq       max neval
 get_dataset_hdf5r(myfile, mytable) 3.898140 3.995330 4.196941 4.093295 4.254240  6.102233   100
    get_dataset_h5(myfile, mytable) 1.558758 1.607431 2.190121 1.677407 1.758579 50.932394   100

hdfqlr transition

Tasks:

  1. Migrate backend from hdf5r to hdfqlr.
  2. Use long table format by default. This will resolve some of the complications with River/Reach/Station naming convention and avoid need for matrix transposing (since HDFql swaps row-column order).
  3. Separate some of the advanced functionality into separate package. Maybe time to rename/start a fresh repository...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.