knitr::opts_chunk$set(echo = TRUE)

Read out data layers

Here we set up access to some ROMS files, ultimately it's just a file path to a NetCDF file.

library(raadtools)
files <- raadtools:::cpolarfiles()
aromsfile <- sprintf("/mnt/temproms/%s", basename(files$fullname[1L]))
file.copy(files$fullname[1L], aromsfile)

The romsdata function will read out a slice from the NetCDF file, in RasterLayer form.

aromsfile <- "/mnt/temproms/ocean_his_3101.nc"
library(raster)
library(angstroms)
a <- romsdata(aromsfile, "u", transpose = TRUE)

b <- roms_xy(aromsfile, "u", c(1, 1))


mdsumner/angstroms documentation built on April 20, 2020, 8:50 p.m.