ropensci / tidync

NetCDF exploration and data extraction
https://docs.ropensci.org/tidync
90 stars 12 forks source link

fails on trusty 14.04 #82

Closed mdsumner closed 5 years ago

mdsumner commented 5 years ago
> ### ** Examples
> 
> f <- "S20080012008031.L3m_MO_CHL_chlor_a_9km.nc"
> l3file <- system.file("extdata/oceandata", f, package= "tidync")
> (cube <- hyper_tbl_cube(tidync(l3file) %>%
+ activate(chlor_a), lon = lon > 107, lat = abs(lat) < 30))
Source: local array [630,720 x 2]
D: lon [dbl, 4320]
D: lat [dbl, 2160]
M: chlor_a [dbl]
> ufile <- system.file("extdata", "unidata", "test_hgroups.nc", 
+  package = "tidync", mustWork = TRUE)
> tidync(ufile)
Oops, connection to source failed. 
[1] "/home/travis/build/hypertidy/tidync/tidync.Rcheck/tidync/extdata/unidata/test_hgroups.nc"
Error: NetCDF: Invalid dimension ID or name
Execution halted

There's a test open of test_hgroups.nc a Unidata test file, the library version is 4.1.3 (2011):

https://api.travis-ci.org/v3/job/501266043/log.txt

This netCDF 4.1.3 has been built with the following features: 

  --cc        -> gcc
  --cflags    ->  -I/usr/include -DgFortran
  --libs      -> -L/usr/lib -lnetcdf

  --cxx       -> g++
  --has-c++   -> yes

  --fc        -> gfortran
  --fflags    -> -g -O2 -I/usr/include
  --flibs     -> -L/usr/lib -lnetcdff -lnetcdf
  --has-f77   -> yes
  --has-f90   -> yes

  --has-dap   -> yes
  --has-nc2   -> yes
  --has-nc4   -> yes
  --has-hdf5  -> yes
  --has-hdf4  -> no
  --has-pnetcdf-> no
  --has-szlib -> 

  --prefix    -> /usr
  --includedir-> /usr/include
  --version   -> netCDF 4.1.3

---
netcdf.m4: about to set rpath, here is source string: >-L/usr/lib -lnetcdf<
netcdf.m4: final rpath:   -Wl,-rpath,/usr/lib
Netcdf library version: netCDF 4.1.3
Netcdf library has version 4 interface present: yes
Netcdf library was compiled with C compiler: gcc
configure: creating ./config.status
config.status: creating src/Makevars

**********************  Results of ncdf4 package configure *******************

netCDF v4 CPP flags      = -I/usr/include -DgFortran
netCDF v4 LD flags       =   -Wl,-rpath,/usr/lib -L/usr/lib -lnetcdf 
netCDF v4 runtime path   =   -Wl,-rpath,/usr/lib

netCDF C compiler used   = gcc
R      C compiler used   = gcc -std=gnu99 -g -O2

On Xenial we get 4.4.0 (2016) https://api.travis-ci.org/v3/job/501266044/log.txt

This netCDF 4.4.0 has been built with the following features: 

  --cc        -> /usr/bin/x86_64-linux-gnu-gcc
  --cflags    -> -I/usr/include -I/usr/include/hdf5/serial
  --libs      -> -L/usr/lib -L/usr/lib/x86_64-linux-gnu/hdf5/serial -lnetcdf -lhdf5_hl -lhdf5 -lpthread -lsz -lz -ldl -lm -lcurl

  --has-c++   -> no
  --cxx       -> 
  --has-c++4  -> no
  --cxx4      -> 

  --fc        -> 
  --fflags    -> 
  --flibs     -> 
  --has-f90   -> no

  --has-dap   -> yes
  --has-nc2   -> yes
  --has-nc4   -> yes
  --has-hdf5  -> yes
  --has-hdf4  -> no
  --has-pnetcdf-> no
  --has-szlib -> no

  --prefix    -> /usr
  --includedir-> /usr/include
  --version   -> netCDF 4.4.0

---
netcdf.m4: about to set rpath, here is source string: >-L/usr/lib -L/usr/lib/x86_64-linux-gnu/hdf5/serial -lnetcdf -lhdf5_hl -lhdf5 -lpthread -lsz -lz -ldl -lm -lcurl<
netcdf.m4: final rpath:   -Wl,-rpath,/usr/lib -Wl,-rpath,/usr/lib/x86_64-linux-gnu/hdf5/serial
Netcdf library version: netCDF 4.4.0
Netcdf library has version 4 interface present: yes
Netcdf library was compiled with C compiler: /usr/bin/x86_64-linux-gnu-gcc
configure: creating ./config.status
config.status: creating src/Makevars

**********************  Results of ncdf4 package configure *******************

netCDF v4 CPP flags      = -I/usr/include -I/usr/include/hdf5/serial
netCDF v4 LD flags       =   -Wl,-rpath,/usr/lib -Wl,-rpath,/usr/lib/x86_64-linux-gnu/hdf5/serial -L/usr/lib -L/usr/lib/x86_64-linux-gnu/hdf5/serial -lnetcdf -lhdf5_hl -lhdf5 -lpthread -lsz -lz -ldl -lm -lcurl 
netCDF v4 runtime path   =   -Wl,-rpath,/usr/lib -Wl,-rpath,/usr/lib/x86_64-linux-gnu/hdf5/serial

netCDF C compiler used   = /usr/bin/x86_64-linux-gnu-gcc
R      C compiler used   = gcc -g -O2
mdsumner commented 5 years ago

Fixed at bfb975ce565fc807e482497c7a7b953b6e66463c

mdsumner commented 5 years ago

Saw this also in activate, 'what' could be numeric and so printed output didn't match test. Different on 16.04 to 18.04, so probably grid order needs defining

https://github.com/ropensci/tidync/commit/0bc39b14e12933de364a5bbe9087e37777b8ea86