Is there a very simple way to plot up variables from a netCDF file that are stored in a regular lat-lon grid (-90to90˚N, 0-360˚E) onto the now more popular Mollweide projection?
For example say I have something like the following:
lon <- seq(-90,90,2.5) # really these data would come from the netCDF file... lat <- seq(0,356.25,3.75) myvar <- runif(length(lon)*length(lat)) mymat <- array(dim=c(length(lon), length(lat)), myvar)
Which I can plot up easily with something like image:
image(lon, lat, myvar)
But what I'd like to do is convert the myvar array and reproject it so that I can plot it in the Mollweide projection:
... convert to Mollweide projection ... image(myvar_converted)
I'm looking for a very generic approach and ideally something that would allow me to add on points, lines etc on to the plots using base functions if possible.