source: src/htune_netcdf2csvMetrics.R @ 176

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 
1library("ncdf4") # to manipulate ncdf
2source('htune_metric.R')
3
4args = commandArgs(trailingOnly=TRUE)
5
6if (length(args)!=5) { stop("Wrong argument number to htune_netcdf2csvMetrics.R")}
7
8nc =  nc_open(args[1])
9t1=as.numeric(args[3])
10t2=as.numeric(args[4])
11zmax=as.numeric(args[5])
12metric_vector=get_metric(nc,args[2],time,zmax)
13metric = mean(metric_vector[t1:t2])
14print(metric)
Note: See TracBrowser for help on using the repository browser.