hypertidy / ncmeta

Tidy NetCDF metadata
https://hypertidy.github.io/ncmeta/
11 stars 5 forks source link

a test and a bad fix for #32 #33

Closed dblodgett-usgs closed 5 years ago

dblodgett-usgs commented 5 years ago

I don't totally know what happened, but it looks like something with RNetCDF or tibble has changed pretty significantly. If you run the tests you'll see a bunch of errors around the tibble::as_tibble(out) calls because we are passing a list with different length elements to as_tibble.

mdsumner commented 5 years ago

FWIW, this also errors RNetCDF::print.nc and seems to be fixed with the github version of RNetCDF, in current 1.9-1 I see

nown precipitation_amount(lon, lat, day) ;
Error: Unknown NC_TYPE

for the NC_USHORT.

Looks like there's a few other things to deal with too with RNetCDF 2.0-1, and with your fix the variable table has many more columns now:

chunksizes cache_bytes cache_slots cache_preemption deflate shuffle
  <int> <chr> <chr> <int> <int>      <dbl>       <dbl>       <dbl>            <dbl>   <int> <lgl>  
1     0 lon   NC_D…     1     5       1386     4194304        1009             0.75       9 FALSE  
2     1 lat   NC_D…     1     5        585     4194304        1009             0.75       9 FALSE  
3     2 day   NC_D…     1     5        212     4194304        1009             0.75       9 FALSE  
4     3 crs   NC_U…     1     7          1     4194304        1009             0.75       9 FALSE  
5     4 prec… NC_U…     3    13        278     4194304        1009             0.75       9 FALSE  
6     4 prec… NC_U…     3    13        117     4194304        1009             0.75       9 FALSE  
7     4 prec… NC_U…     3    13         43     4194304        1009             0.75       9 FALSE  
# … with 6 more variables: big_endian <lgl>, fletcher32 <lgl>, szip_options <int>, szip_bits <int>,
#   filter_id <int>, dim_coord <lgl>
mdsumner commented 5 years ago

thanks!

dblodgett-usgs commented 5 years ago

Of course. I think we have a good bit more work coming -- from the little bit I saw things are pretty different in the NC4 stuff that's happened in RNetCDF.