dbpf_export_nc_erddap: Download ground temperature time series to ERDDAP-optimized...

View source: R/dbpf_export_nc_erddap.R

dbpf_export_nc_erddapR Documentation

Download ground temperature time series to ERDDAP-optimized netcdf file

Description

Downloads one or more time series from the carleton permafrost database and export as a netCDF file. The netCDF file is designed to accommodate many stations with the same number of measurement depths (same number of thermistors), but with different depth values. It is possible to group stations with different numbers of measurement depths but this is at the cost of wasted space: any station with fewer measurement depths will have missing values for any depth levels that it lacks.

Usage

dbpf_export_nc_erddap(con, location_name, file_name, freq = "daily")

Arguments

con

Database connection object, as returned by dbpf_con()

location_name

Character, one location name corresponding to a location with temperature data.

file_name

character, path to output netCDF file (*.nc)

freq

Character, one of ('daily', 'hourly'). Interval at which data is to be aggregated from the database.

Details

Requires that the PermafrostDB, reshape2 and ncdf4 packages be installed. The file structure is based on H.5.1. "Multidimensional array representations of time series profiles" with Example H.16 used as a template and a one-dimensional time coordinate variable.

This structure is designed to accommodate stations with the same number of measurement depths (levels) but with different depth values for each level. For example one thermistor may measure temperature at 1.0, 2.0 and 3.0 m and another may measure temperature at 0.5, 1.5 and 5.0 m. Both have three measurement depths

Author(s)

Nick Brown <nick.brown@carleton.ca>


geocryology/PermafrostDB documentation built on April 17, 2025, 11:54 a.m.