davidcarslaw / openair

Tools for air quality data analysis
https://davidcarslaw.github.io/openair/
GNU General Public License v2.0
303 stars 113 forks source link

Using trajPlot for a new area on the edge of map projections #29

Closed gmiskell closed 8 years ago

gmiskell commented 8 years ago

I am using the openair package to do back-trajectories in New Zealand. I've had to manually load in the co-ordinates using the functions in the Appendix of the manual, and when plotted I ended up with this:

image

Is there something in the code where I can wrap this? (Or am I doing something wrong?) The met. data is the suggested NOAA data.

R code is:

procTraj(lat = -36.8, lon = 174.4, year = 2015, name = "muriwai", hours = 168, met = "C:/Users/gmis011/TrajData/", out = "C:/Users/gmis011/TrajProc/", hy.path = "C:/Users/gmis011/hysplit4/")

trajPlot(selectByDate(traj, start='22/02/2015', end='28/02/2015'))

Thanks

davidcarslaw commented 8 years ago

You will need to adjust the parameter orientation and parameter depending on the map projection used and the location of the receptor (the help file has some info on this). The default is set up for the northern hemisphere. For full details on the projections have a look at ?mapproject from the mapproj package that is used by openair. There are loads of map projections that can be used. This was an example I think you can work from.

trajPlot(traj, parameters = c(-45, -35), orientation = c(0, 145, 0))

gmiskell commented 8 years ago

Great, thank you @davidcarslaw ! I ended up using the following output if anyone else is looking to project in the same area!

trajPlot(selectByDate(traj.o3, start='22/02/2015',end='28/02/2015'), pollutant = 'o3', col = 'jet', projection = 'mercator', parameters = NULL, orientation = c(0, 175, 0), xlim=c(-195, -160))

image