forked from PecanProject/pecan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
plot.netcdf.R
35 lines (30 loc) · 1.17 KB
/
plot.netcdf.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# --------------------------------------------------------------------------------
# Copyright (c) 2012 University of Illinois, NCSA.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the
# University of Illinois/NCSA Open Source License
# which accompanies this distribution, and is available at
# http://opensource.ncsa.illinois.edu/license.html
# --------------------------------------------------------------------------------
#library(PEcAn.visualization)
# ----------------------------------------------------------------------
# COMMAND LINE ARGUMENTS
# ----------------------------------------------------------------------
# arguments are-args year variable
args <- commandArgs(trailingOnly = TRUE)
datafile <- args[1]
year <- args[2]
xvar <- args[3]
yvar <- args[4]
width <- as.numeric(args[5])
height <- as.numeric(args[6])
filename <- args[7]
# datafile="../../output/PEcAn_14/out/23/2006.nc"
# year=2006
# xvar='time'
# yvar="GPP"
# width=800
# height=600
# filename="plot.png"
#error_reporting(E_ALL | E_STRICT);
PEcAn.visualization::plot.netcdf(datafile, yvar, xvar, width, height, filename, year);