Skip to content

Assumed Directory Structure

Alan Butler edited this page Aug 12, 2016 · 2 revisions

Directory Structure

Process-CRSS-Res is setup to work with the following directory structure. The Process-CRSS-Res folder can be anywhere, but the CRSS_DIR environment variable should be setup on your computer. However, main.R should be run from within the Process-CRSS-Res folder, i.e., set the working directory to this folder. Or better yet, save your fork of Process-CRSS-Res with an RStudio .Rproj file.

If the CRSS.2016 folder exists within the C:\model\CRSS folder, then CRSS_DIR should be set to C:\model\CRSS\CRSS.2016.

The folder will contain the following folders, and some others not listed here.

CRSS_DIR
|-- ruleset
|-- model
|-- dmi
|-- Scenario
    |-- Apr2017_2016,DNF,2007Dems,IG,1981
    |-- Apr2017_2016,DNF,2007Dems,IG,1982
    |-- Aug2017_2016,DNF,2007Dems,IG
|-- results
    |-- Apr
        |-- tempData
        |-- pdf figures, csv files
    |-- Aug
        |-- tempData
        |-- pdf figures, csv files

Generally, the scenario data created from RiverSMART should exist in the Scenario folder. However, if it does not, iFolder from main.R can be modified to point to the appropriate folder. Each Scenario folder should be made up of several comma separated names. The code assumes that the first entry of the scenario folder name is the model name. This is used by startMonthMap to create proper names for figures that plot multiple scenarios.

The code will process the CRSS output in the Scenario folders specified in main.R and save the results and intermediate data in the results folder.

The crssMonth variable in main.R determines the name of the directory within the results folder that will be created. This allows you to run the code multiple times and save the output in different folders. The generated figures (pdf files) and tables (csv files) are saved within these sub-folders. Additionally, the intermediate data is saved in a tempData folder. The intermediate data is saved in "feather" format. Feather format provides very fast read/write of large data, so it is great for saving the intermediate data frames. It is not a stable format, yet. However this is ok, because the code recreates these data if need be.

Clone this wiki locally