[R] "Rotated Lat-Lon" projection in mapproj

From: Victor Homar <victor.homar_at_uib.cat>
Date: Wed, 09 Jul 2008 20:31:36 +0200


Hi,

I'm trying to plot a field obtained from the atmospheric model WRF-NMM which uses a "Rotated Lat-Lon¨ map projection. The WRF documentation mentions that:
· Rotates the earth's lat/lon grid such that the intersection of the
equator and prime meridian is at the center of the model domain.

· Within the rotated framework the grid spacing is constant, but in an
earth-relative sense, the scale varies slightly.

I haven't identified a projection in library mapproj that can handle this.

Any ideas on how to plot this field on a map?

A typical R script to plot other outputs in a lambert projection would be:

##Read lat/lon data
lat<-as.numeric(system(paste(pycmd,'control',"200108150000","LATITCRS",1,0,sep=" "),intern=TRUE))

lon<-as.numeric(system(paste(pycmd,'control',"200108150000","LONGICRS",1,0,sep=" "),intern=TRUE))

## Projected coordinates
coords_lamb<-mapproject(lon,lat,projection="lambert",parameters=c(60.,30.))

xs<-t(matrix(coords_lamb$x,ncol=NCC,nrow=NRC))[,1]

ys<-t(matrix(coords_lamb$y,ncol=NCC,nrow=NRC))[1,]}

## Plot map
filled.contour(xs,ys,Tsd[,,tstep],levels=fillevs,col=cpal,plot.axes={ map('world',projection="lambert",parameter=c(60.,30.),add=TRUE,col="grey"); contour(xs,ys,Tm[,,tstep]-273.15,levels=c(-20:20)*3,add=TRUE); axis(1,labels=F,tick=F);axis(2,labels=F,tick=F)},main=title) #,asp=1.)

Appreciate your help in advance,

Víctor.

-- 
-----------------------------------------------------------------------
Víctor Homar Santaner
Grup de Meteorologia

Edif. Mateu Orfila                      Tel: +34 971 17 1376
Universitat de les Illes Balears        Fax: +34 971 17 3426
07122 Palma de Mallorca (SPAIN)         Email: Victor.Homar_at_uib.es

              Knowledge is contagious. Infect truth.

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Wed 09 Jul 2008 - 19:15:30 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 09 Jul 2008 - 19:31:11 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive