rchlumsk / RavenR

R package for handling Raven hydrologic modelling framework inputs, outputs, and diagnostics
36 stars 16 forks source link

need to update ncdf support with ncdf4 or other available package #35

Closed rchlumsk closed 3 years ago

rchlumsk commented 3 years ago

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.

rchlumsk commented 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.

https://gwf-uwaterloo.github.io/wamedex/#13079_iso.xml

rchlumsk commented 3 years ago

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.