createTimeSeriesProfileNCF: Create empty netCDF file for (temperature) time series...

View source: R/dbpf_export_nc_erddap.R

createTimeSeriesProfileNCFR Documentation

Create empty netCDF file for (temperature) time series profile

Description

Creates a netCDF file with specified dimensions. The file has no data within it, but must be added in afterwards. Thermistors should may have different measurement depths but should have the same number of measurement depths (levels)

Usage

createTimeSeriesProfileNCF(
  file,
  n_stations,
  n_timestep,
  n_levels,
  close_file = F,
  time_units = "days since 1970-01-01 00:00:00"
)

Arguments

file

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

n_stations

integer, how many sites are to be added to the file

n_timestep

integer, the number of unique timesteps for which there is temperature data

n_levels

integer, the largest number of depth measurements in any profile

close_file

logical, whether or not to close the connection to the file after creation. Leaving the file open allows for the immediate addition of data. Defaults to FALSE.

time_units

netcdf4-style string description of time units

Details

The file structure is based on H.5.1. "Multidimensional array of time series profiles representation of time series" (http://cfconventions.org/cf-conventions/v1.6.0/cf-conventions.html#_multidimensional_array_representations_of_time_series_profiles) * Depth values are not time-dependent, therefore the depth levels of a station must not change between time periods

Author(s)

Nick Brown <nick.brown@carleton.ca>


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