Learn R Programming

CDSim (version 0.1.1)

write_station_netcdf: Write station NetCDF (station x time) Exports a simulated climate station dataset to a NetCDF file.

Description

Write station NetCDF (station x time) Exports a simulated climate station dataset to a NetCDF file.

Usage

write_station_netcdf(
  df,
  out_nc = "simulated_station_climate.nc",
  fillvalue = -9999
)

Value

Returns the file path invisibly.

Arguments

df

station x time long dataframe returned by simulate_climate_series()

out_nc

Output NetCDF filename

fillvalue

Value used for missing entries

Examples

Run this code
stations <- create_stations(n = 3)
sim <- simulate_climate_series(stations)
tmp <- tempfile(fileext = ".nc")
write_station_netcdf(sim, tmp)

Run the code above in your browser using DataLab