# But no lucky with the red bolded syntax as I end up with the following error message> RAINC <- ncvar_get( inp_file, varid = "RAINC", start = c( Lon[2], Lat[2], 1 ), count = c( 1, 1, -1 ) )
Error in Rsx_nc4_get_vara_double: NetCDF: Index exceeds dimension bound
Var: RAINC Ndims: 3 Start: 0,4294967289,38 Count: 17,1,1
Error in ncvar_get_inner(ncid2use, varid2use, nc$var[[li]]$missval, addOffset, :
C function R_nc4_get_vara_double returned error
However when I cahnge the latitude to postive it works fine. Note latitudes in the file data ranges from -16.71505 to 7.787529 as shown below;
head(ncvar_get(inp_file, "XLAT"))
[1] -16.71505 -16.71505 -16.71505 -16.71505 -16.71505 -16.71505
> tail(ncvar_get(inp_file, "XLAT"))
[1] 7.787529 7.787529 7.787529 7.787529 7.787529 7.787529
## So, how can I get the syntax correct? Please help _____________
Peter E. Tuju
Dar es Salaam
T A N Z A N I A
----------------------
[[alternative HTML version deleted]]
______________________________________________
R-h...@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
From: Ben Tupper <btu...@bigelow.org>
To: "r-h...@r-project.org" <r-h...@r-project.org>
Cc: Peter Tuju <pete...@ymail.com>
Sent: Saturday, January 9, 2016 4:01 PM
Subject: Re: [R] Extracting point data using longitude and latitude from netcdf file using R