Data for "Scaling up tidal wetland restoration improves estuary-wide water quality"
收藏资源简介:
These are the data needed to run analyses in RStudio for the journal article "Scaling up tidal wetland restoration improves estuary-wide water quality". Input data for RStudio analyses are from model outputs (RMA - see below) or are collected data, as described in the research article. The R scripts used to analyse the data are available on GitHub, which will include any updates to code (see link below). The "Script" folder should be downloaded and placed in the same folder as the folders here ("Data" and "Output" and "RMA_raw" (although see caveat about the "RMA_raw" folder in the next paragraph)). If you create an RStudio Project to run this, create that in the base folder containing all these folders so all relative paths in the code work correctly. The "GenerateBatchRMAResults" scripts are used to turn RMA outputs into inundation and denitrification results. There is one step in the process that uses the executable RMAPLT to generate ASCIIs (warning: large storage requirement) needed for further analyses. This executable is included in here, noting that relative file paths to the other files in "RMA_raw" need to be retained for this executable to run properly, as it expects files to be located in specific relative folders. This "RMA_raw" folder should be stored locally, somewhere with a short file path, and can be in a separate location to "Data", "Output" and "Script" if needed. Note also that many of the "write" lines in this code have been commented out; these will need to be uncommented to produce outputs needed for subsequent steps in the analysis. The "Scenario6" version of "GenerateBatchRMAResults" contains code to combine results from all scenarios. The mostly empty "Output" and subfolders have been included so that the structure is set up as expected by the scripts. In a couple places, files have been included in the Output folder (specifically in the csv folder). This is so the denitrification steps in the "GenerateBatchRMAResults" scripts and the "CalculateWaterQualityChange" script could be run by a user without the storage-heavy inundation steps, if desired. RMA Results The files in "RMA_raw" are the model files needed to replicate RMA analyses. The RMA results files (.rma) were too large to attach here (~5Gb each * 11). So instead, to replicate results, drag the .rm2 files in each of the folders in "runs" in "RMA_raw" onto the RMA2 executable and this will create the results files (note, each run takes at least 24 hours). Out of the output files created from this, you just need the .rma file and can delete the rest (especially the .out file, which takes a huge amount of space). Keep these .rma files in their respective folders in "runs" so the above scipts can run properly. To run the "GenerateBatchRMAResults" scripts, you'll need to create a "runbatch" folder in each folder in "runs" (the script will prompt you to do this if you don't). If you want to run denitrification code without generating the .rma files, the outputs from the inundation part of the "GenerateBatchRMAResults" scripts are included in the "csv" folder. To run the denitrification part only, first run the "packages" part of the script and the line defining "model". Then scroll down to where you load a dataset assigned "alltime". Run this line, then scroll down to the chunk of code that manipulates a DEM (merged_2014). Run this whole chunk and all the following chunks, then you will be able to run denitrification code.



