Re: [netcdfgroup] transfering netCDF-file from R to ArcGIS

Hi Annelie:

Since this involves a lot more than netcdf  (R, ArcGIS), a little more info 
would help.  Do you access to the ncdump utility?  Can you do an  "ncdump -h" 
on the files with and without precipitation?  otherwise, if the files aren't 
toobig, can you send them somehow.

Also, the ArcGIS netcdf import is (unfortunately) known to be buggy.

-Roy

On Jul 28, 2010, at 8:27 AM, annelie.holzkaemper@xxxxxxxxxxxx wrote:

> 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
>  
>  
>  
>  
>  
>  
> _______________________________________________
> netcdfgroup mailing list
> netcdfgroup@xxxxxxxxxxxxxxxx
> For list information or to unsubscribe,  visit: 
> http://www.unidata.ucar.edu/mailing_lists/

**********************
"The contents of this message do not reflect any position of the U.S. 
Government or NOAA."
**********************
Roy Mendelssohn
Supervisory Operations Research Analyst
NOAA/NMFS
Environmental Research Division
Southwest Fisheries Science Center
1352 Lighthouse Avenue
Pacific Grove, CA 93950-2097

e-mail: Roy.Mendelssohn@xxxxxxxx (Note new e-mail address)
voice: (831)-648-9029
fax: (831)-648-8440
www: http://www.pfeg.noaa.gov/

"Old age and treachery will overcome youth and skill."
"From those who have been given much, much will be expected" 



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