-
Notifications
You must be signed in to change notification settings - Fork 21
/
Example for Vancouver (2011).Rmd
50 lines (37 loc) · 1.6 KB
/
Example for Vancouver (2011).Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
---
title: "Example for Vancouver (2011)"
author: "Richard Iannone"
date: "August 25, 2014"
output: html_document
---
This is an example model run for Vancouver. The chosen year will be 2011. Let's begin with a little CALMET.
## Require Statement and Working Directory
Once the PuffR package is installed, make sure to use a require statement whenever you'd like to work with its functions.
```{r}
require(PuffR)
```
Now, set a working directory. This is where all of the model inputs and outputs will be located.
```{r}
setwd("~/Documents/Calpuff")
```
Let's generate some geophysical input files for CALMET. This will consist of a grid centered on 49.5ºN and 125.30364ºW. The width (E-W distance) of the grid will be 8000 m, and the height (N-S distance) will be the same. We will elect to download SRTM terrain height data from "http://gis-lab.info/data/srtm-tif/".
```{r}
calmet_define_geophys(lat_dec_deg = 49.250117,
lon_dec_deg = -123.076122,
lat_lon_grid_loc = 1,
domain_width_m = 8000,
domain_height_m = 8000,
download_SRTM = TRUE)
```
Now, generate an input file for surface meteorological stations in the domain.
```{r}
calmet_surface_met(start_year = 2011,
end_year = 2011,
lat_dec_deg = 49.250117,
lon_dec_deg = -123.076122,
lat_lon_grid_loc = 1,
domain_width_m = 30000,
domain_height_m = 30000,
time_offset = -8,
output_file = "surf.dat")
```