# Changes between Version 30 and Version 31 of udg/ecoms/RPackage/examples

Ignore:
Timestamp:
May 25, 2013 12:35:28 PM (8 years ago)
Comment:

--

### Legend:

Unmodified
 v30 Note that in this particular case, we are loading standard variables, as defined in the vocabulary (by setting the argument standard.vars = TRUE), but we did not specify a path to the dictionary (default to NULL). By default, the function searches the dictionary in the same directory where the ''ncml'' file has been created, assuming that this is a file with extension ''.dic'' and the same name as the ''ncml''. The function loadGCM allows the retrieval of rectangular windows as well as single point locations. In the last case, the function finds the closest grid point to the given coordinates, as previously described in the example of loadSeasonalForecast. In the following lines we extract the time series of the Spanish cities used in the previous examples: {{{ > t850.ncep.santander <- loadGCM(dataset = "./datasets/reanalysis/Iberia_NCEP/Iberia_NCEP.ncml", standard.vars=TRUE, +                            var="ta", lonLim = -3.81, latLim = 43.43, level=850, season=1, years=1990:1999) > t850.ncep.madrid <- loadGCM(dataset = "./datasets/reanalysis/Iberia_NCEP/Iberia_NCEP.ncml", standard.vars=TRUE, +                               var="ta", lonLim = -3.68, latLim = 40.40, level=850, season=1, years=1990:1999) > > ylimits <- c(floor(min(t850.ncep.madrid$Data)), ceiling(max(t850.ncep.santander$Data))) > plot(t850.ncep.santander$Data, ty='n', axes=FALSE, ylab="degC", xlab="Year", ylim = ylimits) > axis(1,at = seq(1,31*11,31), labels=c(1990:1999,"")) > axis(2, ylim=ylimits) > abline(v=seq(1,31*10,31), lty=2) > lines(t850.ncep.santander$Data, ty='l') > lines(t850.ncep.madrid\$Data, col = "red") > legend("bottomleft", city.names, lty=1, col=1:4) > title(main = "Mean Temperature January 850mb") > mtext("NCEP reanalysis") }}}