Repository for development and analysis of fluorescent dissolved organic matter (fDOM) forecasts in Southwest VA reservoirs
- Download or clone repository to your local computer
- Run './Scripts/1a_Install_Packages.R' to download needed packages
- Data for analysis and figure generation is already available in the github, if you want to recreated forecast summary files, see section below title "Instructions to recreate forecasts and scores"
- Run './Scripts/4_Analyze_4casts.Rmd' this script will generate figure and summary stats presented in the paper
- If you're interested in running an example forecast to see how the code works see section below titled "Running an Example Forecast"
NOTE: it will take several days to rerun all forecasts and require running multiple scripts and restarting functions in this time period
- Run
1a_Install_Packages.Rand1b_GenerateData.Rlocated in./Scripts/. These scripts will download all need packages and data to rerun the entire analysis. Before running script 1b you will need to download data from the zenodo data publication (doi: 10.5281/zenodo.15149352) and read note on lines 8-11 in script 1b. You can additionally just download the 'GeneratedData' folder from the zenodo data publication instead of recreating the input data. - Next run the Scripts in the folder
./Scripts/in the following order: 2a through 2f. These scripts will run fDOM forecasts from 13 March 2024 through 28 February 2025 using 6 different forecast models. Supporting functions to run these models can be found in./Scripts/Functionsfolder. Each function scripts contains one to multiple functions that support the generation of different forecast models. These scripts also contain code at the bottom that can be un-commented to run an example forecast. NOTE: each script labeled 2a - 2f can take < 1 - > 10 hours to run depending on forecast model, and some for loops will break when missing data is present, so the loop will have to be restarted. - To compile generated forecasts run the script
./Scripts/3_Compile_4cast_outputs.Rmd, this script will compile all forecasts into a csv with forecast scores to allow easier analysis. - Finally run script
./Scripts/4_Analyze_4casts.Rmd, to analyze forecast performance.
NOTE on data folder: This folder is used to both hold generated data from script ./Scripts/1b_Download_Data.R that is to large to reload each forecast run, and hold data from forecast outputs. Do to large size of these folders and csv, not all data is pushed to github, but if you want to recreate all analysis steps these folders are used to hold outputs.
- Follow step 1 in 'Instruction to recreate forecast and scores', and specifically download the 'GeneratedData' folder. This will download all need packages and data to rerun the entire analysis.
- Each script in the
./Scripts/Functionsfolder contains example code at the bottom of the script to run an example forecast for one day. Make sure you have followed step 1. Then uncomment the 'Test Function' code at the bottom of the script and run the entire script to generate an example forecast using each model type.