[netcdfgroup] transfering netCDF-file from R to ArcGIS

Hi,
I am trying to generate a NetCDF file in R that can be imported in ArcGIS using 
the "Make NetCDF Feature Layer" tool (it is supposed to store time series data 
for each climate station). I have used an ArcGIS point-shapefile and converted 
it into a NetCDF file that I can use as a template. This file has 1 dimension 
(the point ID) and 3 variables (x coordinate, y coordinate, elevation). It can 
easily be imported to ArcGIS using "Make NetCDF Feature Layer".
But now I want to add a new variable ("precipitation") to the netcdf-file in R:

>>library(ncdf)
>>my.nc = open.ncdf("C:/temp/pointtest8.nc", write=TRUE)

>>dim_id <- my.nc$dim[[1]]

>>varz = var.def.ncdf("Precipitation","km", list(dim_id), -9999,
          longname="Daily precipitation", prec="double")

>>my.nc <- var.add.ncdf(my.nc, varz)

>>close.ncdf(my.nc)


If I try to import the file modified with R into ArcGIS ("Make NetCDF Feature 
Layer") and choose "precipitation" instead of "elevation" as a variable, I can 
not choose the x and y variables (there are no options in the drop down list). 
However, it is still possible to choose the x and y variables for "elevation". 
So, there seems to be some sort of link between the original variable 
"elevation" and the x- and y-variables that I have not defined for my new 
variable "precipitation" in R. What could be wrong with my definition of the 
new variable?

I would be very grateful for any suggestions!

Cheers,
Annelie






  • 2010 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: