Skip to content

Commit 8fc8c79

Browse files
Data CRS ellipsoid added
1 parent 24bc129 commit 8fc8c79

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

R/file.summary.R

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ file.summary <- function(ncfile) {
3535
from = as.Date(character()),
3636
to = as.Date(character()),
3737
timestep = character(),
38-
units = character() )
38+
units = character(),
39+
ellipsoid.crs = character()
40+
)
3941

4042
# Get number of variables in all groups
4143
for (igrp in grps$grps) {
@@ -58,12 +60,15 @@ file.summary <- function(ncfile) {
5860
grp.string = RNetCDF::grp.inq.nc(igrp)$name
5961
var.string = paste(grp.string, '/', var.tmp$name, sep='' )
6062

63+
ellipsoid.crs = RNetCDF::att.get.nc(igrp, 'NC_GLOBAL', 'CRS')
64+
6165
summary.df.new = data.frame( group = grp.string,
6266
var.string = var.string,
6367
from = date.from,
6468
to = date.to,
6569
timestep = timestep,
66-
units = units)
70+
units = units,
71+
ellipsoid.crs = ellipsoid.crs)
6772

6873
row.names(summary.df.new) = var.tmp$name
6974

R/get.variableSource.R

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,41 +20,47 @@ get.variableSource <- function() {
2020
timestep = rep('', nvars),
2121
data.URL = rep('', nvars),
2222
ncdf.name = rep('', nvars),
23+
ellipsoid.crs = rep('', nvars),
2324
infillGaps = rep(F, nvars),
2425
row.names = vars)
2526
var.data['precip',] <- c('Total daily precipitation',
2627
'mm/day',
2728
'daily',
2829
'https://www.bom.gov.au/web03/ncc/www/awap/rainfall/totals/daily/grid/0.05/history/nat/',
2930
'precip',
31+
'+proj=longlat +ellps=GRS80',
3032
F)
3133

3234
var.data['tmin',] <- c( 'Min daily temperature',
3335
'deg_C',
3436
'daily',
3537
'https://www.bom.gov.au/web03/ncc/www/awap/temperature/minave/daily/grid/0.05/history/nat/',
3638
'tmin',
39+
'+proj=longlat +ellps=GRS80',
3740
F)
3841

3942
var.data['tmax',] <- c( 'Max daily temperature',
4043
'deg_C',
4144
'daily',
4245
'https://www.bom.gov.au/web03/ncc/www/awap/temperature/maxave/daily/grid/0.05/history/nat/',
4346
'tmax',
47+
'+proj=longlat +ellps=GRS80',
4448
F)
4549

4650
var.data['vprp',] <- c( '3pm daily vapour pressure',
4751
'hpa',
4852
'daily',
4953
'https://www.bom.gov.au/web03/ncc/www/awap/vprp/vprph15/daily/grid/0.05/history/nat/',
5054
'vprp',
55+
'+proj=longlat +ellps=GRS80',
5156
F)
5257

5358
var.data['solarrad',] <- c( 'Total daily solar radiation',
5459
'MJ/m^2',
5560
'daily',
5661
'https://www.bom.gov.au/web03/ncc/www/awap/solar/solarave/daily/grid/0.05/history/nat/',
5762
'solarrad',
63+
'+proj=longlat +ellps=GRS80',
5864
T)
5965

6066
return(var.data)

0 commit comments

Comments
 (0)