title: Plotting country borders with maptools - R
body: <p>Following the excelent post from Joe Wheatley (<a href="http://joewheatley.net/ncep-global-forecast-system/" rel="nofollow noreferrer">http://joewheatley.net/ncep-global-forecast-system/</a>) I managed to produce a 
  temperature global map. But, instead of only plotting coastline I've tried to use maptools package to plot country borders.
  The problem comes when only eastern hemisphere country borders are plotted. I should be missing something I can't figure out,
  still looking for on stackoverflow and google. Hope you can help.</p>
  
  <p>Here is the code I'm using (most coming from Joe's post)</p>
  
  <pre><code>loc=file.path("ftp://ftp.ncep.noaa.gov/pub/data/nccf/com/gfs/prod/gfs.2013052100/gfs.t00z.sfluxgrbf03.grib2")
  download.file(loc,"temp.grb",mode="wb")
  
  system("wgrib2 -s temp.grb | grep :TMP: | wgrib2 -i temp.grb -netcdf TMP.nc",intern=T)
  system("wgrib2 -s temp.grb | grep :LAND: | wgrib2 -i temp.grb -netcdf temp.nc",intern=T)
  
  library(ncdf)
  landFrac &lt;-open.ncdf("LAND.nc")
  lon &lt;- get.var.ncdf(landFrac,"longitude")
  lat &lt;- get.var.ncdf(landFrac,"latitude")
  
  temp=open.ncdf("TMP.nc")
  t2m.mean &lt;- get.var.ncdf(temp,"TMP_2maboveground")
  
  
  library("fields")
  library("sp", lib.loc="/usr/lib/R/site-library")
  library("maptools", lib.loc="/usr/lib/R/site-library")
  
  day="DIA"
  
  png(filename="gfs.png",width=1215,height=607,bg="white")
  
  rgb.palette &lt;- colorRampPalette(c("snow1","snow2","snow3","seagreen","orange","firebrick"), space = "rgb")#colors
  image.plot(lon,lat,t2m.mean,col=rgb.palette(200),main=as.expression(paste("GFS 24hr Average 2M Temperature",day,"00 UTC",sep="")),axes=T,legend.lab="o C")
  data(wrld_simpl)
  plot(wrld_simpl, add = TRUE)
  
  dev.off()
  </code></pre>
  
  <p>and this is the image produced</p>
  
  <p><img src="https://i.stack.imgur.com/HiFWp.png" alt="enter image description here"></p>
  
  <p>This is a global map, should I use xlim and ylim in image.plot to extract a region (i.e. Europe)</p>
  
  <p><strong>EDIT:</strong> Added url for temp.nc file</p>
  
  <p><a href="http://ubuntuone.com/29DKAeRjUCiCzLblgfSLc9" rel="nofollow noreferrer">http://ubuntuone.com/29DKAeRjUCiCzLblgfSLc9</a></p>
  
  <p>Any help would be appreciated, thanks</p>