get_ice: get ice depth from GLM simulation

View source: R/get_ice.R

get_iceR Documentation

get ice depth from GLM simulation

Description

Creates a data.frame with DateTime and ice.
This function sums the thickness of the clear ice, white ice, and optionally, the thickness of snow for each timestep in the GLM model.

Usage

get_ice(file = "output.nc", snow.rm = TRUE, ...)

Arguments

file

a string with the path to the netcdf output from GLM

snow.rm

a boolean for ignoring snow depth in the calculation of ice thickness

...

additional arguments passed to resample_sim

Value

a data.frame with DateTime and ice (in meters)

Author(s)

Luke A. Winslow, Jordan S. Read

Examples

sim_folder <- run_example_sim(verbose = FALSE)
nc_file <- file.path(sim_folder, 'output/output.nc')
ice <- get_ice(nc_file)
ice_and_snow <- get_ice(nc_file, snow.rm = FALSE)
plot(ice)
points(ice_and_snow, col = "red")

USGS-R/glmtools documentation built on March 26, 2024, 5:43 p.m.