Skip to contents

This function extracts a specified First Order Region (FOR) parameter from a SeaSondeRCS object.

Usage

seasonder_getFORParameter(seasonder_cs_object, FOR_parameter)

Arguments

seasonder_cs_object

A SeaSondeRCS object containing FOR parameters.

FOR_parameter

A character string specifying the name of the FOR parameter to retrieve.

Value

The value of the specified FOR parameter if found; otherwise, an error message is logged.

Details

The function retrieves the list of FOR parameters using seasonder_getFOR_parameters() and extracts the value associated with FOR_parameter. If the parameter is not found, an error is logged.

Examples

# Minimal example for seasonder_getFORParameter
cs_file <- system.file("css_data/CSS_TORA_24_04_04_0700.cs", package = "SeaSondeR")
apm_file <- system.file("css_data/MeasPattern.txt", package = "SeaSondeR")
apm_obj <- seasonder_readSeaSondeRAPMFile(apm_file)
#> seasonder_createSeaSondeRAPM:  APM object created successfully.
cs_obj <- seasonder_createSeaSondeRCS(cs_file, seasonder_apm_object = apm_obj)
#> new_SeaSondeRCS:  SeaSondeRCS object created successfully.
nsm_value <- seasonder_getFORParameter(cs_obj, "nsm")
print(nsm_value)
#> [1] 2