|
Last change
on this file since 176 was
113,
checked in by htune, 7 years ago
|
|
now time average is performed on the metric by htune_netcdf2csvMetrics.R. Najda
|
|
File size:
378 bytes
|
| Line | |
|---|
| 1 | library("ncdf4") # to manipulate ncdf |
|---|
| 2 | source('htune_metric.R') |
|---|
| 3 | |
|---|
| 4 | args = commandArgs(trailingOnly=TRUE) |
|---|
| 5 | |
|---|
| 6 | if (length(args)!=5) { stop("Wrong argument number to htune_netcdf2csvMetrics.R")} |
|---|
| 7 | |
|---|
| 8 | nc = nc_open(args[1]) |
|---|
| 9 | t1=as.numeric(args[3]) |
|---|
| 10 | t2=as.numeric(args[4]) |
|---|
| 11 | zmax=as.numeric(args[5]) |
|---|
| 12 | metric_vector=get_metric(nc,args[2],time,zmax) |
|---|
| 13 | metric = mean(metric_vector[t1:t2]) |
|---|
| 14 | print(metric) |
|---|
Note: See
TracBrowser
for help on using the repository browser.