Skip to content

Commit

Permalink
fix test for r-spatial#680
Browse files Browse the repository at this point in the history
  • Loading branch information
dblodgett-usgs committed Apr 22, 2024
1 parent ee95dc1 commit d291c13
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/testthat/test-ncdf.R
Original file line number Diff line number Diff line change
Expand Up @@ -299,15 +299,15 @@ test_that("axis attribute order -- see #680", {
nc <- RNetCDF::open.nc(file3, write = TRUE)

RNetCDF::att.put.nc(nc, "lon", "standard_name", "NC_CHAR", "longitude")
RNetCDF::att.put.nc(nc, "lat", "standard_name", "NC_CHAR", "latidude")
RNetCDF::att.put.nc(nc, "lat", "standard_name", "NC_CHAR", "latitude")
RNetCDF::att.put.nc(nc, "time", "standard_name", "NC_CHAR", "time")
RNetCDF::att.put.nc(nc, "lon", "units", "NC_CHAR", "degrees")
RNetCDF::att.put.nc(nc, "lat", "units", "NC_CHAR", "degrees")
RNetCDF::att.put.nc(nc, "time", "units", "NC_CHAR", "days since 1900-01-01")

RNetCDF::close.nc(nc)

s1 <- suppressWarnings(stars::read_ncdf(file3))
s1 <- suppressWarnings(stars::read_ncdf(file1))

expect_equal(names(stars::st_dimensions(s1)), c("time", "lon", "lat"))

Expand All @@ -317,5 +317,5 @@ test_that("axis attribute order -- see #680", {

s3 <- suppressWarnings(stars::read_ncdf(file3))

expect_equal(names(stars::st_dimensions(s3)), c("time", "lon", "lat"))
expect_equal(names(stars::st_dimensions(s3)), c("lon", "lat", "time"))
})

0 comments on commit d291c13

Please sign in to comment.