Closed rchlumsk closed 3 years ago
Updated the netcdf_to_gridshp function and added a sample Nith netcdf file obtained from Cuizinart. Need to update the documentation to cite the external data and citation for the era5 data source. Also need to fix a bug in the function that does not handle the projections properly.
Fixed with latest commit, tested and handles projections properly. Now has option to keep grid in lat/long WGS84 projection or convert to a numeric EPSG projected coordinate system. Changed the utmzone argument to the projection ID as that is more precise and reliable for assigning transformations. Changed return in function to return an sf object, and optionally write it to file if outshp is provided.
As noted by others, ncdf.tools is no longer available on CRAN. The functionality needs to be replaced with ncdf4 or other package. Also need to verify the proper construction of the existing sample ncdf files with Julie.