csm_create_data_structure: Create a cropping systems model (CSM) data structure

View source: R/csm_create_data_structure.R

csm_create_data_structureR Documentation

Create a cropping systems model (CSM) data structure

Description

Create a cropping systems model (CSM) data structure

Usage

csm_create_data_structure(name, definition, variables, n_dim = 1)

Arguments

name

a length-one character vector name of a variable

definition

the definition of the data structure

variables

a list of the CSM variables (as defined with [csmbuilder::csm_create_variable()]) that are contained within the data structure

n_dim

the number of dimensions in the data structure; default value of 1 (i.e. each variable is expected to be a scalar value)

Value

a list of 'csm_data_structure' objects

Examples


# Create variables:
wth_variables <- c(
  csm_create_variable("time",
                      "time of observation",
                      "days"),
  csm_create_variable("Tair",
                      "air temperature",
                      "Celsius"),
  csm_create_variable("SRAD",
                      "solar radiation",
                      "MJ/m2/d"))

# Create weather data structure:
weather <- csm_create_data_structure("weather",
                                     "weather data",
                                     wth_variables,
                                     n_dim = 2)


csmbuilder documentation built on Sept. 19, 2026, 1:06 a.m.