I'm trying to use netCDF data, and would like to use sf rather than ncdf4 if it's already built to load netCDF data into sf objects.
However, I'm finding that reading the file using sf::st_read isn't working.
You csn get the data for the below example here: ftp://ftp.cdc.noaa.gov/Datasets/cpc_global_temp/tmax.2018.nc
df <- st_read("tmax.2018.nc",) # Reading layer `tmax.2018' from data source `tmax.2018.nc' using driver `netCDF' # Warning message: # no simple feature geometries present: returning a data.frame or tbl_df
It can't find any of the geometries or the data. I'm guessing this is because I am not specifying the layer correctly.
Any help as to how to find the right layer or how to get sf to play nicely with netCDF data?