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