Takes data from a NetCDF file and generates a csv file containing the box-specific values. If the variable is distributed in the vertical then the value on the bottom water layer is returned. This function is useful when collecting data from Atlantis models in order to parameterise new Atlantis models. Incorrect output may be produced if the number of boxes equals the number of time steps or water layers.
get.init.nc(nc.file, output.file)
name of the NetCDF file containing the initial conditions.
name of the csv file where data is written.
Null (always). Produces a csv file with the name ouput.file
.
if (FALSE) {
nc.file <- "~/Atlantis/RunFiles/SEAP/params/initSEAPaquacult_pH.nc"
output.file <- "oldData.csv" ## where to write the data
get.init.nc(nc.file, output.file) ## extract data from the NetCDF file
}