Hi, I have a NetCDF file that contains global data, with long, lat, variables, and time. I got this file from here--https://zenodo.org/record/1198817/files/da_hydro_AprMar_r.1-2000_d.05-Jan-2018.nc?download=1.
I want to subset Europe/other grid from this NetCDF file with all informations (long, lat, time, and variables), so that I can use ggplot2 for plotting.
Code I'm using is here--
nc_data <- nc_open('da_hydro_AprMar_r.1-2000_d.05-Jan-2018.nc') eushape <- countries[countries$CONTINENT == "Europe", ] cropsize <- extent(eushape) cropped_data <- raster::crop(nc_data, eushape)
I'm getting this error, please is there a way to solve this--
Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘crop’ for signature ‘"ncdf4"’