createSurfaceLoggerNCF: Create empty netCDF file for surface temperatures

View source: R/dbpf_export_nc_surface.R

createSurfaceLoggerNCFR Documentation

Create empty netCDF file for surface temperatures

Description

Creates a netCDF file with specified dimensions. The file has no data within it, but must be added in afterwards. The netCDF file structure can accommodate one or more surface loggers with different beginning and end dates, but to economise on the file type, the time series should share measurement times.

Usage

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

Arguments

file

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

n_timestep

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

n_stations

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

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.2.1. "Orthogonal multidimensional array representation of time series" (http://cfconventions.org/cf-conventions/v1.6.0/cf-conventions.html#_orthogonal_multidimensional_array_representation_of_time_series)

The container has 2 dimensions (time and station) and 4 variables (soil_temperature, latitude, longitude, platform_id).

Author(s)

Nick Brown <nick.brown@carleton.ca>


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