search for: grdtp

Displaying 1 result from an estimated 1 matches for "grdtp".

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 bathymetry=var.def.ncdf("bathymetry","m",list(d1,d2),msv,longname="Bathymetry") ncw=create.ncdf(writefi...