Displaying 4 results from an estimated 4 matches for "create_dimvar".
2009 Aug 04
0
Writing a NetCDF file in R
...tr(dimx); str(dimy)
List of 8
$ name : chr "Lon"
$ units : chr "deg E"
$ vals : num [1:720] 0.25 0.75 1.25 1.75 2.25 2.75 3.25 3.75 4.25 4.75 ...
$ len : int 720
$ id : num -1
$ unlim : logi FALSE
$ dimvarid : num -1
$ create_dimvar: logi TRUE
- attr(*, "class")= chr "dim.ncdf"
List of 8
$ name : chr "Lat"
$ units : chr "deg N"
$ vals : num [1:360] -89.8 -89.2 -88.8 -88.2 -87.8 ...
$ len : int 360
$ id : num -1
$ unlim : logi FALSE...
2009 Aug 05
0
ncdf package problem - put.var.ncdf
...tr(dimx); str(dimy)
List of 8
$ name : chr "Lon"
$ units : chr "deg E"
$ vals : num [1:720] 0.25 0.75 1.25 1.75 2.25 2.75 3.25 3.75 4.25 4.75 ...
$ len : int 720
$ id : num -1
$ unlim : logi FALSE
$ dimvarid : num -1
$ create_dimvar: logi TRUE
- attr(*, "class")= chr "dim.ncdf"
List of 8
$ name : chr "Lat"
$ units : chr "deg N"
$ vals : num [1:360] -89.8 -89.2 -88.8 -88.2 -87.8 ...
$ len : int 360
$ id : num -1
$ unlim : logi FALS...
2010 Sep 07
1
adding variable to netCDF file
...ould like to open an existing netCDF file and add a variable to it.
I am using the ncdf package. This test code gives the idea of what I am
trying to do:
library(ncdf)
print('here we go')
print('first, construct netCDF file')
t<-dim.def.ncdf('t','',1:1,unlim=T,create_dimvar=F)
print('defining first vars')
a<-var.def.ncdf('a','km',t,missval=-999)
b<-var.def.ncdf('b','km',t,missval=-999)
print('creating ncobj')
ncobj<-create.ncdf('testfile.nc',list(a,b))
print('adding data')
put.var.ncdf(ncobj,a...
2010 Sep 23
1
NetCDF file: adding a variable
...ot;)
ncw=create.ncdf(writefile,list(bathymetry,loncp,latcp,dlonp,dlatp))
put.var.ncdf(ncw,bathymetry,bat_matrix)
close.ncdf(ncw)
# Here I am trying to add another variable which should have a value of
grdtp
ncw_old=open.ncdf(wfile,write=TRUE)
d3=dim.def.ncdf("grid_type",'',1:1,create_dimvar=FALSE)
grid_t=var.def.ncdf("grid_type","type",d3,1.e30,longname="Grid Type")
ncw_new=var.add.ncdf(ncw_old,grid_t)
Here I stop because R gives an error message:
Error in var.add.ncdf(ncw_old, grid_t) :
Error in create.ncdf, defining var!
Any ideas of what am I doing...