tests/testthat/test_biome.R

library("ghgvcr")
context("testing biome functions.")

biome_file <- "../data/biome.json"

# test_that("get_biome() correctly reads values from biome ncdf4 files.", {
#   
#   latitude <- 31
#   longitude <- 121
#   
#   #paths
#   netcdf_dir <- "/run/media/potterzot/zfire11/work/ebimodeling/netcdf/"
#   #netcdf_dir <- "/opt/ghgvc/ghgvc/netcdf/"
#   biome_defaults_file <- "inst/extdata/final_ecosystems.json"
#   mapdata_dir <- "inst/extdata/"
#   
#   #Load the biome data for that location
#   biome <- ghgvcr::get_biome(latitude, longitude, biome_defaults_file, 
#                      netcdf_dir, mapdata_dir, 
#                      write_data = FALSE)
# 
#   #tests of biome results
#   expect_equal(typeof(biome), "list")
# })
ebimodeling/ghgvcR documentation built on April 28, 2021, 8:19 p.m.