Re: [R] Extracting point data using longitude and latitude from netcdf file using R

2016-01-09 Thread Ben Tupper
; Dar es Salaam > T A N Z A N I A > -- > > > > From: Ben Tupper > To: "r-help@r-project.org" > Cc: Peter Tuju > Sent: Saturday, January 9, 2016 4:01 PM > Subject: Re: [R] Extracting point data using longitude and latitude from > ne

Re: [R] Extracting point data using longitude and latitude from netcdf file using R

2016-01-09 Thread Peter Tuju via R-help
To: "r-help@r-project.org" Cc: Peter Tuju Sent: Saturday, January 9, 2016 4:01 PM Subject: Re: [R] Extracting point data using longitude and latitude from netcdf file using R Hi, This post gives more details on how to transform your lat/lon values to row/column indices. Th

Re: [R] Extracting point data using longitude and latitude from netcdf file using R

2016-01-09 Thread Ben Tupper
Hi, This post gives more details on how to transform your lat/lon values to row/column indices. The question and answer are specifically about the ncdf package, but the workflow is identical when using the ncfd4 package. https://stat.ethz.ch/pipermail/r-help/2011-March/272641.html Cheers, Ben

Re: [R] Extracting point data using longitude and latitude from netcdf file using R

2016-01-09 Thread Peter Tuju via R-help
terĀ  E. Tuju Dar es Salaam T A N Z A N I A -- From: "Anthoni, Peter (IMK)" To: Peter Tuju Cc: "r-help@r-project.org" Sent: Saturday, January 9, 2016 3:14 PM Subject: Re: [R] Extracting point data using longitude and latitude from netcdf file

Re: [R] Extracting point data using longitude and latitude from netcdf file using R

2016-01-09 Thread Anthoni, Peter (IMK)
Hi Peter, the start in nc_varget requires a latitude and longitude index, not the latitude and longitude in double format. So you need to figure out what index your latitude and longitude correspond to, which will depends on what data are in your netCDF. it might have looked like that it worked

Re: [R] Extracting point data using longitude and latitude from netcdf file using R

2016-01-09 Thread Peter Tuju via R-help
I have data file in netcdf with three dimensions (x, y, t) and I want to extract a variable RAINC and RAINNC using longitude and latitude for a single point location with all the time, but no lucky. The syntax is as follows;; setwd( "/run/media/tuju/0767090047/extract_wrf_txt_file" ) rm( list =