ncss-tech / jNSMR

R frontend for the Java Newhall Simulation Model (jNSM) -- "A Traditional Soil Climate Simulation Model"
https://ncss-tech.github.io/jNSMR
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

wrapper functions for SCAN/SNOTEL, CDEC, etc #5

Open dylanbeaudette opened 2 years ago

dylanbeaudette commented 2 years ago

Would be nice to have some convivence functions for converting the output from e.g. fetchSCAN() into the format used in batch mode. Mostly preservation of IDs, long → wide format, etc..

brownag commented 2 years ago

I think this would be useful, though for jNSMR we would need to have SCAN/SNOTEL/CDEC data aggregated to a monthly timestep. I think we probably could customize a single function so generic ~daily data in long format can be put into the jNSM "batch CSV" format.

Sketching out one of these convenience functions:

Arguments to this function might include:

I think this function could be written such that it could deal with a wide range of time intervals converted to monthly. Range from very fine scale measurements on e.g. 10 minute intervals, to daily, to weekly, to one per month for one or more years should be possible.