Displaying 20 results from an estimated 9000 matches similar to: "[lattice] format and rotation of strip text"
2012 Nov 18
2
[newbie] convert 3D spatial array to dataframe
summary: how to convert a 3D array (as obtained from ncdf4::ncvar_get)
to a dataframe suitable for use by lattice::levelplot(), e.g.,
levelplot(conc ~ lon * lat | lev, data = data.frame)
details:
I have atmospheric data in netCDF files specifying gas concentrations
over a 3D space with dimensions longitude, latitude, and (vertical)
level. I need to plot the data by level. Since there are
2012 Nov 20
2
[lattice] how to overlay a geographical map on a levelplot?
r-help lattice adepts:
I have a question which is somewhat geospatial, so I posted to r-sig-geo
rather than here:
https://stat.ethz.ch/pipermail/r-sig-geo/2012-November/016757.html
> summary: How to overlay a geographical map on each panel in a lattice
> (or Trellis), e.g., of levelplot's? Note I am not inquiring about
> creating choropleth maps[,]
which Sarkar 2008 covers quite
2009 Nov 10
3
NetCDF output in R
Dear CSAG R users,
I will be glad if someone can point out what I am doing wrong or not doing at all in this.
I am trying to write out netcdf file in R. I have 26 time step but only the first time step is written.
For example:
>library(ncdf)
>path <- '/home/work/'
>forecast <- open.ncdf(paste(path,'cam.1980.2005.nc',sep=""))
> fore <-
2009 Nov 10
3
NetCDF output in R
Dear CSAG R users,
I will be glad if someone can point out what I am doing wrong or not doing at all in this.
I am trying to write out netcdf file in R. I have 26 time step but only the first time step is written.
For example:
>library(ncdf)
>path <- '/home/work/'
>forecast <- open.ncdf(paste(path,'cam.1980.2005.nc',sep=""))
> fore <-
2012 Oct 30
2
issues with krige function
Greetings all,
Ran into a strange problem with the krige function from geoR. The
problem that I am having is that while the krige function seems to
work well, the resulting predicted values are all NAs. Given the size
of the datasets I am working with can't attach it, but I can provide
snippets of the datasets.
> casedata
station year month day obs mpe bias type
2011 Sep 07
3
Editing the variables attributes section in the netCDF header of netCDF files created using the package ncdf.
Hi,
I am using the package ncdf to create netCDF files and I want to mimic the the header of an exiting netCDF file created outside of R. Below is what the existing header looks like (part of it that is different):
netcdf ccd1984_05_08 {
dimensions:
lat = 1974 ;
lon = 1894 ;
time = UNLIMITED ; // (1 currently)
variables:
int time(time) ;
2011 May 06
1
read a netcdf file _Fill_value=-32768
Hello
I am a new user of R .
and I ve problem with R and netcdf .
I succed installation , I could use all examples .
But when I take my netcf it is different .
I want to do statistic on this kind of file .
1)
first calculate mean .
my data is like that
through ncdump -h test.nc
netcdf test {
dimensions:
lat = 301 ;
lon = 401 ;
time = UNLIMITED ; // (80 currently)
2011 Mar 21
1
Lat Lon NetCDF subset
Hi,
I'm trying to read a subset of a netcdf file into R, but although I'm
relatively experienced using R, I'm still new to netCDF files, so this may
be a very simple/stupid question!
I've included an example of the type of file I'm looking at here.
www.met.reading.ac.uk/~swp06hg/ccd1983_01-dk1_20.nc (~7Mb)
It's a 2D array of the variable CCD along with its lat and
2010 May 07
2
How to re-arrange data in R
Dear users,
I have monthly station data (44) stations data for 45 years which I have
read in R using read.table. the data is in the format:
Year Month Station1 Station2 ......................................
Station 44 (i.e the column names in the 1st row), I also have the
latitude and longitude of the stations in a separate file in R (in the
format : Station LAT LON).
I wish to
2008 Jul 02
1
Insert text in data.frame
Dear R-helper,
I wonder if anyone can help me. I am trying to convert a dataset to a
format recognizable by a software onboard a research vessel but I am
having problems with some steps.
I have a data frame as follows:
Conc Lat Lon Depth
Point0000 56.25 -5.65 70
Point0001 56.55 -5.35 85
Point0002 56.25 -5.65 65
Point0003 56.37
2016 Apr 22
2
Unexpected values obtained when reading in data using ncdf and ncdf4
Dear R Users,
I am encountering a problem when reading nc files into R using the ncdf and ncdf4 libraries. The nc files are too large to attach an example (but if someone is interested in helping out I could send a file privately via an online drive), but the code is basic:
for(i in 1:length(thesenames[,1])){
data <- nc_open(paste(INDIR, thesenames[i,c("wholename")],
2010 Apr 21
1
overlaying a levelplot on a map plot
I've generated a levelplot showing the density distribution of a species
derived from survey transects, with lon, lat co-ordinates.
I'd like to overlay this on a map of the study region specified by:
map('worldHires', xlim = range(mlon), ylim = range(mlat)), where mlon, mlat
specifies the study region.
I've tried plotting the map first, then using the options: 'add=TRUE,
2010 Sep 23
1
NetCDF file: adding a variable
I am trying to create a NetCDF file with bathymetry (a matrix) and then to
add a grid type (an integer) as variables.
This is the relevant part of the code:
library(ncdf)
wfile="my_file.nc"
msv=-10
grdtp=2
# Dimensions
d1=dim.def.ncdf("lon","degrees",as.double(lon))
d2=dim.def.ncdf("lat","degrees",as.double(lat))
# Variables
2010 Sep 03
1
calculate monthly mean
Hello group
Im trying to plot 3d with scatterplot packages, i got error say " length(color) must be equal length(x) or 1 " may data has dimensions (lon,lat,lev,time) ,the time in month i want to
calculate the monthly mean for the time how can i make that , is there any function doing that
Thanks a lot
##load rgl package
library(rgl)
library(fields)
library(ncdf)
2011 Jul 29
5
HIRHAM netcdf files
Can someone help me out with a "small" problem?
I've started using netcdf files recently, and I want to extract the grid id
and also the coordinates from a HIRHAM netcdf file.
I know how to extract a slice of dataset both in space and in time and I
also know the area that this file should cover, however I have no idea
regarding the reference for both LAT/LON and RLAT/RLON.
I tried
2016 Apr 22
0
Unexpected values obtained when reading in data using ncdf and ncdf4
On Fri, Apr 22, 2016 at 1:32 AM, Louise Mair <louise.mair at slu.se> wrote:
> Dear R Users,
>
> I am encountering a problem when reading nc files into R using the ncdf
> and ncdf4 libraries. The nc files are too large to attach an example (but
> if someone is interested in helping out I could send a file privately via
> an online drive), but the code is basic:
>
?[...]?
2018 May 20
1
How to average values from grid cells with coordinates
Hi lily,
It's not too hard to do it using dataframes. Getting the indexing
right is usually that hardest part:
# these values are the centers of the black cells
lat<-rep(28:38,11)
lon<-rep(98:108,each=11)
pop<-sample(80:200,121)
# just use the data.frame function
blackcells<-data.frame(lat=lat,lon=lon,pop=pop)
plot(0,type="n",xlim=c(97.5,108.5),ylim=c(27.5,38.5),
2009 Jan 22
1
convergence problem gamm / lme
Hope one of you could help with the following question/problem:
We would like to explain the spatial
distribution of juvenile fish. We have 2135 records, from 75 vessels
(code_tripnr) and 7 to 39 observations for each vessel, hence the random effect
for code_tripnr. The offset (‘offsetter’) accounts for the haul duration and
sub sampling factor. There are no extreme outliers in lat/lon. The model
2018 Jan 24
0
Issue with concatenation of URL losing
a) you need to read the help pages on the paste function... more likely
you are looking for the paste0 function because extra spaces will most
likely break the GET request format.
b) quotes do not become "stuck" as \" ... that is a visual representation
intended to clarify that that quote is not terminating the string but is
actually part of it. If you want to see the contents
2011 Dec 12
2
i can't read large NETCDF file like CRU
i use library(ncdf) to read this file as follow
library(ncdf)
sst.nc = open.ncdf(title)
lonall = get.var.ncdf(sst.nc,'lon')
latall = get.var.ncdf(sst.nc,'lat')
precip = get.var.ncdf(sst.nc,'pre')
close(sst.nc)
if i use this method my pc freeze and not respond until i restart it is
there
--
View this message in context: