Load NetCDF file

Share:

Description

Load specified variables and time stamp information from NetCDF file in Fluxnet BGI format. The time stamp information needs to be provided as variables 'year', 'month', 'day', 'hour'.

Usage

1
2
3
fLoadFluxNCIntoDataframe(VarList.V.s, FileName.s, Dir.s = "", 
    NcPackage.s = "ncdf4", fReadTime = fReadTimeSeveralCols, 
    ...)

Arguments

VarList.V.s

Vector of variables to be read in

FileName.s

File name

Dir.s

Directory

NcPackage.s

Name of R NetCDF package (implemented for 'RNetCDF' and 'ncdf4')

fReadTime

function that reads time columns, must append columns year (from 0AD), month, day, and hour (fractional)

...

further arguments to var.get.nc or ncvar_get, such as start and count

Value

Data frame with data from nc file.

Author(s)

AMM, KS (Department for Biogeochemical Integration at MPI-BGC, Jena, Germany)

Examples

1
2
3
4
if( FALSE ) { #Do not always execute example code (e.g. on package installation)
  Dir.s <- paste(system.file(package='REddyProc'), 'examples', sep='/')
  EddyNCData.F <- fLoadFluxNCIntoDataframe(c('NEE', 'Rg', 'NEE_f'), 'Example_DE-Tha.1996.1998.hourly.nc', Dir.s)
}

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.