You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
-200Lines changed: 0 additions & 200 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,206 +59,6 @@ Alternatively, to install the latest version:
59
59
1. Load the required packages using the R command: `library(c('Evapotranspiration', 'ncdf4', 'utils', 'raster', 'chron', 'maptools', 'sp', 'zoo', 'methods', 'xts')
60
60
1. Install the AWAPer package using the following example R command (NOTE: use the full file path to the AWAPer folder). For example on a PC `install.packages("C:\MY_FOLDER\AWAPer\AWAPer_0.1.4.tar.gz", repos = NULL, type = "source")` and for Mac `install.packages(“~/Users/MyFolder/AWAPer/AWAPer_0.1.4.tar.gz", repos = NULL, type = "source")`
61
61
62
-
# Example 1. Build and then update netCDF files with the latest data
63
-
64
-
This example shows the steps required to build the two netCDF files, and then update the data to yesterday.
65
-
66
-
```R
67
-
# Set dates for building netCDFs and extracting data from 15 to 5 days ago.
68
-
startDate= as.Date(Sys.Date()-15,"%Y-%m-%d")
69
-
endDate= as.Date(Sys.Date()-5,"%Y-%m-%d")
70
-
71
-
# Set names for netCDF files (in the system temp. directory).
72
-
ncdfFilename= tempfile(fileext='.nc')
73
-
ncdfSolarFilename= tempfile(fileext='.nc')
74
-
75
-
# Build netCDF grids for all met. data but only over the defined time period.
# Example 2. Extract point precip. data and check with osberved data.
87
-
This example was developed by Ms Xinyang Fan (Uni. Melbourne) and shows how to extract point estimates of daily precipitation at four goundwater bore locations and at one rainfall gauge. The extracted data is then plotted. The rain gauge is also compared against the observed rain gauge. The latter shows that the results are unbiased, but minor differences do exist due to AWAP data having a 5x5 km grid-cell resolution. The plots below show (1) the locattions of the five sites (2) bar graphs of the daily precip. and (3) plots of the observed vs AWAPer estimated precip. at the rainfall gauge.
88
-
89
-

90
-
91
-

92
-
93
-

94
-
95
-
```R
96
-
# load all necessary packages
97
-
library(AWAPer)
98
-
99
-
# Make the netCDF files of only AWAP precipitation data.
# Example 3. Calculate precip and evapotranspiration
175
-
This example calculates the catchment weighted precipitation at Bet Bet Creek (Victoria, Australia), the spatial standard deviation in precipitation and two measures of potential evapotranspiration. The example was developed by Dr Conrad Wasko. Below is a plot of the output.
176
-
177
-

This vignette shows how to build the netCDF data file and then
5
+
update it to new start and end dates.
6
+
output: rmarkdown::html_vignette
7
+
vignette: >
8
+
%\VignetteIndexEntry{Make source data grids}
9
+
%\VignetteEngine{knitr::rmarkdown}
10
+
%\usepackage[utf8]{inputenc}
11
+
---
12
+
13
+
```r
14
+
library(AWAPer, warn.conflicts=FALSE)
15
+
```
16
+
This example shows how to build the required data files and then update them.
17
+
18
+
## Make netCDF file
19
+
This example shows the steps required to build the netCDF data grid files.
20
+
21
+
First, let's define the dates for the data grids. Here the data grids are created for data between the dates _updateTo_ and _updateTo_. If the latter two dates were not input then data would be downloaded from 1/1/1900 to yesterday.
22
+
23
+
```{r}
24
+
startDate = as.Date(Sys.Date()-15,"%Y-%m-%d")
25
+
endDate = as.Date(Sys.Date()-5,"%Y-%m-%d")
26
+
```
27
+
28
+
Next the file name for the netCDF grids need to be defined. Here we'll just use temporary files. You should change this to a non-temporary file name and folder.
29
+
```{r}
30
+
# Set names for netCDF files (in the system temp. directory).
31
+
ncdfFilename = tempfile(fileext='.nc')
32
+
ncdfSolarFilename = tempfile(fileext='.nc')
33
+
```
34
+
35
+
Now we're ready to download and build the netCDF grids.
36
+
37
+
The netCDF data files contains grids of daily rainfall, temperature, vapour pressure deficit and solar radiation for all of Australia.
Now that we've built the above files, the updating can be demonstrated. Here we'll updating the data grids to one day ago.
47
+
48
+
Often users run _makeNetCDF_file_ once to build netCDF data files that contain all variables over the entire record length (which requires ~5GB disk storage) and then use the netCDFs grids for multiple projects, rather than re-building the netCDF for each project.
49
+
50
+
Also, if _makeNetCDF_file_ is run with the the file names pointing to existing files and _updateFrom=NA_ then the netCDF files will be updated to yesterday.
This vignette shows how to build the netCDF data file and then
5
+
update it to new start and end dates.
6
+
output: rmarkdown::html_vignette
7
+
vignette: >
8
+
%\VignetteIndexEntry{Make source data grids}
9
+
%\VignetteEngine{knitr::rmarkdown}
10
+
%\usepackage[utf8]{inputenc}
11
+
---
12
+
13
+
``` r
14
+
library(AWAPer, warn.conflicts = FALSE)
15
+
```
16
+
This example shows how to build the required data files and then update them.
17
+
18
+
## Make netCDF file
19
+
This example shows the steps required to build the netCDF data grid files.
20
+
21
+
First, let's define the dates for the data grids. Here the data grids are created for data between the dates _updateTo_ and _updateTo_. If the latter two dates were not input then data would be downloaded from 1/1/1900 to yesterday.
22
+
23
+
```{r}
24
+
startDate = as.Date(Sys.Date()-15,"%Y-%m-%d")
25
+
endDate = as.Date(Sys.Date()-5,"%Y-%m-%d")
26
+
```
27
+
28
+
Next the file name for the netCDF grids need to be defined. Here we'll just use temporary files. You should change this to a non-temporary file name and folder.
29
+
```{r}
30
+
# Set names for netCDF files (in the system temp. directory).
31
+
ncdfFilename = tempfile(fileext='.nc')
32
+
ncdfSolarFilename = tempfile(fileext='.nc')
33
+
```
34
+
35
+
Now we're ready to download and build the netCDF grids.
36
+
37
+
The netCDF data files contains grids of daily rainfall, temperature, vapour pressure deficit and solar radiation for all of Australia.
Now that we've built the above files, the updating can be demonstrated. Here we'll updating the data grids to one day ago.
47
+
48
+
Often users run _makeNetCDF_file_ once to build netCDF data files that contain all variables over the entire record length (which requires ~5GB disk storage) and then use the netCDFs grids for multiple projects, rather than re-building the netCDF for each project.
49
+
50
+
Also, if _makeNetCDF_file_ is run with the the file names pointing to existing files and _updateFrom=NA_ then the netCDF files will be updated to yesterday.
0 commit comments