R package to facilitate extracting and visualising eReefs model output data
An R package has been created to help R users to access and visualise eReefs marine model outputs directly from NCI servers. The package contains a few useful functions to make accessing eReefs and other CSIRO-EMS output files easier, and is available through https://github.com/AIMS/ereefs. Example use-cases include:
- Extracting time-series of simulated water quality at your monitoring stations, to use together with observational data.
- Visualising a recent event in your area as an animated map.
- Extracting simulated data along a specified transect, such as a ship track.
- Extracting a vertical profile at a specified location and time.
- Extracting a vertical slice at a specified location and time.
Installation instructions:
Windows
Copy and paste the following three lines into R (you can skip the first line if you already have devtools):
install.packages("devtools")
devtools::install_github("BarbaraRobson/ereefs")
devtools::install_github("mdsumner/ncdf4")
Note that the package does not work with the CRAN version of the ncdf4 package for Windows, as it is compiled without support for OPeNDAP-served netcdf files. You will need the mdsumner version as above. If you have this version installed, you will still see a warning from several functions, but they should work correctly so you can ignore the warning.
Linux or MacOS
Copy and paste the following two lines into R (you can skip the first line if you already have devtools):
install.packages("devtools")
devtools::install_github("BarbaraRobson/ereefs")
The package includes:
Functions to extract time-series from eReefs netcdf files
get_ereefs_ts()
get_ereefs_depth_integrated_ts ()
get_ereefs_depth_specified_ts()
get_ereefs_bottom_ts()
Functions to produce maps or animations of eReefs model outputs
map_ereefs()
map_ereefs_movie()
plot_map()
Function to calculate optical plume class from modelled surface reflectances
plume_class()
Functions to extract profiles and vertical slices
get_ereefs_profile()
get_ereefs_slice()
Functions to plot profiles
plot_ereefs_profile()
plot_ereefs_zvt()
Functions to convert outputs to GIS formats
poly2sp()
sp2raster()