get_ereefs_profile.Rd
See also plot_ereefs_profile(), which relies on output from this function.
Latitude and longitude of location to extract. Defaults to c(-23.39189, 150.88852)
Date from which to start extraction. Can be a date, or text formatted for as.Date(), or a (year, month, day) vector. Defaults to c(2016, 02, 04). If start_date is a vector, 0.499 is added to the calculated date to bring the start as close to midday as possible.
Date on which to end extraction, specified as for start_date. Defaults to c(2016, 03, 02).
is the URL or file location of any of the EMS output files or a THREDDS catalog URI. Defaults to a menu selection based on current NCI catalogs. Can also be set to "nci", "menu" or "catalog" for the same behaviour. Set to "old_menu" to provide old menu options instead of menu options from the NCI catalog. Numeric values are interpreted as references to selections available from the old menu. Short codes can be used for some options (codenames as used in https://research.csiro.au/ereefs/models/model-outputs/access-to-raw-model-output/ )
Either a list containing the coordinates of the cell corners (x_grid, y_grid and z_grid) or the name of the locally-stored or opendap-served netcdf file that contains these. If not specified, the function will first look for z_grid can be found in the first INPUT_STEM file, and if not found, will check whether the size of the variables in the input file corresponds to the size expected for GBR4 or GBR1, and load an appropriate z grid from data files stored in this package. Alternatively, you can provide the location of a full (not simple-format) ereefs netcdf output file such as "http://dapds00.nci.org.au/thredds/dodsC/fx3/gbr4_hydro_all/gbr4_all_2016-09.nc".
The URI or file location of the model output files that contains the surface elevation (eta), or the stem of that filename minus the date components of the filename in the case of GBR1 or GBR4 files, and ommitting the file extension, ".nc". Needed only if eta is not in the files indicated by input_stem (e.g. some GBR1 bgc files). Assumes that the eta files contain data on the same time-step as the input files.
Whether to reduce the number of dimensions in the output profiles array if there is only one variable and/or only one time-step. Default TRUE.
A vector of EMS variable names. Defailts to c('Chl_a_sum', 'TN'))
a list containing a vector of dates, an array of surface elevations (eta), the vertical grid (z_grid) and a data frame of values.
Note that this function assumes consistent frequency of model output, even if the time-series extends across multiple output files (e.g. multiple months of eReefs output). If the data in eta_stem is output on a different interval from the data in input_file, the function will do its best, but surface elevation estimates may not exactly match the time-stamps in the main input file.
Known bugs: currently only works for one time-step at a time for 4km hydrodynamic model output. As a work-around, either call once for each time-step or exctract hydrodynamic variables from the bgc model output.