checkTimePeriod: Check for continuous time periods in CMIP5 files

Description Usage Arguments Details Value Note See Also Examples

View source: R/checkTimePeriod.R

Description

Check that all time periods are continuous and present for multi-file ensembles. Before starting to process what may be hundreds or thousands of CMIP5 files, it's a good idea to verify that your file set is complete and not missing any years.

Usage

1
checkTimePeriod(fileInfo_df)

Arguments

fileInfo_df

data.frame from getFileInfo

Details

This function calls getFileInfo to scan a directory tree, and then examines the time data in these filenames. These time signatures will be concatenated and an 'allHere' flag returned.

Value

A data frame showing which ensembles are continuous, and which are not. In addition to standard identifying fields in the data frame (domain, model, experiment, variable, and ensemble), this includes:

yrStr

A concatenation of time strings for all ensembles

allHere

a quick check for yr and mon frequency

startDate

Earliest (decimal) date for the ensemble

endDate

Latest (decimal) date for the ensemble

file

The number of files in the ensemble

Note

This only works for files that are in domains 'fx', 'mon', or 'yr'. Decimal time is (year + (month-1)/12).

Unfortunately it's impossible to automatically check the time signature for sub-monthly frequencies quickly, i.e. without opening the NetCDF file.

See Also

getFileInfo

Examples

1
2
3
4
## Not run: 
checkTimePeriod(getFileInfo())

## End(Not run)

JGCRI/RCMIP5 documentation built on May 7, 2019, 7:43 a.m.