Displaying 1 result from an estimated 1 matches for "latmat".
Did you mean:
latcat
2008 Jul 09
1
netCDF to TIFF
...y
setwd('C:/Users/steinber/Documents/DATA/ENSEMBLES/')
library(ncdf)
library(rgdal)
library(chron)
library(fields)
# Read netCDF file
tg.ncdf = open.ncdf('tg_0.25deg_CRU_version1.0.nc')
tg.ncdf
lonmat = get.var.ncdf(nc=tg.ncdf,varid="longitude") # reads entire matrix
latmat = get.var.ncdf(nc=tg.ncdf,varid="latitude") # ditto
timearr = get.var.ncdf(nc=tg.ncdf,varid="time") # reads entire time array
targettime = julian(x=1, d=1, y=2002, origin=c(month = 1, day = 1,
year = 1950))
inds = (1:dim(timearr))
tind = inds[targettime...