Skip to content

Commit

Permalink
Merge pull request #682 from dblodgett-usgs/main
Browse files Browse the repository at this point in the history
fix test for #680
  • Loading branch information
edzer authored Apr 22, 2024
2 parents 1efaa78 + d291c13 commit 34f972b
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 34f972b

Please sign in to comment.