Condense NEMO MEDUSA Model Outputs into a Summary file
NEMO_MEDUSA.Rd
This function takes the metadata for multiple netcdf files. It then creates a single summary file for all variables according to an analysis argument.
Usage
NEMO_MEDUSA(
data,
analysis = NULL,
time_op = NULL,
out_dir = "./Objects/Months",
crop = NULL,
summary = NULL,
...
)
Arguments
- data
a dataframe containing the metadata of multiple netcdf files from a common month.
- analysis
A text string dictating the type of summary to create. Deprecated, supports "StrathE2E", "1D", & "slabR" for back compatibility.
- time_op
A text string dictating the type of summary to create. Currently supported summaries include "mean" & "collect". When using time_op all spatial summaries are controlled by slabR schemes.
- out_dir
a filepath to the directory to save summarised files in.
- crop
on the way out with the StrathE2E analysis type.
- summary
a dataframe of metadata to bind to summarised rows. The summary should be arranged by increasing group number from the summary scheme.
- ...
Additional arguments to be passed to get_* functions.
Value
The function returns a dataframe containing the monthly average shalllow and deep spatial grids for all the variables of interest in NEMO-MEDUSA outputs.
Details
The function takes the metadata for a collection of files which contain data from the same month. The files are split into data packets which share the same file type, before being passed to `temporal_operation` to be summarised. `temporal_operation` reduces the NEMO-MEDUSA model outputs from large arrays to summaries depending on the analysis chosen. The summaries for each file type are returned to this function and get bound into a single dataframe.
StrathE2E analysis returns effectively two matrices. Points outside the project window are removed before saving the dataframe for the month in "./Objects/Months/".
slabR uses a C++ routine to summarise arrays according to indices and a grouping scheme before saving the dataframe for the month in "./Objects/Months/".
1D analysis returns a vector of estimates at one pixel across all depths.
Creating intermediate monthly objects allows the terabytes of data to be reduced without encountering memory issues. Also, working on independent monthly packets of data means we can parallelise any data processing for speed.
See also
Other NEMO-MEDUSA variable extractors:
extractors_1D
,
extractors_slabR
,
get_spatial()