Helper function that returns names and descriptions of STICS output variables from a partial name and/or descriptive keywords.

get_var_info(var = NULL, keyword = NULL, stics_version = "latest")

Arguments

var

Vector of variable names (or partial names). Optional, if not provided, the function returns information for all variables.

keyword

Search by keyword instead of variable name (search in the name and description field)

stics_version

Name of the STICS version. Optional, can be used to search parameters information relative to a specific STICS version. By default the latest version returned by get_stics_versions_compat() is used.

Value

A data.frame with information about variable(s) with columns name, definition, unit, type

Details

The function understand regex as input.

Examples


# Find by variable name (fuzzy search):
SticsRFiles::get_var_info("lai")
#>              name
#> 5       albedolai
#> 242        exolai
#> 338        innlai
#> 353        lai(n)
#> 354 lai_mx_av_cut
#> 355        laimax
#> 356     laisen(n)
#> 742         splai
#> 805       ulai(n)
#>                                                           definition
#> 5                   albedo of the crop including soil and vegetation
#> 242              reduction factor on leaf growth due to water excess
#> 338 reduction factor on leaf growth due to NNI (nitrogen deficiency)
#> 353                                          leaf area index (table)
#> 354            LAI before cut (for cut crops , for others = lai(n) )
#> 355                                          maximum leaf area index
#> 356                      leaf area index of senescent leaves (table)
#> 742                source to sink ratio of assimilates in the leaves
#> 805                                relative development unit for LAI
#>            unit type
#> 5            SD real
#> 242         0-1 real
#> 338 innmin to 1 real
#> 353      m2.m-2 real
#> 354          SD real
#> 355      m2.m-2 real
#> 356      m2.m-2 real
#> 742          SD real
#> 805         0-3 real

# Find by keyword (fuzzy search in variable name and description):
SticsRFiles::get_var_info(keyword = "lai")
#>                   name
#> 5            albedolai
#> 171 diftemp1intercoupe
#> 172 diftemp2intercoupe
#> 242             exolai
#> 334     inn1intercoupe
#> 336     inn2intercoupe
#> 338             innlai
#> 353             lai(n)
#> 354      lai_mx_av_cut
#> 355             laimax
#> 356          laisen(n)
#> 360               leai
#> 742              splai
#> 745     str1intercoupe
#> 746     str2intercoupe
#> 747     stu1intercoupe
#> 748     stu2intercoupe
#> 801           tustress
#> 805            ulai(n)
#>                                                                                                         definition
#> 5                                                                 albedo of the crop including soil and vegetation
#> 171        mean difference between crop and air temperatures during the vegetative phase (emergence - maximum LAI)
#> 172       mean difference between crop and air temperatures during the reproductive phase (maximum LAI - maturity)
#> 242                                                            reduction factor on leaf growth due to water excess
#> 334                               average NNI during the cut (cut crop vegetative phase: emergence to maximum LAI)
#> 336                             average NNI during the cut (cut crop reproductive phase: maximum LAI  to maturity)
#> 338                                               reduction factor on leaf growth due to NNI (nitrogen deficiency)
#> 353                                                                                        leaf area index (table)
#> 354                                                          LAI before cut (for cut crops , for others = lai(n) )
#> 355                                                                                        maximum leaf area index
#> 356                                                                    leaf area index of senescent leaves (table)
#> 360                                                                                 Leaf+ear area index = lai +eai
#> 742                                                              source to sink ratio of assimilates in the leaves
#> 745      average stomatal water stress index during the vegetative phase (emergence - maximum LAI) of forage crops
#> 746    average stomatal water stress index during the reproductive phase (maximum LAI  - maturity) of forage crops
#> 747   average turgescence water stress index during the vegetative phase (emergence - maximum LAI) of forage crops
#> 748 average turgescence water stress index during the reproductive phase (maximum LAI  - maturity) of forage crops
#> 801                      reduction factor on leaf growth due to the effective water stress  (= min(turfac,innlai))
#> 805                                                                              relative development unit for LAI
#>            unit type
#> 5            SD real
#> 171     degreeC real
#> 172     degreeC real
#> 242         0-1 real
#> 334         0-2 real
#> 336         0-2 real
#> 338 innmin to 1 real
#> 353      m2.m-2 real
#> 354          SD real
#> 355      m2.m-2 real
#> 356      m2.m-2 real
#> 360      m2.m-2 real
#> 742          SD real
#> 745         0-1 real
#> 746         0-1 real
#> 747         0-1 real
#> 748         0-1 real
#> 801         0-1 real
#> 805         0-3 real

# Find for a particular version:
SticsRFiles::get_var_info("lai", stics_version = "V9.0")
#>              name
#> 4       albedolai
#> 173        exolai
#> 253        innlai
#> 267 lai_mx_av_cut
#> 268        lai(n)
#> 269        laimax
#> 270     laisen(n)
#> 500         splai
#> 556       ulai(n)
#>                                                           definition
#> 4                   albedo of the crop including soil and vegetation
#> 173              reduction factor on leaf growth due to water excess
#> 253 reduction factor on leaf growth due to NNI (nitrogen deficiency)
#> 267            LAI before cut (for cut crops , for others = lai(n) )
#> 268                                          leaf area index (table)
#> 269                                          maximum leaf area index
#> 270                      leaf area index of senescent leaves (table)
#> 500                source to sink ratio of assimilates in the leaves
#> 556                                relative development unit for LAI
#>            unit type
#> 4            SD real
#> 173         0-1 real
#> 253 innmin to 1 real
#> 267          SD real
#> 268      m2.m-2 real
#> 269      m2.m-2 real
#> 270      m2.m-2 real
#> 500          SD real
#> 556         0-3 real